MailDetail.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { AppKernel } from '@scripts/app/AppKernel';
  2. import { UIViewID } from '@scripts/define/UIDefine';
  3. import { UIView } from '@scripts/framework/ui/UIView';
  4. import { addBtnClick } from '@scripts/utils/UIHelper';
  5. import { _decorator, Button, Component, Node } from 'cc';
  6. const { ccclass, property } = _decorator;
  7. import { UIPopup } from '@scripts/framework/ui/UIPopup';
  8. @ccclass('MailDetail')
  9. export class MailDetail extends UIPopup {
  10. readonly viewId: UIViewID = UIViewID.MailDetail;
  11. @property(Node)
  12. private btnClose: Node = null;
  13. @property(Node)
  14. private btnView: Node = null;
  15. @property(Node)
  16. private btnSubmit: Node = null;
  17. // @property(Button)
  18. // btnClose: Button;
  19. // protected async onBeforeOpen(_params: unknown): Promise<boolean> {
  20. // const mailStore = AppKernel.stores.mailStore;
  21. // const res = await mailStore.reqMailList();
  22. // return res;
  23. // }
  24. // protected onCreate(): void | Promise<void> {
  25. // addBtnClick(this.btnClose.node, this.onBtnCloseClick, this);
  26. // }
  27. // private onBtnCloseClick() {
  28. // this.closeSelf();
  29. // }
  30. protected onCreate(): void | Promise<void> {
  31. // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
  32. // addBtnClick(this.btnView, this.onBtnViewClick, this);
  33. // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
  34. // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
  35. // this.selectBox?.initSelectItems(selectData);
  36. }
  37. private onBtnCloseClick() {
  38. AppKernel.ui.close(UIViewID.Support);
  39. const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
  40. if (loginView && loginView?.enabled) {
  41. loginView?._googleWebBtn?.setActive(true);
  42. }
  43. }
  44. private onBtnViewClick() {
  45. }
  46. private onBtnSubmitClick() {
  47. }
  48. }