活动:每日物资debug购买

This commit is contained in:
qiaoxin
2021-06-07 14:37:08 +08:00
parent 28b2f0f413
commit 92339f589c
3 changed files with 68 additions and 1 deletions

View File

@@ -92,6 +92,11 @@ export class TreasureHuntShopData {
name: string = '';//页签名字
list: Array<TreasureHuntShopItem> = [];//商品
public findProductID(productID: string): TreasureHuntShopItem {
let index = this.list.findIndex(obj => { return obj && obj.productID === productID })
return (index != -1) ? this.list[index] : null;
}
public getItem(cellIndex: number): TreasureHuntShopItem {
let index = this.list.findIndex(obj => { return obj && obj.cellIndex === cellIndex })
return (index != -1) ? this.list[index] : null;