活动:修复限时排行榜

This commit is contained in:
luying
2022-05-18 22:26:48 +08:00
parent 6568be2b92
commit a0db79d0a8
6 changed files with 17 additions and 22 deletions

View File

@@ -61,7 +61,6 @@ export abstract class ActivityBase {
this.endTime = moment(activityData.endTime).add(this.delayDay, 'd').valueOf();
this.todayIndex = deltaDays(moment(this.beginTime).toDate(), new Date) + 1;
this.roundIndex = 1;
this.nextRefreshTime = this.endTime;
this.name = activityData.name;
this.isEnable = activityData.isEnable;
this.interval = activityData.interval * 86400;
@@ -102,6 +101,8 @@ export abstract class ActivityBase {
this.roundIndex = Math.ceil((moment(new Date).valueOf() - this.beginTime) / (activityData.interval * 86400000));
this.nextRefreshTime = moment(this.beginTime).add(activityData.interval * (this.roundIndex - 1), 'day').add(activityData.effectDay, 'd').valueOf();
this.todayIndex = Math.ceil(((moment(new Date).valueOf() - this.beginTime) / (24 * 60 * 60 * 1000)));
} else {
this.nextRefreshTime = this.endTime;
}
if(activityData.hideDayByServer > 0) {
let hidOverTime = moment(serverTime * 1000).add(activityData.hideDayByServer, 'd').startOf('d').add(REFRESH_TIME, 'h').valueOf();