From a7f4feeba595083e140291b578df5d6989676d35 Mon Sep 17 00:00:00 2001 From: yangwen Date: Fri, 30 May 2025 18:06:01 +0800 Subject: [PATCH] =?UTF-8?q?dc=E6=9C=88=E5=BA=A6=E6=8C=91=E6=88=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Stage.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/Stage.ts b/src/views/Stage.ts index dd9cc64..ea98933 100644 --- a/src/views/Stage.ts +++ b/src/views/Stage.ts @@ -471,9 +471,11 @@ export class Stage extends Laya.Script { UIManager.getInstance().loadGameDoneUI(true, this.data) } else if (this.data.get_stageType() === config.STAGE_TYPE.DC) { // dc if (progress >= 1) { // 完成每日挑战关卡检查是否或者当月奖杯 - const now = new Date() - const nowYear = now.getFullYear() - const nowMonth = now.getMonth() + 1 + const stageID = this.data.get_stageID() + const list = stageID.split("-") + const nowYear = Number(list[0]) + const nowMonth = Number(list[1]) + const day = Number(list[2]) const doneCount = user.get_doneCountByDate(nowYear, nowMonth) let dayCount = 0 const info = G_getMonthInfo(nowYear, nowMonth) @@ -481,7 +483,7 @@ export class Stage extends Laya.Script { dayCount = info.dayCount console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount) if (doneCount >= dayCount) { // 当月每日挑战全部完成 - user.add_trophy_record(nowYear, nowMonth, now.getDate()) + user.add_trophy_record(nowYear, nowMonth, day) } } UIManager.getInstance().loadGameDoneUI(false, this.data)