dc月度挑战问题

This commit is contained in:
2025-05-30 18:06:01 +08:00
parent cbfeda6636
commit a7f4feeba5

View File

@@ -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)