1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| var NODE_ENV = '项目A' // var NODE_ENV = '项目B'
var config = {}
switch (NODE_ENV) { case '项目A': config = { title: '项目A', // 全局通用标题 appid: '"__UNI__XXXX"', // 打包的appid weixinAppid: '"XXXXXX"', name: '"A"', // 应用名称 list: [ { "pagePath": "pages/index/index", "iconPath": "static/tab/tab-member.png", "selectedIconPath": "static/tab/tab-member-current.png", "text": "我的" },{ "pagePath": "pages/member/member", "iconPath": "static/tab/tab-member.png", "selectedIconPath": "static/tab/tab-member-current.png", "text": "商户" },{ "pagePath": "pages/activity/activity", "iconPath": "static/tab/tab-member.png", "selectedIconPath": "static/tab/tab-member-current.png", "text": "活动" } ] } break; case '项目B': config = { title: '项目B', // 全局通用标题 appid: '"__UNI__XXXXXX"', // 打包的appid weixinAppid: '"xxxxxx"', name: '"B"', // 应用名称 list: [ { "pagePath": "pages/index/index", "iconPath": "static/tab/tab-member.png", "selectedIconPath": "static/tab/tab-member-current.png", "text": "我的" },{ "pagePath": "pages/activity/activity", "iconPath": "static/tab/tab-member.png", "selectedIconPath": "static/tab/tab-member-current.png", "text": "活动" } ] } break; default: break; }
module.exports = { config }
|