diff --git a/src/common/global.js b/src/common/global.js index 6f1c21b..9e91e42 100644 --- a/src/common/global.js +++ b/src/common/global.js @@ -1,4 +1,4 @@ -const env = 'test'; +const env = 'test'; //product, test export default { env: env, apiBase: env === 'test'? 'https://ghost-test.kingsome.cn' : 'https://ghost.kingsome.cn', diff --git a/src/components/z-action-sheet.wpy b/src/components/z-action-sheet.wpy index 5727673..5570392 100644 --- a/src/components/z-action-sheet.wpy +++ b/src/components/z-action-sheet.wpy @@ -58,7 +58,7 @@ app-id="wx815bf59d472c0a63" path="/pages/product?{{config.params}}" extra-data="" - version="develop" + version="{{config.payVer}}" >促销开通 取消 @@ -73,7 +73,8 @@ hide: true, goldTitle: '', params: '', - showBuy: false + showBuy: false, + payVer: 'develop' } } data = { diff --git a/src/pages/gameInfo.wpy b/src/pages/gameInfo.wpy index 3a09a23..1965f53 100644 --- a/src/pages/gameInfo.wpy +++ b/src/pages/gameInfo.wpy @@ -100,9 +100,10 @@ hide: true, goldTitle: '金币开通', params: '', - showBuy: false + showBuy: false, + payVer: 'develop' }, - vip: false + vip: false, }; methods = { imageTap: function(index) { @@ -146,6 +147,7 @@ }; onLoad(params) { + this.zActionSheetCfg.payVer = g.env === 'product' ? 'release' : 'develop'; this.vip = this.$parent.isVip(); this.id = decodeURIComponent(params.id); this.showAll = this.$parent.showAll(); diff --git a/src/pages/index.wpy b/src/pages/index.wpy index 6b00ce4..d83ae39 100644 --- a/src/pages/index.wpy +++ b/src/pages/index.wpy @@ -17,7 +17,7 @@ app-id="wx815bf59d472c0a63" path="/pages/buyvip?{{vip_params}}" extra-data="" - version="develop" + version="{{payVer}}" > {{vip_btn_title}} @@ -88,7 +88,8 @@ vipImg: image.vip_s, vip_btn_title: '激活', vip_params: '', - showBuy: false + showBuy: false, + payVer: 'develop' }; methods = { @@ -122,6 +123,7 @@ async onLoad(options) { let self = this; + this.payVer = global.env === 'product' ? 'release' : 'develop'; if (!this.$parent.checkClientLogin()) { this.getAllData(); this.vip_params = `token=${this.$parent.getGlobalDate('gameToken')}`;