活动:礼包商店添加刷新判断
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import moment = require('moment');
|
||||
import { ActivityModelType } from '../../db/Activity';
|
||||
import { deltaDays } from '../../pubUtils/util';
|
||||
|
||||
// 活动数据
|
||||
export abstract class ActivityBase {
|
||||
activityId: number = 0;
|
||||
beginTime: Date = null;
|
||||
endTime: Date = null;
|
||||
beginTime: number = 0;
|
||||
endTime: number = 0;
|
||||
type: number = 0;
|
||||
todayIndex: number = 0;//从1开始
|
||||
|
||||
@@ -18,8 +19,8 @@ export abstract class ActivityBase {
|
||||
|
||||
constructor(activityData: ActivityModelType) {
|
||||
this.activityId = activityData.activityId;
|
||||
this.beginTime = activityData.beginTime;
|
||||
this.endTime = activityData.endTime;
|
||||
this.beginTime = moment(activityData.beginTime).valueOf();
|
||||
this.endTime = moment(activityData.endTime).valueOf();
|
||||
this.type = activityData.type;
|
||||
// this.data = activityData.data;
|
||||
this.todayIndex = deltaDays(activityData.beginTime, new Date) + 1;
|
||||
|
||||
Reference in New Issue
Block a user