using System; using System.Threading.Tasks; using cfg.GfgCfg; using ET; using FairyGUI; using UI.Store; namespace GFGGame { public class StorePayPropView : BaseWindow { private UI_StorePayPropUI _ui; //商品id private int _goodsId; //临时订单id private long _tempOrderId; //订单金额 private long _price; public override void Dispose() { if (_ui != null) { _ui.Dispose(); } _ui = null; base.Dispose(); } protected override void OnHide() { base.OnHide(); } protected override void OnInit() { base.OnInit(); packageName = UI_StorePayPropUI.PACKAGE_NAME; _ui = UI_StorePayPropUI.Create(); this.viewCom = _ui.target; this.viewCom.Center(); this.modal = true; viewAnimationType = EnumViewAnimationType.ZOOM_CENTER; _ui.m_payVxBtn.onClick.Add(OnVxBtnBuyClick); _ui.m_payAliBtn.visible = false; //_ui.m_payAliBtn.onClick.Add(OnAliBtnBuyClick); _ui.m_payClose.visible = false; _ui.m_payClose.onClick.Add(OnCloseClick); } protected override void OnShown() { base.OnShown(); _goodsId = (int)(this.viewData as object[])[0]; _tempOrderId = long.Parse((this.viewData as object[])[1].ToString()); _price = (long)(this.viewData as object[])[2]; ShopCfg cfg = CommonDataManager.Tables.TblShopCfg.GetOrDefault(_goodsId); _ui.m_txtTotal.text = _price + "元"; _ui.m_txtShopName.text = cfg.ProductName; _ui.m_txtXzf.text = _price + "元"; } private async void OnVxBtnBuyClick() { } private async void OnAliBtnBuyClick() { } private async void OnCloseClick() { Hide(); } } }