| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc';
- import { UIViewID } from '@scripts/define/UIDefine';
- import { UICloseReason } from '@scripts/framework/ui/UILayer';
- import { addBtnClick } from '@scripts/utils/UIHelper';
- import { AppKernel } from '@scripts/app/AppKernel';
- import { UIPopup } from '@scripts/framework/ui/UIPopup';
- const { ccclass, property } = _decorator;
- @ccclass('ResetPsd')
- export class ResetPsd extends UIPopup {
- readonly viewId = UIViewID.ResetPsd;
- @property(Node)
- private btnClose: Node = null;
- @property(Node)
- private btnReset: Node = null;
- @property(EditBox)
- account: EditBox;
- @property(EditBox)
- code: EditBox;
- @property(EditBox)
- psd: EditBox;
- protected onCreate(): void | Promise<void> {
- addBtnClick(this.btnClose, this.onBtnCloseClick, this);
- addBtnClick(this.btnReset, this.onBtnResetClick, this);
- }
- private onBtnCloseClick() {
- AppKernel.ui.close(UIViewID.ResetPsd);
- const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
- if (loginView && loginView?.enabled) {
- loginView?._googleWebBtn?.setActive(true);
- }
- }
- private onBtnResetClick() {
- const account = this.account.string;
- const code = this.code.string;
- const password = this.psd.string;
- AppKernel.stores.mainStore.reqForgetPass({
- phone: account,
- code,
- newpassword: password,
- })
- }
- }
|