活动:修改显示逻辑
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -55,6 +55,9 @@ export class MonthlyTicketData extends ActivityBase {
|
||||
this.dayIndex = 0;
|
||||
this.endTime = 0;
|
||||
}
|
||||
public canShow() { // 开始结束时间用于判断是否购买了月卡了,所以直接显示
|
||||
return true
|
||||
}
|
||||
|
||||
constructor(activityData: ActivityModelType, createTime: number) {
|
||||
super(activityData, createTime)
|
||||
|
||||
Reference in New Issue
Block a user