bug fix: 生成日历优化

This commit is contained in:
CounterFire2023 2024-04-17 15:20:57 +08:00
parent b0e76587ff
commit 7f3002fd62

View File

@ -51,8 +51,12 @@ export default {
while(beginTime <= endTime) {
let current = i * ONE_DAY + this.activityData.startTime
beginTime = new Date(current)
if (beginTime > endTime) {
break
}
const day = formatDate(beginTime)
const type = current < now ? -1 : 0
this.current.push({day: formatDate(new Date(current)), type, time: current, index: i + 1})
this.current.push({day, type, time: current, index: i + 1})
i++
}
this.getCheckInit()