活动:每日物资debug购买
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user