feat(活动): 添加两种密卷 ed96aa4ac

This commit is contained in:
luying
2023-09-05 16:47:33 +08:00
parent 0b96397e80
commit 0e11635c5e
14 changed files with 167 additions and 17 deletions

View File

@@ -9,6 +9,7 @@ interface AuthorGachaDataInDb {
box: {
count: number; // 次数
rewards: string; // type&id&count, type: 1-武将 2-道具 3-礼包
isSpecial: boolean; // 重要节点奖励标记
hasReceived?: boolean; // 是否获得
}[];
}
@@ -45,10 +46,10 @@ export class AuthorGachaData extends ActivityBase {
public getShowResult() {
let box: AuthorGachaDataInDb['box'] = [];
for (let { count, rewards } of this.box) {
for (let { count, rewards, isSpecial = false } of this.box) {
let hasReceived = false;
if (this.record.indexOf(count) != -1) hasReceived = true;
box.push({ count, rewards, hasReceived })
box.push({ count, rewards, hasReceived, isSpecial })
}
return {

View File

@@ -95,6 +95,22 @@ export class GrowthFundData extends ActivityBase {
}
break;
}
case ACTIVITY_TYPE.GROWTH_FUND_ROUGE:
case ACTIVITY_TYPE.GROWTH_FUND_ROUGE_VIP: {
if (!this.isReceive(page.pageIndex, item.cellIndex) && item.taskParamArray[0] == condition) {
item.isComplete = true;
items.push(Object.assign(item, { pageIndex: page.pageIndex, activityId: this.activityId }))
}
break;
}
case ACTIVITY_TYPE.GROWTH_FUND_AUTHOR:
case ACTIVITY_TYPE.GROWTH_FUND_AUTHOR_VIP: {
if (!this.isReceive(page.pageIndex, item.cellIndex) && item.taskParamArray[0] <= condition) {
item.isComplete = true;
items.push(Object.assign(item, { pageIndex: page.pageIndex, activityId: this.activityId }))
}
break;
}
}
}
}
@@ -111,6 +127,8 @@ export class GrowthFundData extends ActivityBase {
return this.type == ACTIVITY_TYPE.GROWTH_FUND_MAIN_VIP
|| this.type == ACTIVITY_TYPE.GROWTH_FUND_TOWER_VIP
|| this.type == ACTIVITY_TYPE.GROWTH_FUND_MAIN_ELITE_VIP
|| this.type == ACTIVITY_TYPE.GROWTH_FUND_ROUGE_VIP
|| this.type == ACTIVITY_TYPE.GROWTH_FUND_AUTHOR_VIP
}
//是否购买page

View File

@@ -65,6 +65,8 @@ export class TaskParamInter {
score?: number; // 小游戏得分
step?: number; // 步数
gameType?: number; // 小游戏类型
rougeId?:number; //学宫
authorProgress?:number; // 列传
};
export class TaskParam extends TaskParamInter {