This commit is contained in:
computer\尼卡 2025-08-08 17:48:14 +08:00
parent a859bf3a09
commit 2f740c66d4
2 changed files with 4 additions and 2 deletions

View File

@ -153,6 +153,7 @@ export default class NewClass extends cc.Component {
}
}
init() {
let isExpired = cc.fx.GameTool.checkExpiration();
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
// 定义监听函数
this.onShowListener = () => {
@ -163,7 +164,7 @@ export default class NewClass extends cc.Component {
wx.onShow(this.onShowListener);
}
this.btn_Touch = true;
if (cc.fx.GameConfig.GM_INFO.hp_Max == 7) {
if (isExpired) {
this.monthCardBtn.active = false;
this.monthCardBtn2.active = true;
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.monthTime, 35, 20, "month_", this.monthCardTime, true);

View File

@ -746,7 +746,8 @@ export default class NewClass extends cc.Component {
}
//更新图标
updateIcon() {
if (cc.fx.GameConfig.GM_INFO.hp_Max == 7) {
let isExpired = cc.fx.GameTool.checkExpiration();
if (isExpired) {
this.monthCardTime.active = true;
} else {