Ver código fonte

【功能】完成福利一,福利2,福利3的界面接入

mojunshou 1 ano atrás
pai
commit
bcb83f4925
26 arquivos alterados com 7596 adições e 1031 exclusões
  1. 1209 0
      assets/bundle/gui/eliminate/prefab/item/loadBricsItem.prefab
  2. 2 2
      assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawProgress.prefab.meta
  3. 270 338
      assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawProgress.prefab
  4. 13 0
      assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawBar.prefab.meta
  5. 461 207
      assets/bundle/gui/eliminate/prefab/popup/NextGoalPopup.prefab
  6. 1 1
      assets/bundle/gui/eliminate/prefab/popup/NextGoalPopup.prefab.meta
  7. 1 1
      assets/bundle/gui/eliminate/prefab/popup/UnlockFunction.prefab
  8. 2715 192
      assets/bundle/gui/eliminate/prefab/popup/WelfareTwo.prefab
  9. 2 2
      assets/bundle/gui/eliminate/prefab/popup/wechatTransferring.prefab
  10. 2165 187
      assets/bundle/gui/eliminate/prefab/popup/welfareOne.prefab
  11. BIN
      assets/bundle/gui/eliminate/texture/icon_state5.png
  12. 134 0
      assets/bundle/gui/eliminate/texture/icon_state5.png.meta
  13. BIN
      assets/bundle/gui/eliminate/texture/icon_vector2.png
  14. 134 0
      assets/bundle/gui/eliminate/texture/icon_vector2.png.meta
  15. 4 1
      assets/script/game/common/manager/ProtocolEvent.ts
  16. 36 14
      assets/script/game/common/manager/ServerHandler.ts
  17. 35 3
      assets/script/game/model/GameModelComp.ts
  18. 1 3
      assets/script/game/view/BricsItem.ts
  19. 1 3
      assets/script/game/view/DoubleRewardsView.ts
  20. 59 68
      assets/script/game/view/EliminateViewComp.ts
  21. 59 0
      assets/script/game/view/LoadBricsItem.ts
  22. 1 0
      assets/script/game/view/LoadBricsItem.ts.meta
  23. 5 2
      assets/script/game/view/popup/WechatTransfer.ts
  24. 135 7
      assets/script/game/view/popup/WelfareOne.ts
  25. 144 0
      assets/script/game/view/popup/WelfareTwo.ts
  26. 9 0
      assets/script/game/view/popup/WelfareTwo.ts.meta

Diferenças do arquivo suprimidas por serem muito extensas
+ 1209 - 0
assets/bundle/gui/eliminate/prefab/item/loadBricsItem.prefab


+ 2 - 2
assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawProgress.prefab.meta

@@ -2,12 +2,12 @@
   "ver": "1.1.50",
   "importer": "prefab",
   "imported": true,
-  "uuid": "926e468c-3eb5-4711-a6c8-53c1701c19b8",
+  "uuid": "3c14d072-729f-4146-b9ed-ba66ec21aaaf",
   "files": [
     ".json"
   ],
   "subMetas": {},
   "userData": {
-    "syncNodeName": "AutoWithdrawProgress"
+    "syncNodeName": "loadBricsItem"
   }
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 270 - 338
assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawProgress.prefab


+ 13 - 0
assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawBar.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.50",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "3ea00f9c-fc73-4333-b02d-17a02d91aa77",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "AutoWithdrawBar"
+  }
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 461 - 207
assets/bundle/gui/eliminate/prefab/popup/NextGoalPopup.prefab


+ 1 - 1
assets/bundle/gui/eliminate/prefab/popup/NextGoalPopup.prefab.meta

@@ -2,7 +2,7 @@
   "ver": "1.1.50",
   "importer": "prefab",
   "imported": true,
-  "uuid": "30e56a4e-2d2d-4a8a-8634-791e9d0c164c",
+  "uuid": "926e468c-3eb5-4711-a6c8-53c1701c19b8",
   "files": [
     ".json"
   ],

