Browse Source

【优化】完善弹窗展示流程

mojunshou 9 months ago
parent
commit
ee5cc0b920

+ 2 - 2
assets/script/game/view/EliminateViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:01:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 16:48:29
+ * @LastEditTime: 2025-04-19 16:58:13
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -2185,7 +2185,7 @@ export class EliminateViewComp extends CCComp {
 
     //===============初始化检查是否要打开福利界面====
     private updateWelfarePoint() {
-        this.popupType = "weal_3";
+        // this.popupType = "weal_3";
         switch (this.popupType) {
             case "weal_1":
                 // this.btn_warmReminder();

+ 18 - 2
assets/script/game/view/popup/ReservePopup.ts

@@ -2,6 +2,9 @@ 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';
 const { ccclass, property } = _decorator;
 
 @ccclass('ReservePopup')
@@ -18,15 +21,28 @@ export class ReservePopup extends VMParent {
 
     start() {
         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);
-
-
     }
 }
 

+ 8 - 4
assets/script/game/view/popup/WechatTransfer.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-19 11:34:46
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 14:39:08
+ * @LastEditTime: 2025-04-19 17:00:16
  * @Description: 微信转账中界面
  */
 import { _decorator, Component, Node, Animation } from 'cc';
@@ -11,6 +11,7 @@ import { smc } from '../../common/SingletonModuleComp';
 import { oops } from 'db://oops-framework/core/Oops';
 import { UIID } from '../../common/config/GameUIConfig';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
+import { Format } from '../../utils/Format';
 const { ccclass, property } = _decorator;
 
 @ccclass('WechatTransfer')
@@ -45,14 +46,17 @@ export class WechatTransfer extends VMParent {
         this.setButton();
         this.showNode1.active = true;
         this.showNode2.active = false;
-        this.data.gameName = oops.config.game.gameName
+        this.data.gameName = oops.config.game.gameName;
+        this.updateData();
     }
 
     //设置数据
     updateData() {
         if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
-            this.data.money = smc.account.AccountModel.wxCoin;
-            this.data.cost = smc.game.GameModel.handlingCharge;
+            this.data.money = Format.formatWxCoin(smc.account.AccountModel.wxCoin);
+            this.data.cost = smc.game.GameModel.costInfo.handlingCharge;
+            this.data.creditNum = smc.game.GameModel.costInfo.giftNum;
+            this.data.differ = smc.game.GameModel.costInfo.handlingCharge - smc.game.GameModel.costInfo.giftNum;
         }
     }