From 2f740c66d493ef516fa6c736d8f0120d78f5490e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?computer=5C=E5=B0=BC=E5=8D=A1?= <203267346@qq.com> Date: Fri, 8 Aug 2025 17:48:14 +0800 Subject: [PATCH] 11 --- assets/Script/monthlyCard.ts | 3 ++- assets/shop/script/shop.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/Script/monthlyCard.ts b/assets/Script/monthlyCard.ts index 35a9ecd..4c76dea 100644 --- a/assets/Script/monthlyCard.ts +++ b/assets/Script/monthlyCard.ts @@ -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); diff --git a/assets/shop/script/shop.ts b/assets/shop/script/shop.ts index 95c15c2..0e996f5 100644 --- a/assets/shop/script/shop.ts +++ b/assets/shop/script/shop.ts @@ -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 {