活动:30天任务支持多次重复购买

This commit is contained in:
qiaoxin
2021-06-02 11:20:18 +08:00
parent 58051529ad
commit 91ea547a34
5 changed files with 20 additions and 17 deletions

View File

@@ -18,8 +18,9 @@ export class PopUpShopData {
taskParam: number; // 任务参数
condition: number; // 任务条件
totalCount: number; //一共完成次数
count: number; //最大可购买次数
isBuy: boolean = false; //购买过
buyCount: number = 0; //已经购买过次数
beginTime: Date = null;//开始时间
endTime: Date = null;//结束时间
beginTimeStamp: number = 0;//开始时间
@@ -30,7 +31,7 @@ export class PopUpShopData {
if (!data) {
return;
}
this.isBuy = data.isBuy ? data.isBuy : false;
this.buyCount = data.buyCount ? data.buyCount : 0;
this.beginTime = data.beginTime;
this.endTime = data.endTime;
this.beginTimeStamp = moment(data.beginTime).valueOf();
@@ -52,10 +53,11 @@ export class PopUpShopData {
this.taskType = data.taskType;
this.taskParam = data.taskParam;
this.condition = data.condition;
this.isBuy = false;
this.buyCount = 0;
this.beginTime = null;
this.endTime = null;
this.totalCount = 0;
this.count = data.count;
}
constructor(activityData: any, activityId: number) {