活动:成长活动、今日挑战奖励接口返回数据添加字段

This commit is contained in:
qiaoxin
2021-05-20 17:16:01 +08:00
parent 14acc426a0
commit afc95d2e19
10 changed files with 119 additions and 158 deletions

View File

@@ -59,7 +59,7 @@ export class GrowthItem {
}
public canReceive(): boolean {
return this.receiveRewardCount != 0;
return this.receiveRewardCount == 0;
}
public isComplete(): boolean {
@@ -140,8 +140,8 @@ export class GrowthData extends ActivityBase {
for (let obj of this.list) {
let index = data.findIndex(record => { return obj.dayIndex == record.dayIndex && obj.cellIndex == record.cellIndex })
if (index != -1) {
obj.totalCount = data[index].totalCount;
obj.receiveRewardCount = data[index].receiveRewardCount;
obj.totalCount = data[index].totalCount ? data[index].totalCount : 0;
obj.receiveRewardCount = data[index].receiveRewardCount ? data[index].receiveRewardCount : 0;
obj.addPointCount = data[index].addPointCount ? data[index].addPointCount : 0;
obj.getPointReward = data[index].getPointReward ? data[index].getPointReward : false;
this.totalPoint += obj.addPointCount;