+ 1 - 1
assets/bundle/gui/eliminate/prefab/popup/UnlockFunction.prefab

@@ -481,7 +481,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "btn_close",
+    "_name": "btn_confirm",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {

Diferenças do arquivo suprimidas por serem muito extensas
+ 2715 - 192
assets/bundle/gui/eliminate/prefab/popup/WelfareTwo.prefab


+ 2 - 2
assets/bundle/gui/eliminate/prefab/popup/wechatTransferring.prefab

@@ -226,7 +226,7 @@
         "__id__": 13
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 236
@@ -4046,7 +4046,7 @@
   {
     "__type__": "cc.Node",
     "_name": "Label",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 219

Diferenças do arquivo suprimidas por serem muito extensas
+ 2165 - 187
assets/bundle/gui/eliminate/prefab/popup/welfareOne.prefab


BIN
assets/bundle/gui/eliminate/texture/icon_state5.png


+ 134 - 0
assets/bundle/gui/eliminate/texture/icon_state5.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "35dcb6de-1180-4c6a-b6df-220b407e2edc",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "35dcb6de-1180-4c6a-b6df-220b407e2edc@6c48a",
+      "displayName": "icon_state5",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "35dcb6de-1180-4c6a-b6df-220b407e2edc",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "35dcb6de-1180-4c6a-b6df-220b407e2edc@f9941",
+      "displayName": "icon_state5",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 100,
+        "height": 50,
+        "rawWidth": 100,
+        "rawHeight": 50,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -50,
+            -25,
+            0,
+            50,
+            -25,
+            0,
+            -50,
+            25,
+            0,
+            50,
+            25,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            50,
+            100,
+            50,
+            0,
+            0,
+            100,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -50,
+            -25,
+            0
+          ],
+          "maxPos": [
+            50,
+            25,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "35dcb6de-1180-4c6a-b6df-220b407e2edc@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "35dcb6de-1180-4c6a-b6df-220b407e2edc@6c48a"
+  }
+}

BIN
assets/bundle/gui/eliminate/texture/icon_vector2.png


+ 134 - 0
assets/bundle/gui/eliminate/texture/icon_vector2.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "e3b7d120-4d65-4bb6-849d-3a887ac5886c",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "e3b7d120-4d65-4bb6-849d-3a887ac5886c@6c48a",
+      "displayName": "icon_vector2",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "e3b7d120-4d65-4bb6-849d-3a887ac5886c",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "e3b7d120-4d65-4bb6-849d-3a887ac5886c@f9941",
+      "displayName": "icon_vector2",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 2,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 188,
+        "height": 174,
+        "rawWidth": 188,
+        "rawHeight": 178,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -94,
+            -87,
+            0,
+            94,
+            -87,
+            0,
+            -94,
+            87,
+            0,
+            94,
+            87,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            178,
+            188,
+            178,
+            0,
+            4,
+            188,
+            4
+          ],
+          "nuv": [
+            0,
+            0.02247191011235955,
+            1,
+            0.02247191011235955,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -94,
+            -87,
+            0
+          ],
+          "maxPos": [
+            94,
+            87,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "e3b7d120-4d65-4bb6-849d-3a887ac5886c@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "e3b7d120-4d65-4bb6-849d-3a887ac5886c@6c48a"
+  }
+}

+ 4 - 1
assets/script/game/common/manager/ProtocolEvent.ts

