🐞 fix(活动): 新将演绎
This commit is contained in:
@@ -17,6 +17,7 @@ export abstract class ActivityBase {
|
||||
hideDayByServer: number = 0;
|
||||
isEnable: boolean = false;
|
||||
interval: number = 0;
|
||||
beginWithoutHideTime: number = 0;
|
||||
|
||||
roundIndex: number = 0;//周期活动第几个周期,从1开始
|
||||
nextRefreshTime: number = 0;//周期活动下次刷新时间
|
||||
@@ -126,8 +127,14 @@ export abstract class ActivityBase {
|
||||
}
|
||||
}
|
||||
if(activityData.hideDayByServer > 0) {
|
||||
this.beginWithoutHideTime = this.beginTime;
|
||||
let hidOverTime = moment(serverTime * 1000).add(activityData.hideDayByServer, 'd').startOf('d').add(REFRESH_TIME, 'h').valueOf();
|
||||
if(this.beginTime < hidOverTime) this.beginTime = hidOverTime;
|
||||
|
||||
if(activityData.timeType != ACTIVITY_TIME_TYPE.MULT_DATE_TIME) {
|
||||
let startOfBeginDay = moment(this.beginTime).startOf('d').add(REFRESH_TIME, 'h');
|
||||
this.todayIndex = deltaDays(startOfBeginDay.toDate(), new Date) + 1;
|
||||
}
|
||||
}
|
||||
// console.log('活动时间数据...', '活动id:', activityData.activityId, '类型:', activityData.timeType, '开始时间:', this.beginTime, moment(this.beginTime).toDate(),
|
||||
// '结束:', this.endTime, moment(this.endTime).toDate(),
|
||||
|
||||
@@ -42,7 +42,7 @@ export class NewHeroGKData extends ActivityBase {
|
||||
let dataObj: NewHeroGkDataInDb = JSON.parse(data);
|
||||
let arr = dataObj.wars||[];
|
||||
for (let obj of arr) {
|
||||
this.wars.push(new NewHeroGachaWar(obj, this.beginTime))
|
||||
this.wars.push(new NewHeroGachaWar(obj, this.beginWithoutHideTime||this.beginTime))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user