| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import { _decorator, Component, Node } from 'cc';
- import { oops } from 'db://oops-framework/core/Oops';
- import VMParent from 'db://oops-framework/libs/model-view/VMParent';
- import { UIID } from '../../common/config/GameUIConfig';
- import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
- import { smc } from '../../common/SingletonModuleComp';
- import { Format } from '../../utils/Format';
- import { DCHandler } from '../../common/manager/DCHandler';
- import { ServerHandler } from '../../common/manager/ServerHandler';
- const { ccclass, property } = _decorator;
- @ccclass('ReservePopup')
- export class ReservePopup extends VMParent {
- data: any = {
- nickName: "小白",
- time: "2025-04-28",
- money: 1000,
- goldNum: 10
- }
- start() {
- DCHandler.inst.reportData(3000200);
- this.setButton();
- this.updateData();
- }
- //更新数据
- updateData() {
- if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
- this.data.nickName = smc.account.AccountModel.accountName;
- this.data.money = Format.formatWxCoin(smc.account.AccountModel.wxCoin);
- this.data.goldNum = smc.account.AccountModel.goldCoin;
- //当前时间的后三天,只要年月日
- // this.data.time =
- }
- }
- async btn_confirm() {
- //加载微信转账中
- // await oops.gui.open(UIID.WechaatTransfer);
- oops.gui.remove(UIID.ReservePopup);
- this.updateState();
- }
- updateState() {
- ServerHandler.inst.updatePopupState({
- level: smc.account.AccountModel.curLevel,
- type: smc.game.GameModel.popupType
- })
- }
- }
|