活动:修改计算公式
This commit is contained in:
@@ -68,7 +68,7 @@ export abstract class ActivityBase {
|
||||
if (activityData.interval > 0) {
|
||||
this.roundIndex = Math.ceil((moment(new Date).valueOf() - this.beginTime) / (activityData.interval * 1000));
|
||||
this.nextRefreshTime = moment(this.beginTime).add(activityData.interval * this.roundIndex, 'second').valueOf();
|
||||
this.todayIndex = Math.ceil(((moment(new Date).valueOf() - this.beginTime) % (activityData.interval * 1000)) / (24 * 60 * 60 * 1000));
|
||||
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(),
|
||||
|
||||
Reference in New Issue
Block a user