购买vip页面增加配置更新的事件监听
This commit is contained in:
parent
63c62c0ade
commit
9dccf86b33
3249
package-lock.json
generated
3249
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -26,12 +26,14 @@
|
|||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||||
"babel-plugin-transform-export-extensions": "^6.22.0",
|
"babel-plugin-transform-export-extensions": "^6.22.0",
|
||||||
|
"babel-plugin-transform-node-env-inline": "^0.4.3",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
"cross-env": "^5.1.3",
|
"cross-env": "^5.1.3",
|
||||||
"less": "^3.8.1",
|
"less": "^3.8.1",
|
||||||
"wepy-compiler-babel": "^1.5.1",
|
"wepy-compiler-babel": "^1.5.1",
|
||||||
"wepy-compiler-less": "^1.3.10",
|
"wepy-compiler-less": "^1.3.10",
|
||||||
|
"wepy-plugin-imagemin": "^1.5.3",
|
||||||
"wepy-plugin-uglifyjs": "^1.3.7"
|
"wepy-plugin-uglifyjs": "^1.3.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,8 @@ export default class extends wepy.app {
|
|||||||
this.use('promisify');
|
this.use('promisify');
|
||||||
sdkManage.init();
|
sdkManage.init();
|
||||||
sdkManage.Login(() => {
|
sdkManage.Login(() => {
|
||||||
let account = wepy.getStorageSync('account');
|
jcEvent.emit(jcEvent.events.NEED_UPDATE_CFG, {});
|
||||||
jcEvent.emit(jcEvent.events.UPDATE_ACCOUNT, {});
|
|
||||||
console.log('finish parse jcfw');
|
console.log('finish parse jcfw');
|
||||||
console.log(account);
|
|
||||||
});
|
});
|
||||||
//全局拦截器
|
//全局拦截器
|
||||||
this.intercept('request', {
|
this.intercept('request', {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const env = 'product'; //product
|
const env = process.env.NODE_ENV === 'production' ? 'product' : 'test'; //product, test
|
||||||
export default {
|
export default {
|
||||||
env: env,
|
env: env,
|
||||||
// apiBase: 'http://192.168.100.232',
|
// apiBase: 'http://192.168.100.232',
|
||||||
|
@ -124,6 +124,13 @@
|
|||||||
this.gid = decodeURIComponent(params.gid);
|
this.gid = decodeURIComponent(params.gid);
|
||||||
}
|
}
|
||||||
onShow() {
|
onShow() {
|
||||||
|
jcEvent.on(jcEvent.events.NEED_UPDATE_CFG, this, data => {
|
||||||
|
this.loadCfg();
|
||||||
|
this.$apply();
|
||||||
|
})
|
||||||
|
this.loadCfg();
|
||||||
|
}
|
||||||
|
loadCfg() {
|
||||||
if (this.$parent.globalData.dataType === 'game') {
|
if (this.$parent.globalData.dataType === 'game') {
|
||||||
this.vip_price = this.$getPrice('vip_price');
|
this.vip_price = this.$getPrice('vip_price');
|
||||||
this.vip_discount = this.$getPrice('vip_discount');
|
this.vip_discount = this.$getPrice('vip_discount');
|
||||||
@ -138,8 +145,6 @@
|
|||||||
this.month_discount = this.$getPrice(subStr + 'month_discount');
|
this.month_discount = this.$getPrice(subStr + 'month_discount');
|
||||||
this.vip_img = this.$getPrice(subStr + 'vip_img');
|
this.vip_img = this.$getPrice(subStr + 'vip_img');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.$apply();
|
this.$apply();
|
||||||
}
|
}
|
||||||
buy(type) {
|
buy(type) {
|
||||||
|
@ -81,17 +81,24 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
|
jcEvent.on(jcEvent.events.NEED_UPDATE_CFG, this, data => {
|
||||||
|
this.loadCfg();
|
||||||
|
this.$apply();
|
||||||
|
})
|
||||||
|
this.loadCfg();
|
||||||
this.gid = decodeURIComponent(params.gid);
|
this.gid = decodeURIComponent(params.gid);
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
}
|
}
|
||||||
onShow(){
|
onShow(){
|
||||||
|
|
||||||
|
}
|
||||||
|
loadCfg() {
|
||||||
if (this.$parent.globalData.dataType === 'game') {
|
if (this.$parent.globalData.dataType === 'game') {
|
||||||
this.product_img = this.$getPrice('product_img');
|
this.product_img = this.$getPrice('product_img');
|
||||||
} else {
|
} else {
|
||||||
const subStr = this.$parent.globalData.dataType + '_'
|
const subStr = this.$parent.globalData.dataType + '_'
|
||||||
this.product_img = this.$getPrice(subStr + 'product_img');
|
this.product_img = this.$getPrice(subStr + 'product_img');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$apply();
|
this.$apply();
|
||||||
}
|
}
|
||||||
async showBuyMenu() {
|
async showBuyMenu() {
|
||||||
|
@ -32,6 +32,7 @@ module.exports = {
|
|||||||
'transform-decorators-legacy',
|
'transform-decorators-legacy',
|
||||||
'transform-object-rest-spread',
|
'transform-object-rest-spread',
|
||||||
'transform-export-extensions',
|
'transform-export-extensions',
|
||||||
|
'transform-node-env-inline',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user