Forráskód Böngészése

对接提现记录完成

mojunshou 1 éve
szülő
commit
4d09aac929

+ 221 - 40
assets/bundle/gui/eliminate/prefab/withdrawalRecord.prefab

@@ -28,17 +28,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 75
+        "__id__": 82
       },
       {
-        "__id__": 77
+        "__id__": 84
       },
       {
-        "__id__": 79
+        "__id__": 86
       }
     ],
     "_prefab": {
-      "__id__": 81
+      "__id__": 88
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -137,7 +137,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -261,19 +261,22 @@
       },
       {
         "__id__": 25
+      },
+      {
+        "__id__": 71
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 70
+        "__id__": 77
       },
       {
-        "__id__": 72
+        "__id__": 79
       }
     ],
     "_prefab": {
-      "__id__": 74
+      "__id__": 81
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -656,20 +659,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 59
       },
       {
-        "__id__": 60
+        "__id__": 61
       },
       {
-        "__id__": 62
+        "__id__": 63
       },
       {
-        "__id__": 64
+        "__id__": 65
       }
     ],
     "_prefab": {
-      "__id__": 69
+      "__id__": 70
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -716,17 +719,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 51
+        "__id__": 52
       },
       {
-        "__id__": 53
+        "__id__": 54
       },
       {
-        "__id__": 55
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 57
+      "__id__": 58
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -773,14 +776,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 46
+        "__id__": 47
       },
       {
-        "__id__": 48
+        "__id__": 49
       }
     ],
     "_prefab": {
-      "__id__": 50
+      "__id__": 51
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -870,6 +873,9 @@
       },
       {
         "__id__": 44
+      },
+      {
+        "__id__": 46
       }
     ],
     "removedComponents": []
@@ -1034,6 +1040,16 @@
     ]
   },
   {
+    "__type__": "CCPropertyOverrideInfo",
+    "targetInfo": {
+      "__id__": 36
+    },
+    "propertyPath": [
+      "_active"
+    ],
+    "value": true
+  },
+  {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
@@ -1043,7 +1059,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 47
+      "__id__": 48
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1071,7 +1087,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 49
+      "__id__": 50
     },
     "_resizeMode": 1,
     "_layoutType": 2,
@@ -1122,7 +1138,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 52
+      "__id__": 53
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1150,7 +1166,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 54
+      "__id__": 55
     },
     "_type": 0,
     "_inverted": false,
@@ -1172,7 +1188,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 56
+      "__id__": 57
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1231,7 +1247,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 59
+      "__id__": 60
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1259,7 +1275,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 61
+      "__id__": 62
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1304,7 +1320,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 63
+      "__id__": 64
     },
     "bounceDuration": 0.23,
     "brake": 0.75,
@@ -1335,7 +1351,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 65
+      "__id__": 66
     },
     "templateType": 1,
     "tmpNode": {
@@ -1345,7 +1361,7 @@
     "_slideMode": 1,
     "pageDistance": 0.3,
     "pageChangeEvent": {
-      "__id__": 66
+      "__id__": 67
     },
     "_virtual": true,
     "cyclic": false,
@@ -1354,11 +1370,11 @@
     "_updateRate": 0,
     "frameByFrameRenderNum": 0,
     "renderEvent": {
-      "__id__": 67
+      "__id__": 68
     },
     "selectedMode": 0,
     "selectedEvent": {
-      "__id__": 68
+      "__id__": 69
     },
     "repeatEventSingle": false,
     "_id": ""
@@ -1407,21 +1423,180 @@
     "nestedPrefabInstanceRoots": null
   },
   {
+    "__type__": "cc.Node",
+    "_name": "state",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 10
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 72
+      },
+      {
+        "__id__": 74
+      }
+    ],
+    "_prefab": {
+      "__id__": 76
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 10
+      "__id__": 71
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 73
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 244,
+      "height": 79.6
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e5edocUf1BSYqpXE/OEBBs"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 71
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 75
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_string": "暂无记录",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 60,
+    "_fontSize": 60,
+    "_fontFamily": "Arial",
+    "_lineHeight": 60,
+    "_overflow": 0,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": true,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": true,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "507I3eY1lJspDmK3js/wl+"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "96cpStt2BDWL9gaPB/92+M",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 78
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1444,7 +1619,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 73
+      "__id__": 80
     },
     "_alignFlags": 45,
     "_target": null,
@@ -1493,12 +1668,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 76
+      "__id__": 83
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1521,10 +1696,16 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 78
+      "__id__": 85
     },
     "recordList": {
-      "__id__": 64
+      "__id__": 65
+    },
+    "noRecord": {
+      "__id__": 71
+    },
+    "content": {
+      "__id__": 27
     },
     "_id": ""
   },
