活动:七天乐特惠礼包类型
This commit is contained in:
@@ -15,7 +15,8 @@ export class DailyGiftItem {
|
||||
name: string; // 名称
|
||||
consume: string; // 购买的资源数据; 格式:type:id:count, type:ACTIVITY_RESOURCES_TYPE;RMB时id无效
|
||||
reward: string; // 任务奖励,格式:1&3&1(类型&id&数量) 类型定义:1.英雄,2.物品
|
||||
maxCount: number = 0; //最大可购买次数
|
||||
maxCount: number = 1; //最大可购买次数
|
||||
discount: number = 0;// 商品显示的折扣
|
||||
|
||||
buyCount: number = 0; //购买次数
|
||||
|
||||
@@ -25,7 +26,7 @@ export class DailyGiftItem {
|
||||
this.name = data.name;
|
||||
this.consume = data.consume;
|
||||
this.reward = data.reward;
|
||||
this.maxCount = data.maxCount;
|
||||
this.discount = data.discount;
|
||||
}
|
||||
|
||||
//消耗的资源
|
||||
@@ -81,7 +82,10 @@ export class DailyGiftsData extends ActivityBase {
|
||||
}
|
||||
|
||||
public initData(data: string) {
|
||||
let arr = JSON.parse(data);
|
||||
let dataObj = JSON.parse(data);
|
||||
|
||||
let arr = dataObj;
|
||||
|
||||
for (let obj of arr) {
|
||||
this.list.push(new DailyGiftItem(obj))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user