## 1.修改app配置 用HBuilderX打开项目,点击`manifest.json`文件 #### 设置app图标 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616058759099.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) 点击`浏览`选择一个1024x1024的图片传上去,再点击`自动生成图标并替换`就可以了 #### 设置app模块 默认勾选 支付、登录、分享、 ViderPlayer等模块,需要使用到其他模块请自行勾选。 其中的微信支付、微信登录、微信分享等模块需要特殊配置。 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059095597.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) #### 微信登录 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059307090.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) #### 微信分享 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059365021.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) #### 微信支付 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059412073.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) #### 权限设置 安卓的已经配置好了,ios的必须填写相关的描述信息,需要用那些权限就填写哪些,必须填写详细,不然上架容易被拒 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059542719.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) #### 修改请求域名 找到config/app.js文件,将下图中的域名修改为您的域名 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616059884708.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) ## 2.开发调试 #### mac端 安装xCode,安装苹果模拟器 在HBuilderX,点击`运行`,选择`运行到手机或模拟器`,选择您想要的模拟器便可直接运行 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616060541404.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) 需要调试第三方sdk(如微信登录,支付)的需要使用自定义基座才能调试,详见[https://ask.dcloud.net.cn/article/35115](https://ask.dcloud.net.cn/article/35115) ## 3.打包上线 #### 安卓端 点击`发行`\>`原生-app云打包` ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616061447709.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) 主要配置的地方是证书别名,证书私钥密码和证书文件 **安卓生成签名及查看签名教程详见:**([https://ask.dcloud.net.cn/article/35777)](https://ask.dcloud.net.cn/article/35777%EF%BC%89) 配置好以后点击打包,打包成功后控制台有链接自行下载就可以了 #### 苹果端 ios打包前微信所有的相关配置需要appid和需要生成ios平台通用链接 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616142069410.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) ios通用链接配置 [https://ask.dcloud.net.cn/article/36393#unilink](https://ask.dcloud.net.cn/article/36393#unilink) ios通用链接生成 [https://ask.dcloud.net.cn/article/36445](https://ask.dcloud.net.cn/article/36445) 配置好通用链接后,点击`发行`\>`原生-app云打包` ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616062240684.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) 需要配置的地方是证书私钥密码,证书profile文件和私钥证书 **生成苹果证书教程和p12文件教程详见**[https://www.jianshu.com/p/ae11b893284b](https://www.jianshu.com/p/ae11b893284b) 以上配置好后点击打包,打包成功后控制台有链接自行下载就可以了 生成好ipa文件后,在Transporter这个软件上传 ![](https://git.kancloud.cn/repos/yi_xiang_42/likeshop_develop_v2_x/raw/1b0a40473e5d0b763167a1c082331dc9be1d1854/images/screenshot_1616062842377.png?access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjQ5MjcxMzAsImlhdCI6MTYyNDg4MzkzMCwicmVwb3NpdG9yeSI6InlpX3hpYW5nXzQyXC9saWtlc2hvcF9kZXZlbG9wX3YyX3giLCJ1c2VyIjp7InVzZXJuYW1lIjoiaW5kZXhsaW4iLCJuYW1lIjoiaW5kZXhsaW4iLCJlbWFpbCI6ImluZGV4bGluQHFxLmNvbSIsInRva2VuIjoiOWUwOTNhNGYzYWIzMjQ2ZGY4YmZiYzRlNzgwMWUxNDIiLCJhdXRob3JpemUiOnsicHVsbCI6dHJ1ZSwicHVzaCI6dHJ1ZSwiYWRtaW4iOnRydWV9fX0.Z74JV7TLoQT6QhSyPjDeLqnn0fayo4wsh9dKC8nwU4s) <br><br> **uniapp官方教程:**[https://uniapp.dcloud.io/quickstart-hx?id=%e6%89%93%e5%8c%85%e4%b8%ba%e5%8e%9f%e7%94%9fapp ](https://uniapp.dcloud.io/quickstart-hx?id=%e6%89%93%e5%8c%85%e4%b8%ba%e5%8e%9f%e7%94%9fapp )<br> <br>