import { AppKernel } from '@scripts/app/AppKernel'; import { UIViewID } from '@scripts/define/UIDefine'; import { UIView } from '@scripts/framework/ui/UIView'; import { addBtnClick } from '@scripts/utils/UIHelper'; import { _decorator, Button, Component, Node } from 'cc'; const { ccclass, property } = _decorator; import { UIPopup } from '@scripts/framework/ui/UIPopup'; @ccclass('Mail') export class Mail extends UIPopup { readonly viewId: UIViewID = UIViewID.Mail; @property(Node) private btnClose: Node = null; @property(Node) private btnView: Node = null; @property(Node) private btnSubmit: Node = null; // @property(Button) // btnClose: Button; // protected async onBeforeOpen(_params: unknown): Promise { // const mailStore = AppKernel.stores.mailStore; // const res = await mailStore.reqMailList(); // return res; // } // protected onCreate(): void | Promise { // addBtnClick(this.btnClose.node, this.onBtnCloseClick, this); // } // private onBtnCloseClick() { // this.closeSelf(); // } protected onCreate(): void | Promise { // addBtnClick(this.btnClose, this.onBtnCloseClick, this); // addBtnClick(this.btnView, this.onBtnViewClick, this); // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this); // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"]; // this.selectBox?.initSelectItems(selectData); } private onBtnCloseClick() { AppKernel.ui.close(UIViewID.Support); const loginView = AppKernel.ui.get(UIViewID.LoginView) as any; if (loginView && loginView?.enabled) { loginView?._googleWebBtn?.setActive(true); } } private onBtnViewClick() { } private onBtnSubmitClick() { } }