活动:删除多余代码

This commit is contained in:
qiaoxin
2021-05-28 15:23:16 +08:00
parent 750ebd7232
commit 480f8458f8
12 changed files with 24 additions and 158 deletions

View File

@@ -1,3 +1,4 @@
import moment = require('moment');
import { FIRST_GIFT_STATE } from '../../consts';
import { ActivityModelType } from '../../db/Activity';
import { ActivityFirstGiftModelType } from '../../db/ActivityFirstGift';
@@ -57,7 +58,7 @@ export class FirstGiftData extends ActivityBase {
if (!data) {
return;
}
this.todayIndex = deltaDays(data.createdAt, new Date) + 1;
this.todayIndex = deltaDays(moment(data.createdAt).startOf('d').toDate(), new Date) + 1;
this.state = FIRST_GIFT_STATE.OPEN
let daysNum = data.days ? data.days : [];