充值:添加充值前检查
This commit is contained in:
@@ -114,6 +114,12 @@ export class PopUpShopData extends ActivityBase {
|
||||
return new PopUpShopShow(this);
|
||||
}
|
||||
|
||||
public checkItem(data: ActivityPopUpShopModelType, productID: string) {
|
||||
let pkg = this.findPackageById(data.id);
|
||||
let item = pkg.findItemByProductID(productID);
|
||||
return item.hasBoughtCnt < item.buyCnt;
|
||||
}
|
||||
|
||||
public updateRecord(data: ActivityPopUpShopModelType, productID: string) {
|
||||
let pkg = this.findPackageById(data.id);
|
||||
let dataItem = data.items.find(cur => cur.productID == productID);
|
||||
|
||||
Reference in New Issue
Block a user