七天乐:升星任务
This commit is contained in:
@@ -88,6 +88,12 @@ export class ThirtyDaysItem {
|
||||
this.taskParamArray = splitString(data.taskParam, '&')
|
||||
}
|
||||
|
||||
public setPlayerRecord(record: ActivityThirtyDaysModelType) {
|
||||
this.isReceive = record.isReceive === true;
|
||||
this.totalCount = record.totalCount ? record.totalCount : 0;
|
||||
this.isComplete = record.totalCount >= this.condition;
|
||||
}
|
||||
|
||||
public canReceive(): boolean {
|
||||
return !this.isReceive;
|
||||
}
|
||||
@@ -215,9 +221,7 @@ export class ThirtyDaysData extends ActivityBase {
|
||||
for (let record of data) {
|
||||
let itemData = this.findThirtyDaysItem(record.pageIndex, record.cellIndex, record.tab)
|
||||
if (itemData) {
|
||||
itemData.isReceive = record.isReceive === true;
|
||||
itemData.totalCount = record.totalCount ? record.totalCount : 0;
|
||||
itemData.isComplete = record.totalCount >= itemData.condition;
|
||||
itemData.setPlayerRecord(record);
|
||||
if (itemData.isReceive) {
|
||||
this.totalPoint += itemData.point;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user