dc挑战问题

This commit is contained in:
2025-05-30 15:02:12 +08:00
parent c191f8c747
commit a4dff5c7eb

View File

@@ -98,10 +98,8 @@ export class DailyChallenge extends Laya.Script {
}) })
this.btn_play.on(Laya.Event.CLICK, this, () => { this.btn_play.on(Laya.Event.CLICK, this, () => {
// console.log(">>>>>>>>>>>>>>>>>>>>>>>", this.selectedUnit.day) const year = this.selectedUnit.year
const now = new Date() const month = this.selectedUnit.month
const year = now.getFullYear()
const month = now.getMonth() + 1
const dayNow = this.selectedUnit.day const dayNow = this.selectedUnit.day
const stageID = `${year}-${month}-${dayNow}` const stageID = `${year}-${month}-${dayNow}`
const doStage = StorageManager.getInstance().getStage(stageID) const doStage = StorageManager.getInstance().getStage(stageID)
@@ -173,8 +171,7 @@ export class DailyChallenge extends Laya.Script {
this.currentIndex = i this.currentIndex = i
break break
} }
} }
console.log("DailyChallenge loadWithMonth >>>>>>>>>>>>>>>", nowYear, nowMonth, this.currentIndex)
this.loadWithIndex(this.currentIndex) this.loadWithIndex(this.currentIndex)
} }
@@ -182,6 +179,7 @@ export class DailyChallenge extends Laya.Script {
this.btn_left.visible = this.currentIndex > 0 this.btn_left.visible = this.currentIndex > 0
this.btn_right.visible = this.currentIndex < this.indexMax this.btn_right.visible = this.currentIndex < this.indexMax
const info = MONTH_LIST[index] const info = MONTH_LIST[index]
console.log("DailyChallenge loadWithIndex >>>>>>>>>>>>>>>", info.year, info.month)
const user = StorageManager.getInstance().getUser() const user = StorageManager.getInstance().getUser()
const now = new Date() const now = new Date()
const nowYear = now.getFullYear() const nowYear = now.getFullYear()