活动:添加rmb活动类型判断
This commit is contained in:
@@ -63,16 +63,19 @@ export class SignInData extends ActivityBase {
|
||||
}
|
||||
|
||||
//解析玩家签到记录
|
||||
public setPlayerRecords(data: ActivitySignInModelType[]) {
|
||||
public setPlayerRecords(data: ActivitySignInModelType) {
|
||||
this.isVip = false;
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
let records = data.records ? data.records : [];
|
||||
for (let obj of this.list) {
|
||||
let index = data.findIndex(record => { return obj.dayIndex == record.dayIndex })
|
||||
let index = records.findIndex(record => { return obj.dayIndex == record.dayIndex })
|
||||
if (index != -1) {
|
||||
obj.isReceive = data[index].isReceive;
|
||||
obj.isReceive = true;
|
||||
}
|
||||
}
|
||||
|
||||
let isBuy = data.findIndex(obj => { return obj.dayIndex == 0 });
|
||||
this.isVip = (isBuy != -1)
|
||||
this.isVip = true
|
||||
}
|
||||
|
||||
public initData(data: string) {
|
||||
|
||||
Reference in New Issue
Block a user