PayShopView.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import ViewObject from "../../main/ViewObject";
  2. import FqPay from "../../pay/FqPay";
  3. import PayShopItem from "./PayShopItem";
  4. /**
  5. * 充值商店
  6. */
  7. const {ccclass, property} = cc._decorator;
  8. @ccclass
  9. export default class PayShopView extends ViewObject {
  10. @property(cc.Node)
  11. mContent: cc.Node = null;
  12. @property(cc.Prefab)
  13. mPayItem: cc.Prefab = null;
  14. public init(){
  15. // let gaveData = this.main.player.firstPayGave;
  16. // // let gaveData = [1001,1002,1003];
  17. // let _payDatas = this.main.sManage.payDatas
  18. // for (let i = 0; i < _payDatas.length; i++) {
  19. // const element = _payDatas[i];
  20. // let node = cc.instantiate(this.mPayItem)
  21. // node.parent = this.mContent
  22. // let payItem = node.getComponent(PayShopItem)
  23. // payItem.init(element, gaveData)
  24. // payItem.setCallback((item:PayShopItem)=>{
  25. // let fqPay:FqPay = new FqPay(this.main)
  26. // fqPay.pay(item._payData,()=>{
  27. // })
  28. // })
  29. // }
  30. }
  31. }