@@ -1542,7 +1723,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 80
+      "__id__": 87
     },
     "_alignFlags": 45,
     "_target": null,

+ 38 - 1
assets/script/game/account/model/AccountModelComp.ts

@@ -4,7 +4,7 @@
  * @Author: dgflash
  * @Date: 2021-11-12 10:02:31
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 16:31:00
+ * @LastEditTime: 2025-04-09 17:32:45
  */
 import { oops } from "db://oops-framework/core/Oops";
 import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
@@ -34,6 +34,16 @@ interface CostInfo {
     giftNum: number;         //赠送金
 }
 
+interface RecordInfo {
+    title: string,
+    amount: number,
+    payMethod: number,
+    createTime: number,
+    successTime: number,
+    status: number
+}
+
+
 
 
 @ecs.register('AccountModel')
@@ -48,12 +58,15 @@ export class AccountModelComp extends ecs.Comp {
     _curLevel: number = 0;
     /**游戏币*/
     _gameCoin: number = 0;
+
     /**红包币*/
     _cashCoin: number = 0;
     /**金块*/
     _goldCoin: number = 0;
     /**手续费*/
     _handlingCharge: number = 0;
+    /**当前分数*/
+    _curScore: number = 0;
     /**目标分数*/
     _targetScore: number = 0;
     /**协议类型 1隐私 2用户*/
@@ -66,6 +79,11 @@ export class AccountModelComp extends ecs.Comp {
     _costInfo: CostInfo = null!;
     /**是否登录过*/
     _isLogined: boolean = false;
+    //提现记录
+    _recordList: RecordInfo[] = [];
+
+
+
 
     reset() {
         this.accountName = null!;
@@ -146,6 +164,16 @@ export class AccountModelComp extends ecs.Comp {
         this._handlingCharge = value;
     }
 
+    set curScore(value: number) {
+        this._curScore = value;
+    }
+
+    get curScore() {
+        return this._curScore;
+    }
+
+
+
     get targetScore() {
         return this._targetScore;
     }
@@ -193,4 +221,13 @@ export class AccountModelComp extends ecs.Comp {
     set isLogined(value: boolean) {
         this._isLogined = value;
     }
+
+    get recordList() {
+        return this._recordList;
+    }
+
+    set recordList(value: RecordInfo[]) {
+        this.recordList = value;
+    }
+
 }

+ 5 - 1
assets/script/game/common/config/GameEvent.ts

@@ -20,5 +20,9 @@ export enum GameEvent {
     /**二倍速开启成功*/
     DoubleSpeedOpenSuccess = "DoubleSpeedOpenSuccess",
     /**用户登录*/
-    UserLogin = "UserLogin"
+    UserLogin = "UserLogin",
+    /**打开红包提现*/
+    openRedBagView = "openRedBagView",
+    /**打开提现记录*/
+    openRecordView = "openRecordView",
 }

+ 42 - 2
assets/script/game/common/manager/CocosHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-31 10:45:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 16:41:09
+ * @LastEditTime: 2025-04-09 18:35:22
  * @Description: CocosHandler 处理类负责与安卓交互
  */
 import { native } from 'cc';
@@ -15,6 +15,7 @@ import { GameEvent } from '../config/GameEvent';
 import { ProtocolEvent } from './ProtocolEvent';
 import { AndroidEvent } from '../config/AndroidEvent';
 import { UIID } from '../config/GameUIConfig';
+import { get } from 'http';
 const { ccclass, property } = _decorator;
 
 type CocosHandlerType = {
@@ -156,7 +157,9 @@ export class CocosHandler {
         let data = JSON.parse(str);
         smc.account.AccountModel.uid = data.uid;
         console.log("uid>>>>>>>", data.uid);
-        smc.account.AccountModel.curLevelInfo = data.currentLevelInfo;
+        smc.account.AccountModel.curScore = data.currentLevelInfo.score;
+        smc.account.AccountModel.curLevel = data.currentLevelInfo.level;
+        smc.account.AccountModel.targetScore = smc.account.AccountModel.curLevelConfig.score;
         smc.account.AccountModel.curLevelConfig = data.currentLevelConf;
         smc.account.AccountModel.costInfo = data.handlingChargeConf;
         smc.account.AccountModel.isLogined = data.logined;
@@ -213,6 +216,9 @@ export class CocosHandler {
     //获取红包提现列表数据成功回调
     getDailyTaskReward_success(str: string) {
         console.log("获取红包提现列表数据成功回调", str);
+        //这里再打开记录
+        oops.message.dispatchEvent(GameEvent.openRedBagView, "openRedBagView");
+
     }
 
     //获取用户道具信息
@@ -240,6 +246,33 @@ export class CocosHandler {
     }
 
 
+    //获取提现记录
+    getRecordList() {
+        const param = {
+            "url": ProtocolEvent.GetWithdrawRecord,
+            "param": {
+                "offset": 0,
+                "limit": 50
+            },
+            "callback": {
+                "onSuccess": "CocosHandler.inst.getRecordList_success",
+                "onFail": "CocosHandler.inst.request_fail"
+            }
+        }
+        this.sendMsgToServer(param);
+    }
+
+    //获取提现记录成功
+    getRecordList_success(str: string) {
+        console.log("获取提现记录成功>>>>>>>>>>", str)
+        let result = JSON.parse(str);
+        if (result.count > 0) {
+            smc.account.AccountModel.recordList = result.data.list;
+        }
+        oops.message.dispatchEvent(GameEvent.openRecordView);
+
+    }
+
 
 
 
@@ -270,6 +303,7 @@ export class CocosHandler {
             "funcId": "101",
             "callback":
             {
+                "onShowFailed": "ad_splash_onShowFailed",
                 "onClose": "CocosHandler.inst.ad_splash_close"
             }
         }
@@ -298,6 +332,12 @@ export class CocosHandler {
         }
     }
 
+    //启屏广告加载失败
+    ad_splash_onShowFailed() {
+        this.getAccountInfo();
+    }
+
+
 
 
 

+ 38 - 5
assets/script/game/eliminate/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-09 16:46:12
+ * @LastEditTime: 2025-04-09 18:39:13
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -13,6 +13,8 @@ import { CCComp } from "db://oops-framework/module/common/CCComp";
 import { GameEvent } from "../../common/config/GameEvent";
 import { UIID } from "../../common/config/GameUIConfig";
 import { smc } from "../../common/SingletonModuleComp";
+import { CocosHandler } from "../../common/manager/CocosHandler";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 
 const { ccclass, property } = _decorator;
 
@@ -215,6 +217,7 @@ export class EliminateViewComp extends CCComp {
     addEventList() {
         oops.message.on(GameEvent.RestartGame, this.restartGame, this);
         oops.message.on(GameEvent.DoubleSpeedOpenSuccess, this.doubleSpeedOpenSuccess, this);
+        oops.message.on(GameEvent.openRedBagView, this.openView, this)
     }
 
 
@@ -260,10 +263,10 @@ export class EliminateViewComp extends CCComp {
 
     //设置数据
     setData() {
-        this.score = smc.account.AccountModel.curLevelInfo.score;
+        this.score = smc.account.AccountModel.curScore || 0;
         this.money = smc.account.AccountModel.gameCoin;
         this.cash = smc.account.AccountModel.cashCoin;
-        this.targetScore = smc.account.AccountModel.curLevelConfig.score;
+        this.targetScore = smc.account.AccountModel.targetScore || 0;
         this.lab_score.string = this.score.toString();
         this.amountLb.string = this.money.toString();
         this.awardLb.string = this.cash.toString();
@@ -271,6 +274,18 @@ export class EliminateViewComp extends CCComp {
     }
 
 
+    openView(args: string) {
+        console.log(">>>>>>args>>>>>>>>>>>", args);
+        switch (args) {
+            case "openRedBagView":
+                oops.gui.open(UIID.RedPacketWithdraw);
+                break;
+            case "":
+                break;
+        }
+    }
+
+
 
 
     //初始化网格
@@ -1478,12 +1493,30 @@ export class EliminateViewComp extends CCComp {
 
     //左边微信按钮
     private btn_withdraw() {
-        oops.gui.open(UIID.WechatWithdraw);
+
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+
+
+
+
+
+        } else {
+            oops.gui.open(UIID.WechatWithdraw);
+        }
+
     }
 
     //顶部红包按钮
     private btn_award() {
-        oops.gui.open(UIID.RedPacketWithdraw);
+        //oops.gui.open(UIID.RedPacketWithdraw);
+
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            CocosHandler.inst.getDailyTaskReward();
+        } else {
+            oops.gui.open(UIID.RedPacketWithdraw);
+        }
+
+
     }
 
     //二倍速按钮

+ 23 - 14
assets/script/game/eliminate/view/GuildTipsView.ts

@@ -1,14 +1,23 @@
-import { _decorator, Component, Node } from 'cc';
-const { ccclass, property } = _decorator;
-
-@ccclass('GuildTipsView')
-export class GuildTipsView extends Component {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
-    }
-}
-

+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-07 17:49:55
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-09 18:14:07
+ * @Description: 
+ */
+import { _decorator, Component, Node } from 'cc';
+import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
+const { ccclass, property } = _decorator;
+//引导提示
+@ccclass('GuildTipsView')
+export class GuildTipsView extends GameComponent {
+    start() {
+
+    }
+
+    update(deltaTime: number) {
+
+    }
+}
+
+

+ 1 - 9
assets/script/game/eliminate/view/RedPackeItemView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 18:39:37
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-08 14:07:54
+ * @LastEditTime: 2025-04-09 17:42:10
  * @Description: 红包列表item
  */
 import { _decorator, Node } from 'cc';
@@ -67,11 +67,6 @@ export class RedPackeItemView extends VMParent {
         this.updateData();
     }
 
-
-    public getdata() {
-        return this.data;
-    }
-
     //更新数据
     private updateData() {
         console.log("updateData", this.data);
@@ -88,9 +83,6 @@ export class RedPackeItemView extends VMParent {
         this.pro_progress.progress = this.data.current / this.data.total;
         // this.sp_icon.spriteFrame = oops.res.getSpriteFrame(this.data.goods[0].type);
         this.lab_num.string = this.data.goods[0].num;
-
-
-
     }
 
 

+ 36 - 1
assets/script/game/eliminate/view/RedPackeWithdrawalViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:53:50
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-08 14:59:27
+ * @LastEditTime: 2025-04-09 17:38:37
  * @Description: 红包提现
  */
 import { _decorator, Node } from "cc";
@@ -13,6 +13,10 @@ import { UIID } from "../../common/config/GameUIConfig";
 import List from "../ui/List";
 import { RedPackeItemView } from "./RedPackeItemView";
 import { GameComponent } from "db://oops-framework/module/common/GameComponent";
+import { Label } from "cc";
+import { GameEvent } from "../../common/config/GameEvent";
+import { CocosHandler } from "../../common/manager/CocosHandler";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 
 const { ccclass, property } = _decorator;
 
@@ -23,9 +27,19 @@ export class RedPackeWithdrawalViewComp extends GameComponent {
     @property(List)
     recordList: List = null!;
 
+    @property(Label)
+    lab_redNum: Label = null!;  //红包金额
+
+    @property(Label)
+    lab_tips: Label = null!;  //提示金额
+
+    @property(Label)
+    lab_wxNum: Label = null!;  //微信金额
+
     data: any[] = [];
     onLoad() {
         this.setButton();
+        this.addEvent();
         const data = {
             title: `每日消除100次即可领取`,
             current: 1,
@@ -48,6 +62,12 @@ export class RedPackeWithdrawalViewComp extends GameComponent {
     }
 
 
+
+    addEvent() {
+        oops.message.on(GameEvent.openRecordView, this.openRecordView, this);
+    }
+
+
     private onListRender(item: Node, idx: number) {
         console.log("onListRender", idx);
         const itemView: RedPackeItemView | null = item.getComponent(RedPackeItemView);
@@ -63,7 +83,22 @@ export class RedPackeWithdrawalViewComp extends GameComponent {
 
 
     private btn_record() {
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            CocosHandler.inst.getRecordList();
+        } else {
+            oops.gui.open(UIID.WithdrawRecord);
+        }
+    }
+
+
+    private openRecordView() {
         oops.gui.open(UIID.WithdrawRecord);
     }
 
+
+    private btn_withdrawal() {
+        //全部提现
+
+    }
+
 }

+ 22 - 1
assets/script/game/eliminate/view/WechatWithdrawalViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:00:12
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-03 11:06:20
+ * @LastEditTime: 2025-04-09 18:26:41
  * @Description: 微信提现页面
  */
 import { _decorator, Node } from "cc";
@@ -13,6 +13,9 @@ import { UIID } from "../../common/config/GameUIConfig";
 import { RichText } from "cc";
 import { tween } from "cc";
 import { Vec3 } from "cc";
+import { GameEvent } from "../../common/config/GameEvent";
+import { CocosHandler } from "../../common/manager/CocosHandler";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
 
 const { ccclass, property } = _decorator;
 
@@ -39,8 +42,16 @@ export class WechatWithdrawalViewComp extends CCComp {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
         this.setButton();
         this.updateNotice();
+        this.addEvent();
     }
 
+
+    addEvent() {
+        oops.message.on(GameEvent.openRecordView, this.openRecordView, this);
+    }
+
+
+
     /** 视图对象通过 ecs.Entity.remove(WechatWithdrawalViewComp) 删除组件是触发组件处理自定义释放逻辑 */
     reset() {
         this.node.destroy();
@@ -52,6 +63,16 @@ export class WechatWithdrawalViewComp extends CCComp {
     }
 
     private btn_record() {
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            CocosHandler.inst.getRecordList();
+        } else {
+            oops.gui.open(UIID.WithdrawRecord);
+        }
+
+    }
+
+
+    private openRecordView() {
         oops.gui.open(UIID.WithdrawRecord);
     }
 

+ 53 - 25
assets/script/game/eliminate/view/WithdrawalRecordViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 10:17:49
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-08 11:18:17
+ * @LastEditTime: 2025-04-09 18:42:05
  * @Description: 提现记录
  */
 import { _decorator, Node } from "cc";
@@ -12,6 +12,8 @@ import List from "../ui/List";
 import { Label } from "cc";
 import { oops } from "db://oops-framework/core/Oops";
 import { UIID } from "../../common/config/GameUIConfig";
+import { DeviceUtil } from "db://oops-framework/core/utils/DeviceUtil";
+import { smc } from "../../common/SingletonModuleComp";
 
 const { ccclass, property } = _decorator;
 
@@ -24,25 +26,39 @@ export class WithdrawalRecordViewComp extends CCComp {
     recordList: List = null!;
 
     data: any[] = [];
+    @property(Node)
+    noRecord: Node = null!;
 
-    start() {
-
-        const data = {
-            state: "提现成功",
-            time: "2025-03-20 17:30",
-            money: 0.1,
-            status: oops.random.getRandomInt(0, 3, 3)
+    @property(Node)
+    content: Node = null!;
 
-        }
+    start() {
+        this.setButton();
 
-        for (let i = 0; i < 20; i++) {
-            data.money = i;
-            this.data.push(data);
-        }
-        this.recordList.numItems = this.data.length;
 
-        this.setButton();
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            const count = smc.account.AccountModel.recordList.length;
+            this.noRecord.active = count <= 0;
+            this.content.active = count > 0;
+            if (count > 0) {
+                this.data = smc.account.AccountModel.recordList;
+                this.recordList.numItems = this.data.length;
+            }
+        } else {
+            const data = {
+                amount: 0.01,
+                payMethod: 1,  //1支付宝 2微信
+                createTime: "2025-04-09 18:09:09",
+                successTime: "2025-04-09 18:09:09",
+                status: oops.random.getRandomInt(0, 4)
+            }
+            for (let i = 0; i < 20; i++) {
+                data.amount = i;
+                this.data.push(data);
+            }
+            this.recordList.numItems = this.data.length;
+        }
     }
 
 
@@ -50,23 +66,35 @@ export class WithdrawalRecordViewComp extends CCComp {
     private onListRender(item: Node, idx: number) {
         // item.getComponentInChildren(Label)!.string = this.data[idx] + '';
         const data = this.data[idx];
+        let str: string = ""
+        switch (data.status) {
+            case 1:
+                str = "待审核"
+                break;
+            case 2:
+                str = "提现成功"
+                break
+            case 3:
+                str = "提现失败"
+                break
+            case 4:
+                str = "已拒绝"
+                break
+        }
+
         const stateLabel = item.getChildByName("lab_state")?.getComponent(Label);
-        if (stateLabel) stateLabel.string = data.state;
+        if (stateLabel) stateLabel.string = str;
 
         const timeLabel = item.getChildByName("lab_time")?.getComponent(Label);
-        if (timeLabel) timeLabel.string = data.time;
+        if (timeLabel) timeLabel.string = data.createTime;
 
         const moneyLabel = item.getChildByName("lab_money")?.getComponent(Label);
-        if (moneyLabel) moneyLabel.string = data.money + "元";
-        //TS原生随机数0 或者1 
-        const randomNum = Math.random() > 0.5 ? 0 : 1;
-
+        if (moneyLabel) moneyLabel.string = data.amount + "元";
+        //TS原生随机数0 或者1
         const statusNode1 = item.getChildByName("record_state1");
-        if (statusNode1) statusNode1.active = randomNum == 0;
-
+        if (statusNode1) statusNode1.active = data.status == 2;
         const statusNode2 = item.getChildByName("record_state2");
-        if (statusNode2) statusNode2.active = randomNum == 1;
-
+        if (statusNode2) statusNode2.active = data.status != 2;
     }