== to ===

This commit is contained in:
2025-05-28 19:15:32 +08:00
parent ccfcc4f840
commit 34eec38036
16 changed files with 64 additions and 64 deletions

View File

@@ -88,7 +88,7 @@ export class CalendarUnit extends Laya.Script {
}
updateUnit(): void {
if (this.open == false) {
if (this.open === false) {
return
}

View File

@@ -131,7 +131,7 @@ export class DailyChallenge extends Laya.Script {
const nowMonth = now.getMonth() + 1
for (var i = 0; i < MONTH_LIST.length; i++) {
const obj = MONTH_LIST[i]
if (nowYear == obj.year && nowMonth == obj.month) {
if (nowYear === obj.year && nowMonth === obj.month) {
this.indexMax = i
break
}
@@ -169,7 +169,7 @@ export class DailyChallenge extends Laya.Script {
this.currentIndex = 0
for (let i = 0; i < MONTH_LIST.length; i++) {
const obj = MONTH_LIST[i]
if (nowYear == obj.year && nowMonth == obj.month) {
if (nowYear === obj.year && nowMonth === obj.month) {
this.currentIndex = i
break
}
@@ -212,10 +212,10 @@ export class DailyChallenge extends Laya.Script {
let open = true
if (info.year > nowYear) {
open = false
} else if (info.year == nowYear) {
} else if (info.year === nowYear) {
if (info.month > nowMonth) {
open = false
} else if (info.month == nowMonth) {
} else if (info.month === nowMonth) {
if (day > nowDay) {
open = false
}
@@ -234,7 +234,7 @@ export class DailyChallenge extends Laya.Script {
}
}
unit.setCalendarUnit(info.year, info.month, day, open, progress, this, this.onClickUnit)
if (info.year == nowYear && info.month == nowMonth && day == nowDay) {
if (info.year === nowYear && info.month === nowMonth && day === nowDay) {
this.selectedUnit = unit
}
day++

View File

@@ -20,7 +20,7 @@ export class TrophyClaim extends Laya.Script {
public onSetShow(record: TrophyRecord): void {
for (let i = 0; i < MONTH_LIST.length; i++) {
const obj = MONTH_LIST[i]
if (obj.year == record.year && obj.month == record.month) {
if (obj.year === record.year && obj.month === record.month) {
this.icon.skin = obj.icon_res
break
}

View File

@@ -34,7 +34,7 @@ export class TrophyRoom extends Laya.Script {
for (var i = 0; i < MONTH_LIST.length; i++) {
var obj = MONTH_LIST[i]
infos.push(obj)
if (obj.year == nowYear && obj.month == nowMonth) {
if (obj.year === nowYear && obj.month === nowMonth) {
break
}
}
@@ -48,7 +48,7 @@ export class TrophyRoom extends Laya.Script {
if (find < 0) {
years.push(obj.year)
}
if (monthMap.has(obj.year) == false) {
if (monthMap.has(obj.year) === false) {
monthMap.set(obj.year, [])
}
const list = monthMap.get(obj.year)

View File

@@ -20,7 +20,7 @@ export class TrophyShow extends Laya.Script {
public onSetShow(record: TrophyRecord): void {
for (let i = 0; i < MONTH_LIST.length; i++) {
const obj = MONTH_LIST[i]
if (obj.year == record.year && obj.month == record.month) {
if (obj.year === record.year && obj.month === record.month) {
this.icon.skin = obj.icon_res
break
}