活动:修改显示逻辑

This commit is contained in:
luying
2022-01-24 17:20:22 +08:00
parent 42ca899e70
commit 685e9779e2
6 changed files with 17 additions and 4 deletions

View File

@@ -22,6 +22,10 @@ export abstract class ActivityBase {
return this.todayIndex;
}
public canShow() {
return this.beginTime <= Date.now() && this.endTime >= Date.now()
}
constructor(activityData: ActivityModelType, createTime: number) {
this.activityId = activityData.activityId;
this.delayDay = activityData.delayDay ? activityData.delayDay : 0;