活动:修改活动的时间配置规则

This commit is contained in:
qiaoxin
2021-06-29 20:57:57 +08:00
parent 04d72a1956
commit 5e732e6d05
14 changed files with 174 additions and 112 deletions

View File

@@ -318,14 +318,6 @@ export class SevenDaysData extends ActivityBase {
this.growth = new SevenDaysGrowthData(objData.growth)
this.dailyGift = new SevenDaysDailyGiftsData(objData.dailyGift)
this.dailyChallenge = new SevenDaysDailyChallengesData(objData.dailyChallenge)
if (this.type === ACTIVITY_TYPE.SEVEN_DAY) {
this.todayIndex = deltaDays(moment(SERVER_OPEN_TIME).startOf('d').toDate(), new Date) + 1;
} else if (this.type === ACTIVITY_TYPE.FOURTEEN_DAY) {
this.todayIndex = deltaDays(moment(SERVER_OPEN_TIME).startOf('d').toDate(), new Date) + 1 - 7;
} else if (this.type === ACTIVITY_TYPE.COMMON_SEVEN_DAY) {
}
}
constructor(activityData: ActivityModelType) {