活动:弹出商店结算奖励修改
This commit is contained in:
@@ -356,6 +356,9 @@ export const STATUS = {
|
||||
ACTIVITY_RECHARGE_MONEY_NO_REWARD: { code: 50019, simStr: '没有可领取的奖励' },
|
||||
ACTIVITY_SIGNIN_VIP_CONDITION: { code: 50020, simStr: '开启条件不足' },
|
||||
ACTIVITY_SIGNIN_EXPIRE: { code: 50021, simStr: '签到过期,补签' },
|
||||
ACTIVITY_POP_UP_SHOP_EXPIRE: { code: 50022, simStr: '弹出商店过期' },
|
||||
ACTIVITY_NEED_PAY: { code: 50023, simStr: '客户端调错接口了' },
|
||||
ACTIVITY_GOLD_RESOURCE: { code: 50024, simStr: '元宝资源' },
|
||||
// GM后台相关状态 60000 - 69999
|
||||
GM_ERR_PASSWORD: { code: 60001, simStr: '账号或密码错误' },
|
||||
GM_MISS_API: { code: 60002, simStr: '未找到该接口' },
|
||||
|
||||
@@ -7,6 +7,8 @@ import { ActivityBase } from './activityField';
|
||||
// 商品数据
|
||||
export class PopUpShopItem {
|
||||
id: number; // 第几个,从1开始
|
||||
consume: string; //消耗资源(这里优先rmb的price价格,其次资源消耗)
|
||||
price: number; // 商品价格
|
||||
productID: string; // 商品id支付时使用
|
||||
reward: string; //任务奖励,格式:1&3&1(类型&id&数量) 类型定义:1.英雄,2.物品
|
||||
countMax: number = 0; //可购买的最大次数,0表示不限制
|
||||
@@ -18,7 +20,9 @@ export class PopUpShopItem {
|
||||
this.id = data.id;
|
||||
this.reward = data.reward;
|
||||
this.countMax = data.countMax;
|
||||
this.productID = data.productID;
|
||||
this.consume = data.consume ? data.consume : '';
|
||||
this.price = data.price ? data.price : 0;
|
||||
this.productID = data.productID ? data.productID : '';
|
||||
this.name = data.name;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +33,10 @@ export class PopUpShopData {
|
||||
taskId: number = 0;//id
|
||||
list: Array<PopUpShopItem> = [];//每件商品信息
|
||||
|
||||
public findItemByProductID(productID: string) {
|
||||
let index = this.list.findIndex(obj => { return obj && obj.productID === productID });
|
||||
return (index != -1) ? this.list[index] : null
|
||||
}
|
||||
|
||||
public findItem(id: number) {
|
||||
let index = this.list.findIndex(obj => { return obj && obj.id === id });
|
||||
|
||||
Reference in New Issue
Block a user