diff --git a/src/components/z-action-sheet.wpy b/src/components/z-action-sheet.wpy
index 87ef483..5727673 100644
--- a/src/components/z-action-sheet.wpy
+++ b/src/components/z-action-sheet.wpy
@@ -12,7 +12,6 @@
z-index: 101;
}
.z-action-sheet {
- height: 285rpx;
bottom: 0;
left: 0;
right: 0;
@@ -53,7 +52,7 @@
{{config.goldTitle}}
- = countCfg;
+ }
+ return result;
+ } else {
+ return true;
+ }
+ } else {
+ return false;
+ }
+
}
}
diff --git a/src/pages/gameInfo.wpy b/src/pages/gameInfo.wpy
index 07f6ed0..3a09a23 100644
--- a/src/pages/gameInfo.wpy
+++ b/src/pages/gameInfo.wpy
@@ -99,7 +99,8 @@
zActionSheetCfg: {
hide: true,
goldTitle: '金币开通',
- params: ''
+ params: '',
+ showBuy: false
},
vip: false
};
@@ -136,7 +137,7 @@
this.zActionSheetCfg.hide = true;
},
actionSheetGold() {
- if (this.score < this.$getPrice(this.record.category)) {
+ if (this.score < this.$getExtCfg(this.record.category+'_price')) {
this.requestAd('金币不足')
} else {
this.buyGame();
@@ -188,11 +189,12 @@
this.showAll = !cfg ? false : !cfg.hide_main;
this.getUserInfo();
this.vip = this.$parent.isVip();
+ this.zActionSheetCfg.showBuy = this.$showBuy();
this.$apply();
}
async showBuyMenu() {
this.zActionSheetCfg.params = `token=${this.$parent.getGlobalDate('gameToken')}&gid=${this.id}`;
- this.zActionSheetCfg.goldTitle = `金币开通(${this.$getPrice(this.record.category)})`;
+ this.zActionSheetCfg.goldTitle = `金币开通(${this.$getExtCfg(this.record.category + '_price')})`;
this.zActionSheetCfg.hide = false;
}
playGame(multip) {
diff --git a/src/pages/index.wpy b/src/pages/index.wpy
index f896d45..6b00ce4 100644
--- a/src/pages/index.wpy
+++ b/src/pages/index.wpy
@@ -11,7 +11,7 @@
{{expire_str}}
- {
- let cfg = wepy.getStorageSync('cfg');
- this.showAll = !cfg ? false : !cfg.hide_main;
+ this.showAll = this.$showAll();
+ this.showBuy = !!this.vip_btn_title && this.$showBuy();
this.$apply();
})
jcEvent.on(jcEvent.events.BUY_VIP_RESULT, this, data => {
@@ -200,7 +201,7 @@
if (!cfg._getrewardtype) {
wepy.hideShareMenu();
}
- this.showAll = !cfg ? false : !cfg.hide_main;
+ this.showAll = this.$showAll();
let userInfo = this.$parent.getUserInfo();
console.log(userInfo);
if (userInfo) {
@@ -241,6 +242,7 @@
this.my_game_list = res.records;
this.showMyGame = this.my_game_list.length > 0;
this.$apply();
+ wepy.setStorageSync('game_count', this.my_game_list.length);
} catch (err) {
console.log('error get recent games');
}
@@ -271,7 +273,7 @@
this.vip_btn_title = '激活';
this.vipImg = image.vip_s;
}
-
+ this.showBuy = !!this.vip_btn_title && this.$showBuy();
}
this.$apply();
diff --git a/src/pages/jumppage.wpy b/src/pages/jumppage.wpy
index 35f1372..d75aeee 100644
--- a/src/pages/jumppage.wpy
+++ b/src/pages/jumppage.wpy
@@ -107,7 +107,7 @@
onLoad(params) {
this.text = decodeURIComponent(params.text);
this.aid = decodeURIComponent(params.aid);
- this.ad_price = this.$getPrice('ad');
+ this.ad_price = this.$getExtCfg('ad_price');
console.log(`aid : ${this.aid}`);
let self = this;
this.$parent.getShareCount(count => {