活动:寻宝骑兵活动固定关卡id

This commit is contained in:
luying
2022-04-15 13:55:47 +08:00
parent 19a448a578
commit 629af03645
4 changed files with 59 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import { ActivityTreasureHuntTreasureShopModelType } from '../../db/ActivityTrea
import { ActivityTreasureHuntFirstPageModelType } from '../../db/ActivityTreasureHuntFirstPage';
import { parseNumberList, splitString } from '../../pubUtils/util';
import { ActivityBase } from './activityField';
import { ActivityTreasureHuntChallengeModelTypeParam } from '../../db/ActivityTreasureHuntChallenge';
// 进入活动首页的数据
@@ -216,6 +217,8 @@ export class TreasureHuntChallengeData {
jackpotReward: string = '';//客户端显示奖励
imageName: string = '';
resultWarId: number = 0; // 玩家随机出的关卡id
public randomGK() {
let gkArray = splitString(this.warid, '&');
let index = random(gkArray.length - 1);
@@ -232,6 +235,12 @@ export class TreasureHuntChallengeData {
this.imageName = data.imageName;
}
public setChallengeRecord(record: ActivityTreasureHuntChallengeModelTypeParam) {
if(record) {
this.resultWarId = record.warId;
}
}
constructor(data: any) {
this.initData(data)
}