背景:
开发第三方小程序
开发人员使用小程序 1 调试
QA 使用小程序 2、3、4 测试
开发时代码中 ext.json 写的是开发使用的小程序 1 的 appid,提交 QA 测试的时候使用脚本修改 ext.json,分别将 extAppid 修改成测试使用的小程序 2、3、4 的 appid,然后使用命令行工具上传小程序代码。(修改 ext.json 和调用命令行上传代码都是放到一个脚本文件里执行的)
但是实际使用的时候使用脚本修改好 ext.json 之后:
使用命令行上传全都是上传到了小程序 1 中;
使用开发者工具的上传按钮是可以上传到对应的小程序中。
开发时 ext.json 的内容
{ "extEnable": true, "extAppid": "***", // 小程序 1 的 appid "directCommit": true, "ext": { // *** }} |
提交测试时修改之后 ext.json 的内容
{ "extEnable": true, "extAppid": "***", // 小程序 2、3、4 的 appid "directCommit": true, "ext": { // *** }} |
project.config.json 的内容
{ "description": "desc", "packOptions": { "ignore": [] }, "setting": { "urlCheck": true, "es6": false, "postcss": false, "minified": false, "newFeature": true }, "compileType": "miniprogram", "libVersion": "2.2.2", "appid": "***", // 第三方平台开发小程序的 appid "projectname": "name", "svr": "", "client": "", "qcloudRoot": "", "miniprogramRoot": "", "pluginRoot": "", "scripts": { "beforeCompile": "", "beforePreview": "", "beforeUpload": "" }, "condition": { // *** }} |
