活动:修复更新

This commit is contained in:
luying
2021-12-24 10:56:32 +08:00
parent 680f5d2cef
commit 7110b6c3a1
3 changed files with 21 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ export abstract class ActivityBase {
this.type = activityData.type;
// console.log('今天是活动第几天', activityData.beginTime, new Date, this.todayIndex)
console.log('***** activityData', activityData.timeType)
switch (activityData.timeType) {
case ACTIVITY_TIME_TYPE.SERVER_OPEN_TIME: {
this.beginTime = moment(SERVER_OPEN_TIME).add(this.delayDay, 'd').startOf('d').add(REFRESH_TIME, 'h').valueOf();
@@ -70,8 +71,8 @@ export abstract class ActivityBase {
this.nextRefreshTime = moment(this.beginTime).add(activityData.interval * this.roundIndex, 'second').valueOf();
this.todayIndex = Math.ceil(((moment(new Date).valueOf() - this.beginTime) / (24 * 60 * 60 * 1000)));
}
// console.log('活动时间数据...', '活动id:', activityData.activityId, '类型:', activityData.timeType, '开始时间:', this.beginTime, moment(this.beginTime).toDate(),
// '结束:', this.endTime, moment(this.endTime).toDate(),
// '今天第几天:', this.todayIndex, '回合:', this.roundIndex, '下次刷新:', this.nextRefreshTime, moment(this.nextRefreshTime).toDate())
console.log('活动时间数据...', '活动id:', activityData.activityId, '类型:', activityData.timeType, '开始时间:', this.beginTime, moment(this.beginTime).toDate(),
'结束:', this.endTime, moment(this.endTime).toDate(),
'今天第几天:', this.todayIndex, '回合:', this.roundIndex, '下次刷新:', this.nextRefreshTime, moment(this.nextRefreshTime).toDate())
}
}