活动:重写七天乐活动的数据结构

This commit is contained in:
qiaoxin
2021-06-04 11:54:47 +08:00
parent f77de8eb78
commit d6134ce67e
12 changed files with 852 additions and 110 deletions

View File

@@ -64,7 +64,7 @@ export class SignInData extends ActivityBase {
this.endTime = moment(endTime).valueOf();
this.roundIndex = 1;
let date = new Date();
this.todayIndex = Math.ceil((moment(date).valueOf() - this.beginTime) / 24 * 60 * 60 * 1000);
this.todayIndex = Math.ceil((moment(date).valueOf() - this.beginTime) / (24 * 60 * 60 * 1000));
}
public initData(data: string) {
@@ -83,7 +83,7 @@ export class SignInData extends ActivityBase {
if (this.type === ACTIVITY_TYPE.NEW_PLAYER_SIGN_IN) {
this.roundIndex = 1;
}
this.todayIndex = Math.ceil((moment(date).valueOf() - this.beginTime) / 24 * 60 * 60 * 1000);
this.todayIndex = Math.ceil((moment(date).valueOf() - this.beginTime) / (24 * 60 * 60 * 1000));
let arr = dataObj.data
for (let obj of arr) {