StorePayPropView.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Threading.Tasks;
  3. using cfg.GfgCfg;
  4. using ET;
  5. using FairyGUI;
  6. using UI.Store;
  7. namespace GFGGame
  8. {
  9. public class StorePayPropView : BaseWindow
  10. {
  11. private UI_StorePayPropUI _ui;
  12. //商品id
  13. private int _goodsId;
  14. //临时订单id
  15. private long _tempOrderId;
  16. //订单金额
  17. private long _price;
  18. public override void Dispose()
  19. {
  20. if (_ui != null)
  21. {
  22. _ui.Dispose();
  23. }
  24. _ui = null;
  25. base.Dispose();
  26. }
  27. protected override void OnHide()
  28. {
  29. base.OnHide();
  30. }
  31. protected override void OnInit()
  32. {
  33. base.OnInit();
  34. packageName = UI_StorePayPropUI.PACKAGE_NAME;
  35. _ui = UI_StorePayPropUI.Create();
  36. this.viewCom = _ui.target;
  37. this.viewCom.Center();
  38. this.modal = true;
  39. viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
  40. _ui.m_payVxBtn.onClick.Add(OnVxBtnBuyClick);
  41. _ui.m_payAliBtn.visible = false;
  42. //_ui.m_payAliBtn.onClick.Add(OnAliBtnBuyClick);
  43. _ui.m_payClose.visible = false;
  44. _ui.m_payClose.onClick.Add(OnCloseClick);
  45. }
  46. protected override void OnShown()
  47. {
  48. base.OnShown();
  49. _goodsId = (int)(this.viewData as object[])[0];
  50. _tempOrderId = long.Parse((this.viewData as object[])[1].ToString());
  51. _price = (long)(this.viewData as object[])[2];
  52. ShopCfg cfg = CommonDataManager.Tables.TblShopCfg.GetOrDefault(_goodsId);
  53. _ui.m_txtTotal.text = _price + "元";
  54. _ui.m_txtShopName.text = cfg.ProductName;
  55. _ui.m_txtXzf.text = _price + "元";
  56. }
  57. private async void OnVxBtnBuyClick()
  58. {
  59. }
  60. private async void OnAliBtnBuyClick()
  61. {
  62. }
  63. private async void OnCloseClick()
  64. {
  65. Hide();
  66. }
  67. }
  68. }