调整dc默认月份逻辑
This commit is contained in:
@@ -154,10 +154,7 @@ export class DailyChallenge extends Laya.Script {
|
||||
}
|
||||
}
|
||||
|
||||
loadWithMonth(): void {
|
||||
const now = new Date()
|
||||
const nowYear = now.getFullYear()
|
||||
const nowMonth = now.getMonth() + 1
|
||||
loadWithMonth(nowYear: number, nowMonth: number): void {
|
||||
this.currentIndex = 0
|
||||
for (let i = 0; i < MONTH_LIST.length; i++) {
|
||||
const obj = MONTH_LIST[i]
|
||||
@@ -173,6 +170,7 @@ export class DailyChallenge extends Laya.Script {
|
||||
this.btn_left.visible = this.currentIndex > 0
|
||||
this.btn_right.visible = this.currentIndex < this.indexMax
|
||||
const info = MONTH_LIST[index]
|
||||
UIManager.getInstance().setCurrentDCMonth(info.year, info.month)
|
||||
console.log("DailyChallenge loadWithIndex >>>>>>>>>>>>>>>", info.year, info.month)
|
||||
const user = StorageManager.getInstance().getUser()
|
||||
const now = new Date()
|
||||
|
||||
Reference in New Issue
Block a user