@@ -38,7 +38,6 @@ export enum ProtocolEvent {
     AdVideoStart = server_url + "/project/playlet/v1/video/start",
     /**视频奖励*/
     GetVideorReward = server_url + "/project/playlet/v1/reward/videoReward",
-    /**领取手续费*/
 
 
     //获取微信提现页信息
@@ -73,6 +72,10 @@ export enum ProtocolEvent {
     NextLevel = server_url + "/project/playlet/v1/checkPoint/next",
     //重新开始游戏
     RestartGame = server_url + "/project/playlet/v1/checkPoint/restart",
+    /**获取引导界面信息*/
+    GetGuideInfo = server_url + "/project/playlet/v1/checkPoint/guideView",
+
+
 
 
 

+ 36 - 14
assets/script/game/common/manager/ServerHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:16:41
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-18 18:47:46
+ * @LastEditTime: 2025-04-19 16:37:19
  * @Description: 
  */
 // ServerHandler.ts
@@ -80,7 +80,8 @@ export class ServerHandler {
         game.targetScore = data.currentLevelConf.score;
         game.curLevelConfig = data.currentLevelConf;
         game.costInfo = data.handlingChargeConf;
-        game.eventType = data.currentLevelConf.eventType;
+        game.eventType = data.currentLevelConf.eventType || "";
+        game.popupType = data.currentLevelConf.popupType || "";
         account.wxCoin = data.props['1005'];
         account.hbCoin = data.props['1004'];
         account.goldCoin = data.props['1006'];
@@ -402,9 +403,10 @@ export class ServerHandler {
         smc.account.AccountModel.curLevel = result.currentLevelData.level;
         smc.game.GameModel.targetScore = result.currentLevelData.score;
         smc.game.GameModel.targetScore = result.currentLevelConf.score;
-        smc.game.GameModel.eventType = result.currentLevelConf.eventType;
+        smc.game.GameModel.eventType = result.currentLevelConf.eventType || "";
         smc.game.GameModel.curLevelConfig = result.currentLevelConf;
         smc.account.AccountModel.goldCoin = result.props["1006"] //金砖数量
+        smc.game.GameModel.popupType = result.currentLevelConf.popupType || "";
         oops.message.dispatchEvent(GameEvent.RestartGame);
     }
 
@@ -512,21 +514,41 @@ export class ServerHandler {
         oops.message.dispatchEvent(GameEvent.openView, "openDoubleSpeedView");
     }
 
-    onRequestFail(code: number, str: string) {
-        console.log('[服务器] 请求失败', code, str);
-    }
-
 
-    formatNumber(num: number, type: number) {
-        num = num / type;
-        const str = num.toFixed(2);
-        // 确保整数也格式化为.00
-        if (str.indexOf('.') === -1) {
-            return str + '.00';
+    //获取引导界面信息
+    GetGuideInfo() {
+        const param = {
+            url: ProtocolEvent.GetGuideInfo,
+            callback: this.buildCallback('ServerHandler.inst.onGetGuideInfo', 'ServerHandler.inst.onRequestFail')
         }
-        return Number(str);
+        this.sendMsgToServer(param);
     }
 
+    onGetGuideInfo(str: string) {
+        console.log('[服务器] 获取引导界面信息返回', str);
+        let result = JSON.parse(str);
+        smc.game.GameModel.loadbarInfo = result;
+        // smc.game.GameModel.guideInfo = result;
+        //只要数据就好
+        // oops.message.dispatchEvent(GameEvent.openView, "openGuideView");
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    onRequestFail(code: number, str: string) {
+        console.log('[服务器] 请求失败', code, str);
+    }
 
 }
 

+ 35 - 3
assets/script/game/model/GameModelComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-10 14:49:42
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-18 11:44:24
+ * @LastEditTime: 2025-04-19 16:36:21
  * @Description: 
  */
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
@@ -91,6 +91,12 @@ interface levelInfo {
 }
 
 
+interface loadBarInfo {
+    levelProgress: levelProgress,
+    wealCount: number  //福利次数
+}
+
+
 
 /** 数据层对象 */
 @ecs.register('GameModel')
@@ -136,7 +142,7 @@ export class GameModelComp extends ecs.Comp {
     //微信提现页金钱
     _txNum: number = 0;
     //事件类型 WITHDRAW_POINT-提现点  SIGN_POINT--预约登记  --PROCEDURE_POINT手续费
-    _eventType: string = "WITHDRAW_POINT";
+    _eventType: string = "";
     /**提现方式 1正常提现 2红包币提现,不要打开提现返利*/
     _txType: number = 1;
 
@@ -151,7 +157,12 @@ export class GameModelComp extends ecs.Comp {
     _doubleSpeedTime: number = 0;
 
 
-    private _doubleRewardInfo: doubleRewardInfo = null!;
+    _doubleRewardInfo: doubleRewardInfo = null!;
+
+    _loadBarInfo: loadBarInfo = null!;
+
+
+    _popupType: string = "";
 
     /** 数据层组件移除时,重置所有数据为默认值 */
     reset() {
@@ -162,6 +173,17 @@ export class GameModelComp extends ecs.Comp {
         this.costInfo = null!;
     }
 
+
+    set popupType(v: string) {
+        this._popupType = v;
+    }
+
+    get popupType() {
+        return this._popupType;
+    }
+
+
+
     get doubleSpeedTime() {
         return this._doubleSpeedTime;
     }
@@ -370,4 +392,14 @@ export class GameModelComp extends ecs.Comp {
     }
 
 
+
+    //进度条奖励
+    set loadbarInfo(v: loadBarInfo) {
+        this._loadBarInfo = v;
+    }
+
+    get loadbarInfo() {
+        return this._loadBarInfo;
+    }
+
 }

+ 1 - 3
assets/script/game/view/BricsItem.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-18 15:09:04
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-18 18:05:15
+ * @LastEditTime: 2025-04-19 15:20:09
  * @Description: 金砖道具
  */
 import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
@@ -52,8 +52,6 @@ export class BricsItem extends VMParent {
     //更新数据
     updateData(data: any) {
         this.data = data;
-        this.brickNode.active = this.data.withdraw;
-        this.completeNode.active != this.data.withdraw;
         this.levelLabel.string = `${this.data.level}`;
         this.iconNode.active = false;
         this.icon2Node.active = false;

+ 1 - 3
assets/script/game/view/DoubleRewardsView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:57:43
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-18 18:32:02
+ * @LastEditTime: 2025-04-19 15:37:20
  * @Description: 惊喜翻倍弹窗
  */
 import { _decorator, instantiate, Label, Node, Prefab, UITransform } from 'cc';
@@ -166,12 +166,10 @@ export class DoubleRewardsView extends VMParent {
                 }
                 this.data.goldNum = info.levelProgress.nextProgress;
                 const levelInfoList = this.processLevelInfo(info.levelProgress.levelInfoList);
-                console.log("levelInfoList", levelInfoList);
                 this.levelListNode.destroyAllChildren();
                 levelInfoList.forEach((item, index) => {
                     const levelItem = instantiate(this.levelItemPrefab);
                     this.levelListNode.addChild(levelItem);
-                    this.levelListNode.addChild(levelItem);
                     if (item.position) {
                         levelItem.setPosition(item.position, 0);
                         //设置数据

+ 59 - 68
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 11:56:58
+ * @LastEditTime: 2025-04-19 16:48:29
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -297,6 +297,7 @@ export class EliminateViewComp extends CCComp {
         this.money = smc.account.AccountModel.wxCoin;
         this.cash = smc.account.AccountModel.hbCoin;
         this.targetScore = smc.game.GameModel.targetScore;
+        this.popupType = smc.game.GameModel.popupType;
         this.lab_score.string = this.score.toString();
         this.lab_wxCoin.string = Format.formatWxCoin(this.money);
         this.lab_hbCoin.string = Format.formatRedPacketCoin(this.cash);
@@ -2154,6 +2155,7 @@ export class EliminateViewComp extends CCComp {
         this.setData();
         this.reopenGrid();
         this.initButtonState(this.autoState);
+        this.updateWelfarePoint();
     }
 
     //重新清除网格
@@ -2183,16 +2185,18 @@ export class EliminateViewComp extends CCComp {
 
     //===============初始化检查是否要打开福利界面====
     private updateWelfarePoint() {
-        this.popupType = "weal_6";
+        this.popupType = "weal_3";
         switch (this.popupType) {
             case "weal_1":
                 // this.btn_warmReminder();
                 oops.gui.open(UIID.WarmReminder);
+                ServerHandler.inst.GetGuideInfo();
                 break;
             case "weal_2":
                 // this.btn_cashRebate();
                 //打开福利二
                 oops.gui.open(UIID.WelfareTwo);
+                ServerHandler.inst.GetGuideInfo();
                 break;
             case "weal_3":
                 // this.btn_doubleRewards();
@@ -2200,24 +2204,10 @@ export class EliminateViewComp extends CCComp {
                 oops.gui.open(UIID.WelfareThree);
                 break;
         }
-
-        //如果当前是12关
-
-        // smc.game.GameModel.curLevelConfig.eventType = "SIGN_POINT"
-
-        // if (smc.game.GameModel.curLevelConfig.eventType == "SIGN_POINT") {
-        //     //展示提现信息
-        //     // this.WechatReward();
-        //     oops.gui.open(UIID.ReservePopup);
-        // } else {
-
-
-        // }
-
-        oops.gui.open(UIID.ReservePopup)
-
-
-
+        if (smc.game.GameModel.curLevelConfig.eventType && smc.game.GameModel.curLevelConfig.eventType === "SIGN_POINT") {
+            //展示提现信息
+            oops.gui.open(UIID.ReservePopup);
+        }
     }
 
 
@@ -2250,56 +2240,57 @@ export class EliminateViewComp extends CCComp {
     }
 
     btn_text() {
-        const param = {
-            "showReward": [
-                {
-                    "propId": "1004",
-                    "propNum": 500
-                },
-                {
-                    "propId": "1005",
-                    "propNum": 200
-                },
-                {
-                    "propId": "1006",
-                    "propNum": 1
-                }
-            ],
-            "levelProgress": {
-                "nextProgress": 1,
-                "levelInfoList": [
-                    {
-                        "level": 1,
-                        "eventType": "WITHDRAW_POINT",
-                        "withdraw": true
-                    },
-                    {
-                        "level": 4,
-                        "eventType": "WITHDRAW_POINT",
-                        "withdraw": false
-                    },
-                    {
-                        "level": 6,
-                        "eventType": "WITHDRAW_POINT",
-                        "withdraw": false
-                    },
-                    {
-                        "level": 8,
-                        "eventType": "WITHDRAW_POINT",
-                        "withdraw": false
-                    },
-                    {
-                        "level": 12,
-                        "eventType": "SIGN_POINT",
-                        "withdraw": false
-                    }
-                ]
-            }
-        }
+        // const param = {
+        //     "showReward": [
+        //         {
+        //             "propId": "1004",
+        //             "propNum": 500
+        //         },
+        //         {
+        //             "propId": "1005",
+        //             "propNum": 200
+        //         },
+        //         {
+        //             "propId": "1006",
+        //             "propNum": 1
+        //         }
+        //     ],
+        //     "levelProgress": {
+        //         "nextProgress": 1,
+        //         "levelInfoList": [
+        //             {
+        //                 "level": 1,
+        //                 "eventType": "WITHDRAW_POINT",
+        //                 "withdraw": true
+        //             },
+        //             {
+        //                 "level": 4,
+        //                 "eventType": "WITHDRAW_POINT",
+        //                 "withdraw": false
+        //             },
+        //             {
+        //                 "level": 6,
+        //                 "eventType": "WITHDRAW_POINT",
+        //                 "withdraw": false
+        //             },
+        //             {
+        //                 "level": 8,
+        //                 "eventType": "WITHDRAW_POINT",
+        //                 "withdraw": false
+        //             },
+        //             {
+        //                 "level": 12,
+        //                 "eventType": "SIGN_POINT",
+        //                 "withdraw": false
+        //             }
+        //         ]
+        //     }
+        // }
+        // let str = JSON.stringify(param);
+        // ServerHandler.inst.onDoubleSurprise(str);
 
 
+        // ServerHandler.inst.GetGuideInfo();
 
-        let str = JSON.stringify(param);
-        ServerHandler.inst.onDoubleSurprise(str);
     }
 }

+ 59 - 0
assets/script/game/view/LoadBricsItem.ts

@@ -0,0 +1,59 @@
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-18 15:09:04
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-19 16:25:14
+ * @Description: 金砖道具
+ */
+import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
+import VMParent from 'db://oops-framework/libs/model-view/VMParent';
+import { smc } from '../common/SingletonModuleComp';
+const { ccclass, property } = _decorator;
+
+@ccclass('LoadBricsItem')
+export class LoadBricsItem extends VMParent {
+    @property(Node)
+    private brickNode: Node = null!;
+    //完成Node
+    @property(Node)
+    private completeNode: Node = null!;
+
+    @property(Label)
+    private levelLabel: Label = null!;
+
+    @property(Node)
+    private circleNode: Node = null!;
+
+    @property(Node)
+    private showOver: Node = null!;
+
+    data: any = {
+        level: 0,
+        eventType: "",
+        withdraw: false,
+        position: 0, //位置
+        isFirstNotWithdraw: false, //是否第一个没提现
+    }
+    start() {
+
+    }
+
+    //更新数据
+    updateData(data: any) {
+        this.data = data;
+        this.levelLabel.string = `${this.data.level}`;
+
+        this.brickNode.active = !this.data.withdraw;
+        this.completeNode.active = this.data.withdraw;
+        //显示光圈
+        if (this.data.level === smc.account.AccountModel.curLevel) {
+            this.circleNode.active = true;
+        } else {
+            this.circleNode.active = false;
+        }
+        this.showOver.active = this.data.isFirstNotWithdraw;
+
+    }
+}
+
+

+ 1 - 0
assets/script/game/view/LoadBricsItem.ts.meta

@@ -0,0 +1 @@
+{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"c8fc128a-3f24-4480-bec2-83a3c5393e06","files":[],"subMetas":{},"userData":{}}

+ 5 - 2
assets/script/game/view/popup/WechatTransfer.ts

@@ -10,6 +10,7 @@ import VMParent from 'db://oops-framework/libs/model-view/VMParent';
 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';
 const { ccclass, property } = _decorator;
 
 @ccclass('WechatTransfer')
@@ -49,8 +50,10 @@ export class WechatTransfer extends VMParent {
 
     //设置数据
     updateData() {
-        this.data.money = smc.account.AccountModel.wxCoin;
-        this.data.cost = smc.game.GameModel.handlingCharge;
+        if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
+            this.data.money = smc.account.AccountModel.wxCoin;
+            this.data.cost = smc.game.GameModel.handlingCharge;
+        }
     }
 
 

+ 135 - 7
assets/script/game/view/popup/WelfareOne.ts

@@ -2,25 +2,153 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-18 19:11:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-18 19:13:33
+ * @LastEditTime: 2025-04-19 16:32:40
  * @Description: 福利一
  */
-import { _decorator, Component, Node } from 'cc';
-import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
-import { UIID } from '../../common/config/GameUIConfig';
+import { _decorator, Animation, instantiate, Node, Prefab } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
+import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
+import VMParent from 'db://oops-framework/libs/model-view/VMParent';
+import { UIID } from '../../common/config/GameUIConfig';
+import { smc } from '../../common/SingletonModuleComp';
+import { LoadBricsItem } from '../LoadBricsItem';
 const { ccclass, property } = _decorator;
 
+interface LevelInfo {
+    level: number;
+    eventType: string;
+    withdraw: boolean;
+    position?: number; //位置
+    isFirstNotWithdraw?: boolean; //是否第一个没提现
+}
+
+
 @ccclass('WelfareOne')
-export class WelfareOne extends GameComponent {
+export class WelfareOne extends VMParent {
+    data: any = {
+        itemList: [],
+        frequency: 5,
+        cur_num: 1,
+        total_num: 12,
+        wealCount: 0
+    }
+
+    @property(Node)
+    private progressNode: Node = null!;
+
+
+    @property(Node)
+    private showNode1: Node = null!;  //福利一
+
+    @property(Node)
+    private showNode2: Node = null!;  //自动提现进度
+
+    @property(Prefab)
+    itemPrefab: Prefab = null!;
+
+    @property(Node)
+    itemList: Node = null!;
+
+
     start() {
         //三秒后进自动提现进度条
+        this.showNode1.active = false;
+        this.showNode2.active = false;
+        this.showWelfareOne();
+        this.updateData();
+    }
+
+
+
+    //展示福利一界面
+    showWelfareOne() {
+        this.showNode1.active = true;
+        //
+        this.scheduleOnce(() => {
+            this.showNode1.active = false;
+            this.showLoadBar();
+        }, 3)
+    }
+
+
+    //更新数据
+    updateData() {
+        if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
+            if (smc.game.GameModel.loadbarInfo.levelProgress) {
+                this.data.itemList = smc.game.GameModel.loadbarInfo.levelProgress.levelInfoList
+                //进度
+                this.data.cur_num = smc.account.AccountModel.curLevel;
+                this.data.total_num = this.data.itemList[this.data.itemList.length - 1].level;
+                const itemInfoList = this.processLevelInfo(this.data.itemList);
+                this.itemList.destroyAllChildren();
+                itemInfoList.forEach((item, index) => {
+                    const loadLevelItem = instantiate(this.itemPrefab)
+                    this.itemList.addChild(loadLevelItem);
+                    if (item.position) {
+                        loadLevelItem.setPosition(item.position, 0);
+                        //设置数据
+                        const script = loadLevelItem.getComponent(LoadBricsItem);
+                        if (script) {
+                            script.updateData(item);
+                        }
+                    }
+                })
+            }
+        }
+    }
+
+
+
+
+
+    //展示进度条界面
+    showLoadBar() {
+        this.showNode2.active = true;
+        const animation = this.showNode2.getComponent(Animation);
+        if (animation) {
+            animation.play();
+        }
+        //3秒后关闭
         this.scheduleOnce(() => {
-            oops.gui.open(UIID.AutoWithdrawProgress);
             oops.gui.remove(UIID.WelfareOne);
-        }, 3);
+        }, 3)
     }
 
+
+
+    processLevelInfo(levelInfoList: LevelInfo[], totalLength: number = 516): LevelInfo[] {
+        if (levelInfoList.length === 0) return [];
+        const firstLevel = levelInfoList[0].level;
+        const lastLevel = levelInfoList[levelInfoList.length - 1].level;
+        //单段距离 总长度/最后一个level-1
+        const singleLength = totalLength / (lastLevel - 1);
+        return levelInfoList.map((item, index) => {
+            let foundFirstNotWithdraw = false;
+
+            if (index === 0) {
+                item.position = this.progressNode.position.x;
+            } else if (index === levelInfoList.length - 1) {
+                item.position = this.progressNode.position.x + totalLength;
+            } else {
+                item.position = this.progressNode.position.x + ((item.level - firstLevel) * singleLength);
+            }
+
+            // 标记第一个未提现
+            if (!foundFirstNotWithdraw && item.withdraw) {
+                item.isFirstNotWithdraw = true;
+                foundFirstNotWithdraw = true;
+            } else {
+                item.isFirstNotWithdraw = false;
+            }
+
+
+            return item;
+        });
+    }
+
+
+
+
 }
 
 

+ 144 - 0
assets/script/game/view/popup/WelfareTwo.ts

@@ -0,0 +1,144 @@
+import { Prefab } from 'cc';
+import { instantiate } from 'cc';
+import { _decorator, Component, Node, Animation } from 'cc';
+import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
+import VMParent from 'db://oops-framework/libs/model-view/VMParent';
+import { start } from 'repl';
+import { smc } from '../../common/SingletonModuleComp';
+import { LoadBricsItem } from '../LoadBricsItem';
+import { UIID } from '../../common/config/GameUIConfig';
+import { oops } from 'db://oops-framework/core/Oops';
+const { ccclass, property } = _decorator;
+
+interface LevelInfo {
+    level: number;
+    eventType: string;
+    withdraw: boolean;
+    position?: number; //位置
+    isFirstNotWithdraw?: boolean; //是否第一个没提现
+}
+
+
+
+@ccclass('WelfareTwo')
+export class WelfareTwo extends VMParent {
+    data: any = {
+        itemList: [],
+        cur_num: 1,
+        total_num: 12,
+        wealCount: 0
+    }
+
+
+    @property(Node)
+    private progressNode: Node = null!;
+
+
+    @property(Node)
+    private showNode1: Node = null!;  //福利一
+
+    @property(Node)
+    private showNode2: Node = null!;  //自动提现进度
+
+    @property(Prefab)
+    itemPrefab: Prefab = null!;
+
+    @property(Node)
+    itemList: Node = null!;
+
+
+
+    start() {
+        //三秒后进自动提现进度条
+        this.showNode1.active = false;
+        this.showNode2.active = false;
+        this.showWelfareTwo();
+        this.updateData();
+    }
+
+
+
+    showWelfareTwo() {
+        this.showNode1.active = true;
+        //
+        this.scheduleOnce(() => {
+            this.showNode1.active = false;
+            this.showLoadBar();
+        }, 3)
+    }
+
+
+    //展示进度条界面
+    showLoadBar() {
+        this.showNode2.active = true;
+        const animation = this.showNode2.getComponent(Animation);
+        if (animation) {
+            animation.play();
+        }
+        //3秒后关闭
+        this.scheduleOnce(() => {
+            oops.gui.open(UIID.UnlockFunction);
+            oops.gui.remove(UIID.WelfareTwo);
+            //解锁新功能
+        }, 3)
+    }
+
+    //更新数据
+    updateData() {
+        if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
+            if (smc.game.GameModel.loadbarInfo.levelProgress) {
+                this.data.itemList = smc.game.GameModel.loadbarInfo.levelProgress.levelInfoList
+                //进度
+                this.data.cur_num = smc.account.AccountModel.curLevel;
+                this.data.total_num = this.data.itemList[this.data.itemList.length - 1].level;
+                const itemInfoList = this.processLevelInfo(this.data.itemList);
+                this.itemList.destroyAllChildren();
+                itemInfoList.forEach((item, index) => {
+                    const loadLevelItem = instantiate(this.itemPrefab)
+                    this.itemList.addChild(loadLevelItem);
+                    if (item.position) {
+                        loadLevelItem.setPosition(item.position, 0);
+                        //设置数据
+                        const script = loadLevelItem.getComponent(LoadBricsItem);
+                        if (script) {
+                            script.updateData(item);
+                        }
+                    }
+                })
+            }
+        }
+    }
+
+
+    processLevelInfo(levelInfoList: LevelInfo[], totalLength: number = 516): LevelInfo[] {
+        if (levelInfoList.length === 0) return [];
+        const firstLevel = levelInfoList[0].level;
+        const lastLevel = levelInfoList[levelInfoList.length - 1].level;
+        //单段距离 总长度/最后一个level-1
+        const singleLength = totalLength / (lastLevel - 1);
+        return levelInfoList.map((item, index) => {
+            let foundFirstNotWithdraw = false;
+
+            if (index === 0) {
+                item.position = this.progressNode.position.x;
+            } else if (index === levelInfoList.length - 1) {
+                item.position = this.progressNode.position.x + totalLength;
+            } else {
+                item.position = this.progressNode.position.x + ((item.level - firstLevel) * singleLength);
+            }
+
+            // 标记第一个未提现
+            if (!foundFirstNotWithdraw && item.withdraw) {
+                item.isFirstNotWithdraw = true;
+                foundFirstNotWithdraw = true;
+            } else {
+                item.isFirstNotWithdraw = false;
+            }
+
+
+            return item;
+        });
+    }
+}
+
+

+ 9 - 0
assets/script/game/view/popup/WelfareTwo.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "c1afaab5-29bb-4bbc-ba31-ca44a36b59f3",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}