活动:新手签到持续天数改用配置

This commit is contained in:
qiaoxin
2021-06-09 11:47:56 +08:00
parent f64bd7bdd2
commit 0ec8067c2d
3 changed files with 23 additions and 20 deletions
@@ -113,5 +113,3 @@ export const DAILYRMBGIFTS_DAYS = 7;//一次性购买*天
export const SIGNIN_OPEN = 1;//*号0点开启
export const SIGNIN_CLOSE = 31;//*号晚上24点结束
//新手签到活动持续天数
export const NEW_PLAYER_SIGIN_DAYS = 8;//持续8天
@@ -34,6 +34,7 @@ export class SignInData extends ActivityBase {
isVip: boolean = false;//是否购买了当前的vip活动
startDate: number = 1;//月卡开启
endDate: number = 30;//月卡关闭
days: number = 8;//新手签到使用,持续的天数
//第几天的签到奖励
public findDayItem(dayIndex: number) {
@@ -75,6 +76,8 @@ export class SignInData extends ActivityBase {
this.startDate = dataObj.startDate ? dataObj.startDate : SIGNIN_OPEN;
this.endDate = dataObj.endDate ? dataObj.endDate : SIGNIN_CLOSE;
this.days = dataObj.days ? dataObj.days : 0;
let date = new Date();
this.beginTime = moment(date.setDate(this.startDate)).startOf('day').add(REFRESH_TIME, 'h').valueOf();
this.endTime = moment(date.setDate(this.endDate)).endOf('day').add(REFRESH_TIME, 'h').valueOf();