活动:成长活动数据添加字段

This commit is contained in:
qiaoxin
2021-05-19 20:14:12 +08:00
parent a50cf66112
commit c673bd6e97
2 changed files with 17 additions and 16 deletions
@@ -27,6 +27,8 @@ export enum ACTIVITY_TYPE {
MONTHLY_TICKET_2 = 20, // 月卡2(至尊) MONTHLY_TICKET_2 = 20, // 月卡2(至尊)
RECHARGE_MONEY = 21, // 累计充值RMB活动 RECHARGE_MONEY = 21, // 累计充值RMB活动
DAILY_RMB_GIFTS = 22, // 每日特惠RMB购买,一次性购买7天礼包 DAILY_RMB_GIFTS = 22, // 每日特惠RMB购买,一次性购买7天礼包
TREASURE_HUNT = 23, // 寻宝骑兵活动
POP_UP_SHOP = 24, // 弹出商店
} }
/** /**
+15 -16
View File
@@ -13,8 +13,8 @@ export class GrowthItem {
cellIndex: number; // 当天第几行,从1开始 cellIndex: number; // 当天第几行,从1开始
name: string; // 任务名称 name: string; // 任务名称
taskType: number; // 任务类型 dic_zyz_taskType.json taskType: number; // 任务类型 dic_zyz_taskType.json
taskParam: string; //任务数据 dic_zyz_taskType.json taskParam: string; //任务数据 dic_zyz_taskType.jsonT
taskParamArray: Array<number>; //任务数据 dic_zyz_taskType.json condition: number; //任务数据条件 dic_zyz_taskType.jsonT
point: number; // 任务达成获得的奖章数量,只在当前活动中有用,虚拟 point: number; // 任务达成获得的奖章数量,只在当前活动中有用,虚拟
reward: string; // 任务奖励,格式:1&3&1(类型&id&数量) 类型定义:1.英雄,2.物品 reward: string; // 任务奖励,格式:1&3&1(类型&id&数量) 类型定义:1.英雄,2.物品
consumePoint: number; // 奖章兑换奖品,需要消耗的奖章个数 consumePoint: number; // 奖章兑换奖品,需要消耗的奖章个数
@@ -31,12 +31,11 @@ export class GrowthItem {
this.name = data.name; this.name = data.name;
this.taskType = data.taskType; this.taskType = data.taskType;
this.taskParam = data.taskParam; this.taskParam = data.taskParam;
this.condition = data.condition;
this.point = data.point; this.point = data.point;
this.reward = data.reward; this.reward = data.reward;
this.consumePoint = data.consumePoint; this.consumePoint = data.consumePoint;
this.pointReward = data.pointReward; this.pointReward = data.pointReward;
this.taskParamArray = splitString(data.taskParam, '&')
} }
public heroReward(): CreateHeroParam[] { public heroReward(): CreateHeroParam[] {
@@ -67,40 +66,40 @@ export class GrowthItem {
let complete = false; let complete = false;
switch (this.taskType) { switch (this.taskType) {
case TASK_TYPE.ROLE_LV: case TASK_TYPE.ROLE_LV:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.GUILD_JOIN: case TASK_TYPE.GUILD_JOIN:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.LOGIN_SUM: case TASK_TYPE.LOGIN_SUM:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.HERO_NUM: case TASK_TYPE.HERO_NUM:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.ROLE_TITLE: case TASK_TYPE.ROLE_TITLE:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.GASHA: case TASK_TYPE.GASHA:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.EQUIP_STRENGTHEN: case TASK_TYPE.EQUIP_STRENGTHEN:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.BATTLE_MAIN: case TASK_TYPE.BATTLE_MAIN:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.EQUIP_JEWEL_SUM: case TASK_TYPE.EQUIP_JEWEL_SUM:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.GUILD_TRAIN: case TASK_TYPE.GUILD_TRAIN:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.ROLE_SCHOOL_PUT_HERO: case TASK_TYPE.ROLE_SCHOOL_PUT_HERO:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
case TASK_TYPE.GUILD_ACTIVITY: case TASK_TYPE.GUILD_ACTIVITY:
complete = this.totalCount >= this.taskParamArray[0]; complete = this.totalCount >= this.condition;
break; break;
default: default:
complete = false; complete = false;