ソースを参照

拆分数据处理模块

mojunshou 7 ヶ月 前
コミット
96c39ad390
27 ファイル変更1433 行追加1273 行削除
  1. 442 67
      assets/bundle/gui/eliminate/eliminate.prefab
  2. 284 235
      assets/bundle/gui/eliminate/prefab/gamePass.prefab
  3. 10 10
      assets/bundle/gui/eliminate/prefab/gooditem_1.prefab
  4. 10 10
      assets/bundle/gui/eliminate/prefab/gooditem_2.prefab
  5. 10 10
      assets/bundle/gui/eliminate/prefab/gooditem_3.prefab
  6. 9 384
      assets/bundle/gui/loading/loading.prefab
  7. 3 3
      assets/script/game/common/config/GameEvent.ts
  8. 102 0
      assets/script/game/common/manager/ADHandler.ts
  9. 9 0
      assets/script/game/common/manager/ADHandler.ts.meta
  10. 20 459
      assets/script/game/common/manager/CocosHandler.ts
  11. 78 0
      assets/script/game/common/manager/LoginHandler.ts
  12. 9 0
      assets/script/game/common/manager/LoginHandler.ts.meta
  13. 13 5
      assets/script/game/common/manager/ProtocolEvent.ts
  14. 208 0
      assets/script/game/common/manager/ServerHandler.ts
  15. 9 0
      assets/script/game/common/manager/ServerHandler.ts.meta
  16. 6 5
      assets/script/game/common/setting/SettingViewComp.ts
  17. 5 4
      assets/script/game/common/tips/ClickEventHandler.ts
  18. 7 2
      assets/script/game/common/tips/KindTipsView.ts
  19. 5 2
      assets/script/game/common/tips/RetentionView.ts
  20. 7 4
      assets/script/game/initialize/view/LoadingViewComp.ts
  21. 47 6
      assets/script/game/model/GameModelComp.ts
  22. 4 3
      assets/script/game/view/CashRebateView.ts
  23. 3 2
      assets/script/game/view/DoubleSpeedViewComp.ts
  24. 111 45
      assets/script/game/view/EliminateViewComp.ts
  25. 17 14
      assets/script/game/view/GamePassView.ts
  26. 3 2
      assets/script/game/view/RedPackeWithdrawalViewComp.ts
  27. 2 1
      assets/script/game/view/WechatWithdrawalViewComp.ts

+ 442 - 67
assets/bundle/gui/eliminate/eliminate.prefab

@@ -28,17 +28,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 415
+        "__id__": 429
       },
       {
-        "__id__": 417
+        "__id__": 431
       },
       {
-        "__id__": 419
+        "__id__": 433
       }
     ],
     "_prefab": {
-      "__id__": 421
+      "__id__": 435
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -263,26 +263,26 @@
         "__id__": 283
       },
       {
-        "__id__": 376
+        "__id__": 390
       },
       {
-        "__id__": 380
+        "__id__": 394
       },
       {
-        "__id__": 384
+        "__id__": 398
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 410
+        "__id__": 424
       },
       {
-        "__id__": 412
+        "__id__": 426
       }
     ],
     "_prefab": {
-      "__id__": 414
+      "__id__": 428
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6957,19 +6957,22 @@
       },
       {
         "__id__": 357
+      },
+      {
+        "__id__": 371
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 371
+        "__id__": 385
       },
       {
-        "__id__": 373
+        "__id__": 387
       }
     ],
     "_prefab": {
-      "__id__": 375
+      "__id__": 389
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9127,17 +9130,389 @@
     "nestedPrefabInstanceRoots": null
   },
   {
+    "__type__": "cc.Node",
+    "_name": "btn_gxfb",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 283
+    },
+    "_children": [
+      {
+        "__id__": 372
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 378
+      },
+      {
+        "__id__": 380
+      },
+      {
+        "__id__": 382
+      }
+    ],
+    "_prefab": {
+      "__id__": 384
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -8.646,
+      "y": 191.461,
+      "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.Node",
+    "_name": "Label",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 371
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 373
+      },
+      {
+        "__id__": 375
+      }
+    ],
+    "_prefab": {
+      "__id__": 377
+    },
+    "_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__": 283
+      "__id__": 372
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 374
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "06zll+OWxPpJ64nIdVB720"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 372
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 376
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "恭喜翻倍",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 20,
+    "_fontSize": 20,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 1,
+    "_enableWrapText": false,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_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": "5d+t5/syxNr5N3cnPSFADZ"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "6e59YbqSFLQZGS7YZ2xd18",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 371
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 379
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "63djXU1nxGqp4A10wAindS"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 371
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 381
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "4aWZpepWRMULN5w9xr0yM6"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 371
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 383
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 2,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_hoverSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_pressedSprite": {
+      "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_disabledSprite": {
+      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 371
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "35ZJZTKklKr5cjlE8UAbhX"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "9adj0WB2NGwa9EeTglNQic",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 283
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 386
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
@@ -9164,7 +9539,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 374
+      "__id__": 388
     },
     "_alignFlags": 20,
     "_target": null,
@@ -9215,11 +9590,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 377
+        "__id__": 391
       }
     ],
     "_prefab": {
-      "__id__": 379
+      "__id__": 393
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9256,11 +9631,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 376
+      "__id__": 390
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 378
+      "__id__": 392
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9303,11 +9678,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 381
+        "__id__": 395
       }
     ],
     "_prefab": {
-      "__id__": 383
+      "__id__": 397
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9344,11 +9719,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 380
+      "__id__": 394
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 382
+      "__id__": 396
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9389,20 +9764,20 @@
     },
     "_children": [
       {
-        "__id__": 385
+        "__id__": 399
       },
       {
-        "__id__": 391
+        "__id__": 405
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 407
+        "__id__": 421
       }
     ],
     "_prefab": {
-      "__id__": 409
+      "__id__": 423
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9439,20 +9814,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 384
+      "__id__": 398
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 386
+        "__id__": 400
       },
       {
-        "__id__": 388
+        "__id__": 402
       }
     ],
     "_prefab": {
-      "__id__": 390
+      "__id__": 404
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9489,11 +9864,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 385
+      "__id__": 399
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 387
+      "__id__": 401
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9517,11 +9892,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 385
+      "__id__": 399
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 389
+      "__id__": 403
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -9575,24 +9950,24 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 384
+      "__id__": 398
     },
     "_children": [
       {
-        "__id__": 392
+        "__id__": 406
       },
       {
-        "__id__": 398
+        "__id__": 412
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 404
+        "__id__": 418
       }
     ],
     "_prefab": {
-      "__id__": 406
+      "__id__": 420
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9629,20 +10004,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 391
+      "__id__": 405
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 393
+        "__id__": 407
       },
       {
-        "__id__": 395
+        "__id__": 409
       }
     ],
     "_prefab": {
-      "__id__": 397
+      "__id__": 411
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9679,11 +10054,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 392
+      "__id__": 406
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 394
+      "__id__": 408
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9707,11 +10082,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 392
+      "__id__": 406
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 396
+      "__id__": 410
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -9765,20 +10140,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 391
+      "__id__": 405
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 399
+        "__id__": 413
       },
       {
-        "__id__": 401
+        "__id__": 415
       }
     ],
     "_prefab": {
-      "__id__": 403
+      "__id__": 417
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9815,11 +10190,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 398
+      "__id__": 412
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 400
+      "__id__": 414
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9843,11 +10218,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 398
+      "__id__": 412
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 402
+      "__id__": 416
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -9924,11 +10299,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 391
+      "__id__": 405
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 405
+      "__id__": 419
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9965,11 +10340,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 384
+      "__id__": 398
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 408
+      "__id__": 422
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10010,7 +10385,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 411
+      "__id__": 425
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10038,7 +10413,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 413
+      "__id__": 427
     },
     "_alignFlags": 45,
     "_target": null,
@@ -10087,7 +10462,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 416
+      "__id__": 430
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10115,7 +10490,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 418
+      "__id__": 432
     },
     "amountLb": {
       "__id__": 23
@@ -10204,10 +10579,10 @@
       "__id__": 246
     },
     "moveNode": {
-      "__id__": 376
+      "__id__": 390
     },
     "rotateNode": {
-      "__id__": 380
+      "__id__": 394
     },
     "brickNode": {
       "__id__": 298
@@ -10244,7 +10619,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 420
+      "__id__": 434
     },
     "_alignFlags": 45,
     "_target": null,

ファイルの差分が大きいため隠しています
+ 284 - 235
assets/bundle/gui/eliminate/prefab/gamePass.prefab


+ 10 - 10
assets/bundle/gui/eliminate/prefab/gooditem_1.prefab

@@ -57,7 +57,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -107,7 +107,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -250,7 +250,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -300,7 +300,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -323,7 +323,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 66.73828125,
+      "width": 0,
       "height": 75.6
     },
     "_anchorPoint": {
@@ -359,7 +359,7 @@
       "b": 9,
       "a": 255
     },
-    "_string": "30",
+    "_string": "",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 60,
@@ -441,7 +441,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 35.869140625,
+      "x": 2.5,
       "y": -4.227999999999952,
       "z": 0
     },
@@ -459,7 +459,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -591,7 +591,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 99.73828125,
+      "width": 33,
       "height": 60
     },
     "_anchorPoint": {
@@ -697,7 +697,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,

+ 10 - 10
assets/bundle/gui/eliminate/prefab/gooditem_2.prefab

@@ -57,7 +57,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -107,7 +107,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -250,7 +250,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -300,7 +300,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -323,7 +323,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 66.73828125,
+      "width": 0,
       "height": 75.6
     },
     "_anchorPoint": {
@@ -359,7 +359,7 @@
       "b": 9,
       "a": 255
     },
-    "_string": "30",
+    "_string": "",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 60,
@@ -441,7 +441,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 35.869140625,
+      "x": 2.5,
       "y": -4.227999999999952,
       "z": 0
     },
@@ -459,7 +459,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -591,7 +591,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 99.73828125,
+      "width": 33,
       "height": 60
     },
     "_anchorPoint": {
@@ -697,7 +697,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,

+ 10 - 10
assets/bundle/gui/eliminate/prefab/gooditem_3.prefab

@@ -57,7 +57,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -107,7 +107,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -250,7 +250,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -300,7 +300,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -323,7 +323,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 66.73828125,
+      "width": 0,
       "height": 75.6
     },
     "_anchorPoint": {
@@ -359,7 +359,7 @@
       "b": 9,
       "a": 255
     },
-    "_string": "30",
+    "_string": "",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 60,
@@ -441,7 +441,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 35.869140625,
+      "x": 2.5,
       "y": -4.227999999999952,
       "z": 0
     },
@@ -459,7 +459,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,
@@ -591,7 +591,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 99.73828125,
+      "width": 33,
       "height": 60
     },
     "_anchorPoint": {
@@ -697,7 +697,7 @@
       "z": 1
     },
     "_mobility": 0,
-    "_layer": 1073741824,
+    "_layer": 33554432,
     "_euler": {
       "__type__": "cc.Vec3",
       "x": 0,

+ 9 - 384
assets/bundle/gui/loading/loading.prefab

@@ -26,28 +26,25 @@
       },
       {
         "__id__": 46
-      },
-      {
-        "__id__": 89
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 103
+        "__id__": 89
       },
       {
-        "__id__": 105
+        "__id__": 91
       },
       {
-        "__id__": 107
+        "__id__": 93
       },
       {
-        "__id__": 109
+        "__id__": 95
       }
     ],
     "_prefab": {
-      "__id__": 111
+      "__id__": 97
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2002,378 +1999,6 @@
     "nestedPrefabInstanceRoots": null
   },
   {
-    "__type__": "cc.Node",
-    "_name": "btn_showAd",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [
-      {
-        "__id__": 90
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 96
-      },
-      {
-        "__id__": 98
-      },
-      {
-        "__id__": 100
-      }
-    ],
-    "_prefab": {
-      "__id__": 102
-    },
-    "_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.Node",
-    "_name": "Label",
-    "_objFlags": 512,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 89
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 91
-      },
-      {
-        "__id__": 93
-      }
-    ],
-    "_prefab": {
-      "__id__": 95
-    },
-    "_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__": 90
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 92
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 40
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "beSFoWPQ5JXoEaqddQH2Jd"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 90
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 94
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_string": "button",
-    "_horizontalAlign": 1,
-    "_verticalAlign": 1,
-    "_actualFontSize": 20,
-    "_fontSize": 20,
-    "_fontFamily": "Arial",
-    "_lineHeight": 40,
-    "_overflow": 1,
-    "_enableWrapText": false,
-    "_font": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_isItalic": false,
-    "_isBold": false,
-    "_isUnderline": false,
-    "_underlineHeight": 2,
-    "_cacheMode": 0,
-    "_enableOutline": false,
-    "_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": "8ac3Z5aYZCbqoWvyqG5e9Y"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "a5B0Uu4uNOn7W5xYXu/zEW",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 89
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 97
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 40
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "9dR1wotiZJ8LERufOre842"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 89
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 99
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": {
-      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_type": 1,
-    "_fillType": 0,
-    "_sizeMode": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "d3f3jWSZBAYas6CvOArGUQ"
-  },
-  {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 89
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 101
-    },
-    "clickEvents": [],
-    "_interactable": true,
-    "_transition": 2,
-    "_normalColor": {
-      "__type__": "cc.Color",
-      "r": 214,
-      "g": 214,
-      "b": 214,
-      "a": 255
-    },
-    "_hoverColor": {
-      "__type__": "cc.Color",
-      "r": 211,
-      "g": 211,
-      "b": 211,
-      "a": 255
-    },
-    "_pressedColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_disabledColor": {
-      "__type__": "cc.Color",
-      "r": 124,
-      "g": 124,
-      "b": 124,
-      "a": 255
-    },
-    "_normalSprite": {
-      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_hoverSprite": {
-      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_pressedSprite": {
-      "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_disabledSprite": {
-      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
-    "_duration": 0.1,
-    "_zoomScale": 1.2,
-    "_target": {
-      "__id__": 89
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "01LElVc8lM0ZW9RAgUhhLJ"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "58SEg+Z05KBqN7HxDcEZcN",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
-  {
     "__type__": "cc.UITransform",
     "_name": "loading<UITransform>",
     "_objFlags": 0,
@@ -2383,7 +2008,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 104
+      "__id__": 90
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2411,7 +2036,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 106
+      "__id__": 92
     },
     "_alignFlags": 45,
     "_target": null,
@@ -2447,7 +2072,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 108
+      "__id__": 94
     },
     "_id": ""
   },
@@ -2465,7 +2090,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 110
+      "__id__": 96
     },
     "_id": ""
   },

+ 3 - 3
assets/script/game/common/config/GameEvent.ts

@@ -2,7 +2,7 @@
  * @Author: dgflash
  * @Date: 2021-11-23 15:28:39
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-02 17:53:40
+ * @LastEditTime: 2025-04-10 17:12:49
  */
 
 /** 游戏事件 */
@@ -21,8 +21,8 @@ export enum GameEvent {
     DoubleSpeedOpenSuccess = "DoubleSpeedOpenSuccess",
     /**用户登录*/
     UserLogin = "UserLogin",
-    /**打开红包提现*/
-    openRedBagView = "openRedBagView",
+    /**打开*/
+    openView = "openView",
     /**打开提现记录*/
     openRecordView = "openRecordView",
 }

+ 102 - 0
assets/script/game/common/manager/ADHandler.ts

@@ -0,0 +1,102 @@
+// ADHandler.ts
+import { CocosHandlerType, CocosHandler } from './CocosHandler';
+import { AD_TYPE } from '../config/GameDefine';
+import { oops } from 'db://oops-framework/core/Oops';
+import { UIID } from '../config/GameUIConfig';
+import { smc } from '../SingletonModuleComp';
+import { ServerHandler } from './ServerHandler';
+import { LoginHandler } from './LoginHandler';
+
+export class ADHandler {
+    private static _inst: ADHandler;
+
+    public static get inst(): ADHandler {
+        if (!this._inst) {
+            this._inst = new ADHandler();
+        }
+        return this._inst;
+    }
+
+    showAd = async (id: string) => {
+        const { method, param } = this.buildAdParam(id);
+        const data: CocosHandlerType = {
+            method,
+            param: JSON.stringify(param)
+        };
+        return await CocosHandler.inst.sendMessageToAndroid(data, `广告 ${id}`);
+    };
+
+    private buildAdParam(id: string): { method: string, param: any } {
+        const param: any = {
+            funcId: id,
+            callback: {
+                onLoaded: '',
+                onShow: '',
+                onLoadFailed: '',
+                onShowFailed: '',
+                onClose: ''
+            }
+        };
+        let method = '';
+
+        switch (id) {
+            case AD_TYPE.Start:
+                method = 'ad.splash';
+                param.callback.onLoadFailed = 'ADHandler.inst.adSplashLoadFailed';
+                param.callback.onClose = 'ADHandler.inst.adSplashClose';
+                break;
+            case AD_TYPE.Jion_Main:
+            case AD_TYPE.Double_Close:
+            case AD_TYPE.Rebates:
+            case AD_TYPE.Double_Speed_Close:
+                method = 'ad.interstitial';
+                param.callback.onShowFailed = 'ADHandler.inst.adInterstitialShowFailed';
+                param.callback.onClose = 'ADHandler.inst.adInterstitialClose';
+                break;
+            default:
+                method = 'ad.reward';
+                param.callback.onShow = 'ADHandler.inst.adRewardShow';
+                param.callback.onClose = 'ADHandler.inst.adRewardClose';
+                param.callback.onShowFailed = 'ADHandler.inst.adRewardShowFailed';
+        }
+        return { method, param };
+    }
+
+    adSplashClose = async () => {
+        if (oops.gui.has(UIID.KindTips)) oops.gui.remove(UIID.KindTips);
+        if (oops.gui.has(UIID.Retention)) oops.gui.remove(UIID.Retention);
+
+        const result = await LoginHandler.inst.savePrivacyStatus(true);
+        if (result?.code === 0) {
+            ServerHandler.inst.getAccountInfo();
+        }
+    };
+
+    adSplashLoadFailed = () => {
+        console.log('[广告] 启屏广告加载失败');
+        ServerHandler.inst.getAccountInfo();
+    };
+
+    adInterstitialClose = (type: boolean) => {
+        console.log('[广告] 插屏广告关闭', type);
+    };
+
+    adInterstitialShowFailed = () => {
+        console.log('[广告] 插屏广告显示失败');
+    };
+
+    adRewardClose = (state: boolean) => {
+        console.log("[广告] 激励视频关闭")
+        smc.game.GameModel.isDone = state;
+    };
+
+    adRewardShow = (str: string) => {
+        const data = JSON.parse(str);
+        ServerHandler.inst.getSign(data.price);
+    };
+
+    adRewardShowFailed = (str: string) => {
+        console.log('[广告] 激励视频展示失败', str);
+    };
+}
+window["ADHandler"] = ADHandler;

+ 9 - 0
assets/script/game/common/manager/ADHandler.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "d2cd5402-e8a8-4103-92f2-0eaf19a31b83",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 20 - 459
assets/script/game/common/manager/CocosHandler.ts

@@ -1,32 +1,22 @@
 /*
  * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-03-31 10:45:44
+ * @Date: 2025-04-07 17:49:55
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 10:48:20
- * @Description: CocosHandler 处理类负责与安卓交互
+ * @LastEditTime: 2025-04-11 11:13:59
+ * @Description: 
  */
+// CocosHandler.ts
+// 封装对外模块调度(统一入口)
+
 import { native } from 'cc';
-import { _decorator } from 'cc';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
-import { smc } from '../SingletonModuleComp';
-import { Account } from '../../account/Account';
-import { oops } from 'db://oops-framework/core/Oops';
-import { GameEvent } from '../config/GameEvent';
-import { ProtocolEvent } from './ProtocolEvent';
-import { AndroidEvent } from '../config/AndroidEvent';
-import { UIID } from '../config/GameUIConfig';
-import { get } from 'http';
-import { AD_TYPE } from '../config/GameDefine';
-const { ccclass, property } = _decorator;
 
-type CocosHandlerType = {
+export type CocosHandlerType = {
     method: string;
     param?: string;
-}
+};
 
 export class CocosHandler {
-
-    // 单例模式
     private static _inst: CocosHandler;
     public static get inst(): CocosHandler {
         if (!this._inst) {
@@ -35,449 +25,20 @@ export class CocosHandler {
         return this._inst;
     }
 
-    // 发送消息到 Android
-    public async sendMessageToAndroid(data: CocosHandlerType) {
+    public async sendMessageToAndroid(data: CocosHandlerType, logTag: string = '') {
         if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
-            let result = await native.reflection.callStaticMethod("com/cocos/game/AtmobCocosCaller", "call", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", data.method, data.param);
-            return result;
-        }
-    }
-
-
-    //获取隐私授权状态
-    async getPrivacyStatus() {
-        const data: CocosHandlerType = {
-            method: "privacy.grant.get",
-        }
-        let result = await this.sendMessageToAndroid(data);
-        console.log("安卓返回隐私授权状态", result);
-        return JSON.parse(result);
-    }
-
-    //保存隐私授权状态
-    async savePrivacyStatus(status: boolean) {
-        const param = {
-            "granted": status,
-        }
-        const data: CocosHandlerType = {
-            method: "privacy.grant.set",
-            param: JSON.stringify(param)
-        }
-        let result = await this.sendMessageToAndroid(data);
-        console.log("安卓返回隐私授权状态", result);
-        return JSON.parse(result);
-    }
-
-
-    //打开隐私协议或者用户协议
-    openAgreement() {
-        const type = smc.account.AccountModel.protocolType;
-        const param = {
-            "url": type == 1 ? oops.config.game.gamePrivacyUrl : oops.config.game.gameProtocolUrl
-        }
-        const data: CocosHandlerType = {
-            method: "system.browser.open",
-            param: JSON.stringify(param)
-        }
-        this.sendMessageToAndroid(data);
-    }
-
-
-
-    //微信登录
-    async wechat_login() {
-        const param = {
-            "callback":
-            {
-                "onSuccess": "CocosHandler.inst.wechat_login_success",
-                "onFaile": "CocosHandler.inst.wechat_login_fail"
-            }
-        }
-
-        const data: CocosHandlerType = {
-            method: "auth.wechat",
-            param: JSON.stringify(param)
-        }
-        this.sendMessageToAndroid(data);
-    }
-
-
-    //微信登录成功回调
-    wechat_login_success(str: string) {
-        console.log("微信登录成功回调", str);
-        //保存数据
-        // oops.message.dispatchEvent(GameEvent.WechatLoginSuss);
-        // 获取用户信息
-        //然后就是和服务器通信
-        this.wx_login(str);
-    }
-
-    //微信登录失败回调
-    wechat_login_fail(str: string) {
-        console.log("微信登录失败回调", str);
-        oops.gui.toast("微信登录失败");
-    }
-
-    //==================跟服务器交互======================
-    //微信登录
-    async wx_login(code: string) {
-        const param = {
-            "code": code,
-            "url": ProtocolEvent.WechatLogin
-        }
-        const data: CocosHandlerType = {
-            method: "request.post",
-            param: JSON.stringify(param)
-        }
-
-        let result = await this.sendMessageToAndroid(data);
-        console.log("微信登录结果", result);
-        if (result.data) {
-            this.getAccountInfo();
-        }
-    }
-
-
-    //获取账号信息
-    getAccountInfo() {
-        const param = {
-            "url": ProtocolEvent.AccountInfo,
-            "callback": {
-                "onSuccess": "CocosHandler.inst.getAccountInfo_success",
-                "onFail": "CocosHandler.inst.getAccountInfo_fail"
-            }
-
-        }
-        this.sendMsgToServer(param);
-    }
-
-    //获取账号信息成功回调
-    getAccountInfo_success(str: string) {
-        console.log("获取账号信息成功回调", str);
-        //保存账号信息
-        let data = JSON.parse(str);
-        smc.account.AccountModel.uid = data.uid;
-        console.log("uid>>>>>>>", data.uid);
-        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;
-        smc.account.AccountModel.accountName = data.nickname;
-        smc.account.AccountModel.uid = data.uid;
-        smc.account.AccountModel.headUrl = data.headImgUrl;
-        oops.message.dispatchEvent(GameEvent.UserLogin);
-    }
-
-    //获取账号信息失败回调
-    getAccountInfo_fail(code: number, str: string) {
-        console.log("获取账号信息失败回调", str);
-    }
-
-
-    //领取每日奖励
-    getDailyReward(level: number) {
-        const param = {
-            "url": ProtocolEvent.GetDailyReward,
-            "param": {
-                "level": level
-            },
-            "callback": {
-                "onSuccess": "CocosHandler.inst.getDailyReward_success",
-                "onFail": "CocosHandler.inst.request_fail"
-            }
-        }
-        this.sendMsgToServer(param);
-    }
-
-    //领取每日奖励成功回调
-    getDailyReward_success(str: string) {
-        console.log("领取每日奖励成功回调", str);
-    }
-
-
-
-
-
-    //======获取红包提现列表数据
-    getDailyTaskReward() {
-        //先请求一遍用户道具信息
-        this.getUserItemInfo();
-        const param = {
-            "url": ProtocolEvent.GetDailyTask,
-            "callback": {
-                "onSuccess": "CocosHandler.inst.getDailyTaskReward_success",
-                "onFail": "CocosHandler.inst.request_fail"
-            }
-        }
-        this.sendMsgToServer(param);
-    }
-
-    //获取红包提现列表数据成功回调
-    getDailyTaskReward_success(str: string) {
-        console.log("获取红包提现列表数据成功回调", str);
-        //这里再打开记录
-        oops.message.dispatchEvent(GameEvent.openRedBagView, "openRedBagView");
-
-    }
-
-    //获取用户道具信息
-    getUserItemInfo() {
-        const param = {
-            "url": ProtocolEvent.UserItemInfo,
-            "callback": {
-                "onSuccess": "CocosHandler.inst.getUserItemInfo_success",
-                "onFail": "CocosHandler.inst.request_fail"
-            }
-        }
-        this.sendMsgToServer(param);
-    }
-
-    //获取用户道具信息成功
-    getUserItemInfo_success(str: string) {
-        console.log("获取用户道具信息成功回调", str);
-        //保存用户道具信息
-        let result = JSON.parse(str);
-        // smc.account.AccountModel.setUserItemInfo(result);
-        smc.account.AccountModel.gameCoin = result.data.props["1005"];
-        smc.account.AccountModel.cashCoin = result.data.props["1004"];
-        smc.account.AccountModel.handlingCharge = result.data.props["1009"];
-        smc.account.AccountModel.goldCoin = result.data.propsp["1006"];
-    }
-
-
-    //获取提现记录
-    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);
-
-    }
-
-
-
-
-
-    //发送信息给服务器
-    sendMsgToServer(param: any) {
-        const data: CocosHandlerType = {
-            method: "request.post",
-            param: JSON.stringify(param)
-        }
-        this.sendMessageToAndroid(data);
-    }
-
-
-
-
-
-
-
-
-    request_fail(code: number, str: string) {
-        console.log("请求失败回调", code, str);
-    }
-    //=================================以下是广告方法====================
-    //每次启动都加载一次启屏广告
-
-    //显示广告
-    async show_ad(id: string) {
-        const data: CocosHandlerType = {
-            method: "",
-            param: ""
-        }
-        const param = {
-            "funcId": "",
-            "callback":
-            {
-                "onLoaded": "",
-                "onShow": "",
-                "onLoadFailed": "",
-                "onShowFailed": "",
-                "onClose": ""
-            }
-        }
-        switch (id) {
-            //启屏广告
-            case AD_TYPE.Start:
-                param.funcId = id;
-                param.callback.onShowFailed = "CocosHandler.inst.ad_splash_onShowFailed";
-                param.callback.onClose = "CocosHandler.inst.ad_splash_close";
-                data.method = "ad.splash";
-                break;
-            //插屏广告
-            case AD_TYPE.Jion_Main:
-            case AD_TYPE.Double_Close:
-            case AD_TYPE.Rebates:
-            case AD_TYPE.Double_Speed_Close:
-                param.funcId = id;
-                data.method = "ad.interstitial";
-                param.callback.onClose = "CocosHandler.inst.ad_interstitial_close";
-                param.callback.onShowFailed = "CocosHandler.inst.ad_interstitial_show_failed";
-                break;
-            //激励广告
-            case AD_TYPE.Double_Receive:
-            case AD_TYPE.Double_Speed_Receive:
-            case AD_TYPE.Pass_Receive:
-            case AD_TYPE.Resurrection:
-                param.funcId = id;
-                data.method = "ad.reward"
-                param.callback.onClose = "CocosHandler.inst.ad_reward_close";
-                param.callback.onShowFailed = "CocosHandler.inst.ad_reward_onShowFailed"
-
-                break;
-
-
-
-        }
-
-
-
-
-
-
-        data.param = JSON.stringify(param);
-        let result = await this.sendMessageToAndroid(data);
-        console.log("广告ID", id, "广告返回数据", result);
-        return result;
-
-    }
-
-
-    async ad_interstitial_start() {
-        const param = {
-            "funcId": "101",
-            "callback":
-            {
-                "onShowFailed": "ad_splash_onShowFailed",
-                "onClose": "CocosHandler.inst.ad_splash_close"
-            }
-        }
-        const data: CocosHandlerType = {
-            method: "ad.splash",
-            param: JSON.stringify(param)
-        }
-        let result = await this.sendMessageToAndroid(data);
-        console.log("启屏广告返回数据", result);
-        return result;
-    }
-
-
-    //启屏广告关闭时回调
-    async ad_splash_close() {
-        if (oops.gui.has(UIID.KindTips)) {
-            oops.gui.remove(UIID.KindTips);
-        }
-        if (oops.gui.has(UIID.Retention)) {
-            oops.gui.remove(UIID.Retention);
-        }
-        let result = await CocosHandler.inst.savePrivacyStatus(true);
-        if (result.code == 0) {
-            //广告结束后调用登录
-            this.getAccountInfo();
-        }
-    }
-
-    //启屏广告加载失败
-    ad_splash_onShowFailed() {
-        this.getAccountInfo();
-    }
-
-
-    //广告请求--插屏广告
-    async ad_interstitial(code: string) {
-        const param = {
-            "funcId": code,
-            "callback":
-            {
-                "onLoaded": "",
-                "onLoadFailed": "CocosHandler.inst.ad_interstitial_load_failed",
-                "onShow": "",
-                "onShowFailed": "CocosHandler.inst.ad_interstitial_show_failed",
-                "onClose": "CocosHandler.inst.ad_interstitial_close"
+            const result = await native.reflection.callStaticMethod(
+                'com/cocos/game/AtmobCocosCaller',
+                'call',
+                '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;',
+                data.method,
+                data.param
+            );
+            if (logTag) {
+                console.log(`[${logTag}] Android 返回:`, result);
             }
+            return result;
         }
-        const data: CocosHandlerType = {
-            method: "ad.interstitial",
-            param: JSON.stringify(param)
-        }
-        let result = await this.sendMessageToAndroid(data);
-        return result;
-    }
-
-
-    //广告关闭回调
-    ad_interstitial_close(type: boolean) {
-        console.log("广告关闭回调", type);
-    }
-
-    //广告加载成功回调
-    ad_interstitial_loaded() {
-        console.log("广告加载成功回调");
-    }
-
-    //广告加载失败回调
-    ad_interstitial_load_failed(msg: string) {
-        console.log("广告加载失败回调", msg);
-    }
-
-    //广告显示失败回调
-    ad_interstitial_show_failed() {
-        console.log("广告显示失败回调");
-    }
-
-    //广告请求--激励视频广告
-    async ad_reward(id: number) {
-        const param = {
-            "funcId": `${id}`,
-            "callback":
-            {
-                "onClose": "CocosHandler.inst.ad_reward_close"
-            }
-        }
-        const data: CocosHandlerType = {
-            method: "ad.reward",
-            param: JSON.stringify(param)
-        }
-        let result = await this.sendMessageToAndroid(data);
-        return result;
+        return null;
     }
-
-
-    //激励视频广告关闭回调
-    ad_reward_close(str: string) {
-        console.log("激励视频广告关闭回调", str);
-
-
-        //返回通知主场景,告诉要不要发奖励
-    }
-
-    //激励视频显示失败回调
-    ad_reward_onShowFailed(str: string) {
-        console.log("激励视频显示失败回调", str);
-    }
-
 }
-window['CocosHandler'] = CocosHandler;
-
-

+ 78 - 0
assets/script/game/common/manager/LoginHandler.ts

@@ -0,0 +1,78 @@
+// LoginHandler.ts
+import { oops } from 'db://oops-framework/core/Oops';
+import { smc } from '../SingletonModuleComp';
+import { ServerHandler } from './ServerHandler';
+import { CocosHandler } from './CocosHandler';
+
+export class LoginHandler {
+    private static _inst: LoginHandler;
+
+    public static get inst(): LoginHandler {
+        if (!this._inst) {
+            this._inst = new LoginHandler();
+        }
+        return this._inst;
+    }
+
+    async getPrivacyStatus() {
+        const data = { method: 'privacy.grant.get' };
+        const result = await CocosHandler.inst.sendMessageToAndroid(data, '获取隐私授权状态');
+        return JSON.parse(result);
+    }
+
+    async savePrivacyStatus(status: boolean) {
+        const data = {
+            method: 'privacy.grant.set',
+            param: JSON.stringify({ granted: status })
+        };
+        const result = await CocosHandler.inst.sendMessageToAndroid(data, '保存隐私授权状态');
+        return JSON.parse(result);
+    }
+
+    openAgreement() {
+        const type = smc.game.GameModel.protocolType;
+        const url = type === 1 ? oops.config.game.gamePrivacyUrl : oops.config.game.gameProtocolUrl;
+        const data = {
+            method: 'system.browser.open',
+            param: JSON.stringify({ url })
+        };
+        CocosHandler.inst.sendMessageToAndroid(data, '打开协议链接');
+    }
+
+    async wechatLogin() {
+        const param = {
+            callback: {
+                onSuccess: 'LoginHandler.inst.wechatLoginSuccess',
+                onFaile: 'LoginHandler.inst.wechatLoginFail'
+            }
+        };
+        const data = {
+            method: 'auth.wechat',
+            param: JSON.stringify(param)
+        };
+        await CocosHandler.inst.sendMessageToAndroid(data, '微信登录');
+    }
+
+    wechatLoginSuccess(str: string) {
+        console.log('[微信] 登录成功', str);
+        this.wxLogin(str);
+    }
+
+    wechatLoginFail(str: string) {
+        console.log('[微信] 登录失败', str);
+        oops.gui.toast('微信登录失败');
+    }
+
+    async wxLogin(code: string) {
+        const param = {
+            method: 'request.post',
+            param: JSON.stringify({ code, url: '/api/wxlogin' }) // 修改为实际接口
+        };
+        const result = await CocosHandler.inst.sendMessageToAndroid(param, '请求服务器微信登录');
+        if (result?.data) {
+            ServerHandler.inst.getAccountInfo();
+        }
+    }
+}
+
+window["LoginHandler"] = LoginHandler;

+ 9 - 0
assets/script/game/common/manager/LoginHandler.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "454137b9-a292-4ca9-9503-91ca3b14e9b1",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 13 - 5
assets/script/game/common/manager/ProtocolEvent.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 15:29:28
+ * @LastEditTime: 2025-04-10 17:04:18
  * @Description: 消息定义
  */
 
@@ -33,14 +33,12 @@ export enum ProtocolEvent {
     /**全部领取翻倍奖励*/
     GetAllDoublePassReward = server_url + "/project/playlet/v1/reward/twoDouble",
     /**消除奖励*/
-    GetEliminationReward = server_url + "/project/playlet/v1/reward/elimination",
+    GetEliminationReward = server_url + "/project/playlet/v1/elimination/reward",
     /**红包币提现*/
     GetRedPacketCash = server_url + "/project/playlet/v1/withdraw/convert",
     /**提现记录*/
     GetWithdrawRecord = server_url + "/project/playlet/v1/withdraw/log/page",
-    /**提现返利*/
-    GetWithdrawReward = server_url + "/project/playlet/v1/withdraw/rebate",
-    /**提现页信息*/
+    /**微信提现页信息*/
     GetWithdrawInfo = server_url + "/project/playlet/v3/withdraw/view/detail",
     /**福利点提现*/
     GetWelfarePointCash = server_url + "/project/playlet/v1/reward/weal",
@@ -54,6 +52,16 @@ export enum ProtocolEvent {
     SaveCurrentLevelInfo = server_url + "/project/playlet/v1/checkPoint/saveLevelInfo",
     /**下一关*/
     NextLevel = server_url + "/project/playlet/v1/checkPoint/next",
+    /**获取通关奖励数*/
+    getGameAward = server_url + "/project/playlet/v1/reward/passView",
+    /**惊喜翻倍奖励信息*/
+    getDoubleAwardInfo = server_url + "/project/playlet/v1/reward/doubleView",
+    /**提现返利信息*/
+    GetWithdrawReward = server_url + "/project/playlet/v1/withdraw/rebate",
+    /**广告视频开始*/
+    AdVideoStart = server_url + "/project/playlet/v1/video/start",
+
+
 
 }
 

+ 208 - 0
assets/script/game/common/manager/ServerHandler.ts

@@ -0,0 +1,208 @@
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-11 10:16:41
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-11 11:34:08
+ * @Description: 
+ */
+// ServerHandler.ts
+import { smc } from '../SingletonModuleComp';
+import { GameEvent } from '../config/GameEvent';
+import { oops } from 'db://oops-framework/core/Oops';
+import { CocosHandler, CocosHandlerType } from './CocosHandler';
+import { ProtocolEvent } from './ProtocolEvent';
+
+export class ServerHandler {
+    private static _inst: ServerHandler;
+
+    public static get inst(): ServerHandler {
+        if (!this._inst) {
+            this._inst = new ServerHandler();
+        }
+        return this._inst;
+    }
+
+
+    private buildCallback(success: string, fail?: string) {
+        const callback: any = { onSuccess: success };
+        if (fail) callback.onFail = fail;
+        return callback;
+    }
+
+    async sendMsgToServer(param: any) {
+        const data: CocosHandlerType = {
+            method: 'request.post',
+            param: JSON.stringify(param)
+        };
+        return await CocosHandler.inst.sendMessageToAndroid(data, '服务器请求');
+    }
+
+    getAccountInfo() {
+        const param = {
+            url: ProtocolEvent.AccountInfo,
+            callback: this.buildCallback('ServerHandler.inst.onAccountInfo', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onAccountInfo(str: string) {
+        const data = JSON.parse(str);
+        const account = smc.account.AccountModel;
+        const game = smc.game.GameModel;
+
+        account.uid = data.uid;
+        account.accountName = data.nickname;
+        account.headUrl = data.headImgUrl;
+        account.isLogined = data.isBand;
+        account.curLevel = data.currentLevelInfo.level;
+
+        game.curScore = data.currentLevelInfo.score;
+        game.targetScore = data.currentLevelConf.score;
+        game.curLevelConfig = data.currentLevelConf;
+        game.costInfo = data.handlingChargeConf;
+
+        oops.message.dispatchEvent(GameEvent.UserLogin);
+    }
+
+    getDailyReward(level: number) {
+        const param = {
+            url: ProtocolEvent.GetDailyReward,
+            param: { level },
+            callback: this.buildCallback('ServerHandler.inst.onDailyReward', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onDailyReward(str: string) {
+        console.log('[服务器] 每日奖励返回', str);
+    }
+
+    getDailyTaskReward() {
+        this.getUserItemInfo();
+        const param = {
+            url: ProtocolEvent.GetDailyTask,
+            callback: this.buildCallback('ServerHandler.inst.onDailyTaskReward', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onDailyTaskReward(str: string) {
+        console.log('[服务器] 红包任务数据返回', str);
+        oops.message.dispatchEvent(GameEvent.openView, 'openRedBagView');
+    }
+
+    getUserItemInfo() {
+        const param = {
+            url: ProtocolEvent.UserItemInfo,
+            callback: this.buildCallback('ServerHandler.inst.onUserItemInfo', 'ServerHandler.instonRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onUserItemInfo(str: string) {
+        const result = JSON.parse(str);
+        const props = result.data.props;
+        const account = smc.account.AccountModel;
+        const game = smc.game.GameModel;
+        account.gameCoin = props['1005'];
+        account.cashCoin = props['1004'];
+        account.goldCoin = props['1006'];
+        game.handlingCharge = props['1009'];
+    }
+
+    getRecordList() {
+        const param = {
+            url: ProtocolEvent.GetWithdrawRecord,
+            param: {
+                offset: 0,
+                limit: 50
+            },
+            callback: this.buildCallback('ServerHandler.inst.onRecordList', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onRecordList(str: string) {
+        const result = JSON.parse(str);
+        if (result.count > 0) {
+            smc.game.GameModel.recordList = result.data.list;
+        }
+        oops.message.dispatchEvent(GameEvent.openRecordView);
+    }
+
+    getGameAwardInfo() {
+        const param = {
+            url: ProtocolEvent.getGameAward,
+            callback: this.buildCallback('ServerHandler.inst.onGameAwardInfo', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onGameAwardInfo(str: string) {
+        const result = JSON.parse(str);
+        smc.game.GameModel.passViewInfo = result;
+        oops.message.dispatchEvent(GameEvent.openView, 'openPassView');
+    }
+
+    getTxbfInfo() {
+        const param = {
+            url: ProtocolEvent.GetWithdrawReward,
+            callback: this.buildCallback('ServerHandler.inst.onRebates', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onRebates(str: string) {
+        console.log('[服务器] 提现返利信息', str);
+    }
+
+    getDoubleSurprise() {
+        const param = {
+            url: ProtocolEvent.getDoubleAwardInfo,
+            callback: this.buildCallback('ServerHandler.inst.onDoubleSurprise', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onDoubleSurprise(str: string) {
+        console.log('[服务器] 恭喜翻倍信息', str);
+    }
+
+    updateEliminationReward(data: { level: number, score: number, count: number }) {
+        const param = {
+            url: ProtocolEvent.GetEliminationReward,
+            param: {
+                eliminationCount: data.count,
+                level: data.level,
+                score: data.score
+            },
+            callback: this.buildCallback('ServerHandler.inst.onEliminationSuccess', 'ServerHandler.inst.onRequestFail')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onEliminationSuccess(str: string) {
+        console.log('[服务器] 消除成功返回', str);
+    }
+
+    getSign(price: number) {
+        const param = {
+            url: ProtocolEvent.AdVideoStart,
+            param: { ecpm: price },
+            callback: this.buildCallback('ServerHandler.inst.onSign')
+        };
+        this.sendMsgToServer(param);
+    }
+
+    onSign(str: string) {
+        console.log('[服务器] 签名返回', str);
+        let result = JSON.parse(str);
+        smc.game.GameModel.sign = result?.sign || "";
+    }
+
+    onRequestFail(code: number, str: string) {
+        console.log('[服务器] 请求失败', code, str);
+    }
+}
+
+window["ServerHandler"] = ServerHandler;

+ 9 - 0
assets/script/game/common/manager/ServerHandler.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "11290750-f14b-48c8-b0e0-a1dd0681402f",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 6 - 5
assets/script/game/common/setting/SettingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:40:20
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 16:55:59
+ * @LastEditTime: 2025-04-11 11:23:02
  * @Description:设置界面 
  */
 import { _decorator } from "cc";
@@ -18,6 +18,7 @@ import { IRemoteOptions, resLoader } from "db://oops-framework/core/common/loade
 import { Button } from "cc";
 import { smc } from "../SingletonModuleComp";
 import { CocosHandler } from "../manager/CocosHandler";
+import { LoginHandler } from "../manager/LoginHandler";
 const { ccclass, property } = _decorator;
 
 /** 视图层对象 */
@@ -154,14 +155,14 @@ export class SettingViewComp extends CCVMParentComp {
 
     //隐私协议
     private btn_privacy() {
-        smc.account.AccountModel.protocolType = 1;
-        CocosHandler.inst.openAgreement();
+        smc.game.GameModel.protocolType = 1;
+        LoginHandler.inst.openAgreement();
     }
 
     //用户协议
     private btn_protocol() {
-        smc.account.AccountModel.protocolType = 2;
-        CocosHandler.inst.openAgreement();
+        smc.game.GameModel.protocolType = 2;
+        LoginHandler.inst.openAgreement();
     }
 
 }

+ 5 - 4
assets/script/game/common/tips/ClickEventHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 17:46:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 11:36:11
+ * @LastEditTime: 2025-04-10 15:31:35
  * @Description: 用户协议和隐私协议点击事件
  */
 import { sys } from 'cc';
@@ -11,6 +11,7 @@ import { oops } from 'db://oops-framework/core/Oops';
 import { GameComponent } from "db://oops-framework/module/common/GameComponent";
 import { CocosHandler } from '../manager/CocosHandler';
 import { smc } from '../SingletonModuleComp';
+import { LoginHandler } from '../manager/LoginHandler';
 
 const { ccclass, property } = _decorator;
 
@@ -24,15 +25,15 @@ export class ClickEventHandler extends GameComponent {
             case "User Agreement":
                 // 在游戏内打开用户协议
                 // sys.openURL("https://store.cocos.com/app/detail/3814");
-                smc.account.AccountModel.protocolType = 2;
+                smc.game.GameModel.protocolType = 2;
                 break;
             case "Privacy Policy":
                 // 在游戏内打开隐私协议
-                smc.account.AccountModel.protocolType = 1;
+                smc.game.GameModel.protocolType = 1;
                 // sys.openURL("https://store.cocos.com/app/detail/3814");
                 break;
         }
 
-        CocosHandler.inst.openAgreement();
+        LoginHandler.inst.openAgreement();
     }
 }

+ 7 - 2
assets/script/game/common/tips/KindTipsView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 18:02:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-09 10:26:25
+ * @LastEditTime: 2025-04-11 11:23:26
  * @Description: 温馨提示弹窗
  */
 import { _decorator } from 'cc';
@@ -12,6 +12,8 @@ import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
 import { AD_TYPE } from '../config/GameDefine';
 import { UIID } from '../config/GameUIConfig';
 import { CocosHandler } from '../manager/CocosHandler';
+import { ADHandler } from '../manager/ADHandler';
+import { LoginHandler } from '../manager/LoginHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('KindTipsView')
@@ -24,9 +26,12 @@ export class KindTipsView extends GameComponent {
         console.log("同意");
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             // CocosHandler.inst.ad_interstitial_start();
-            CocosHandler.inst.show_ad(AD_TYPE.Start);
+            LoginHandler.inst.savePrivacyStatus(true);
+            ADHandler.inst.showAd(AD_TYPE.Start);
             oops.gui.remove(UIID.KindTips);
         }
+
+
     }
 
     private btn_disagree() {

+ 5 - 2
assets/script/game/common/tips/RetentionView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 18:02:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 10:51:35
+ * @LastEditTime: 2025-04-11 11:23:56
  * @Description: 隐私挽留弹窗
  */
 import { _decorator, game } from 'cc';
@@ -12,6 +12,8 @@ import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
 import { AD_TYPE } from '../config/GameDefine';
 import { UIID } from '../config/GameUIConfig';
 import { CocosHandler } from '../manager/CocosHandler';
+import { ADHandler } from '../manager/ADHandler';
+import { LoginHandler } from '../manager/LoginHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('RetentionView')
@@ -25,7 +27,8 @@ export class RetentionView extends GameComponent {
         //调用安卓给权限
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             // CocosHandler.inst.ad_interstitial_start();
-            CocosHandler.inst.show_ad(AD_TYPE.Start);
+            LoginHandler.inst.savePrivacyStatus(true);
+            ADHandler.inst.showAd(AD_TYPE.Start);
             oops.gui.remove(UIID.Retention);
         }
     }

+ 7 - 4
assets/script/game/initialize/view/LoadingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 16:23:51
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 15:16:01
+ * @LastEditTime: 2025-04-11 11:24:58
  * @Description: loading界面
  */
 import { _decorator, Toggle } from "cc";
@@ -18,6 +18,9 @@ import { CocosHandler } from "../../common/manager/CocosHandler";
 import { smc } from "../../common/SingletonModuleComp";
 import { AD_TYPE } from "../../common/config/GameDefine";
 import { EliminateViewComp } from "../../view/EliminateViewComp";
+import { ServerHandler } from "../../common/manager/ServerHandler";
+import { ADHandler } from "../../common/manager/ADHandler";
+import { LoginHandler } from "../../common/manager/LoginHandler";
 const { ccclass, property } = _decorator;
 
 /** 游戏资源加载 */
@@ -58,12 +61,12 @@ export class LoadingViewComp extends CCVMParentComp {
 
     async enter() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            const state = await CocosHandler.inst.getPrivacyStatus();
+            const state = await LoginHandler.inst.getPrivacyStatus();
             console.log("隐私状态>>>>>>>>>>>>>>>>", state);
             if (state.data.result) {
                 //同意之后都加载一次启屏广告
                 // CocosHandler.inst.ad_interstitial_start();
-                CocosHandler.inst.show_ad(AD_TYPE.Start);
+                ADHandler.inst.showAd(AD_TYPE.Start);
             } else {
                 oops.gui.open(UIID.KindTips);
             }
@@ -169,7 +172,7 @@ export class LoadingViewComp extends CCVMParentComp {
         //暂时跳过这个登录
         // CocosHandler.inst.wechat_login();
         //直接获取信息
-        CocosHandler.inst.getAccountInfo();
+        ServerHandler.inst.getAccountInfo();
     }
 
     /**

+ 47 - 6
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-10 15:25:01
+ * @LastEditTime: 2025-04-10 18:24:31
  * @Description: 
  */
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
@@ -37,7 +37,15 @@ interface RecordInfo {
     status: number
 }
 
+interface goodsList {
+    propId: string,
+    propNum: number
+}
 
+interface PassViewInfo {
+    showReward: goodsList[]
+    doubleReward: boolean
+}
 
 
 /** 数据层对象 */
@@ -62,13 +70,16 @@ export class GameModelComp extends ecs.Comp {
     _costInfo: CostInfo = null!;
     //提现记录
     _recordList: RecordInfo[] = [];
-
     //是否是广告时间
     _isShowAd: boolean = false;
-
-
-
-
+    /**激励广告价值*/
+    _price: number = 0;
+    /**看完广告是否发奖励*/
+    _isDone: boolean = false;
+    /**通关奖励*/
+    _passViewInfo: PassViewInfo = null!;
+    /**视频签名*/
+    _sign: string = "";
 
 
     /** 数据层组件移除时,重置所有数据为默认值 */
@@ -82,10 +93,31 @@ export class GameModelComp extends ecs.Comp {
 
 
 
+    set price(value: number) {
+        this._price = value;
+    }
 
+    get price() {
+        return this._price;
+    }
 
 
+    set isDone(value: boolean) {
+        this._isDone = value;
+    }
 
+    get isDone() {
+        return this._isDone;
+    }
+
+
+    set sign(value: string) {
+        this._sign = value;
+    }
+
+    get sign() {
+        return this._sign;
+    }
 
     get handlingCharge() {
         return this._handlingCharge;
@@ -164,5 +196,14 @@ export class GameModelComp extends ecs.Comp {
     }
 
 
+    get passViewInfo() {
+        return this._passViewInfo;
+    }
+
+    set passViewInfo(value: PassViewInfo) {
+        this._passViewInfo = value;
+    }
+
+
 
 }

+ 4 - 3
assets/script/game/view/CashRebateView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:45:43
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 15:07:56
+ * @LastEditTime: 2025-04-11 11:25:36
  * @Description: 提现必返
  */
 import { _decorator, Label } from 'cc';
@@ -11,6 +11,7 @@ import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { GameComponent } from "db://oops-framework/module/common/GameComponent";
 import { UIID } from '../common/config/GameUIConfig';
 import { CocosHandler } from '../common/manager/CocosHandler';
+import { ADHandler } from '../common/manager/ADHandler';
 
 
 const { ccclass, property } = _decorator;
@@ -27,7 +28,7 @@ export class CashRebateView extends GameComponent {
     private btn_ok() {
         //看广告
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.ad_interstitial("105");
+            ADHandler.inst.showAd("105");
         } else {
             oops.gui.remove(UIID.CashRebate);
         }
@@ -36,7 +37,7 @@ export class CashRebateView extends GameComponent {
     private btn_close() {
         //看广告
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.ad_interstitial("105");
+            ADHandler.inst.showAd("105");
         } else {
             oops.gui.remove(UIID.CashRebate);
         }

+ 3 - 2
assets/script/game/view/DoubleSpeedViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:17:22
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 15:11:45
+ * @LastEditTime: 2025-04-11 11:25:47
  * @Description: 二倍速弹窗
  */
 import { _decorator, Label, RichText } from "cc";
@@ -11,6 +11,7 @@ import { ecs } from "db://oops-framework/libs/ecs/ECS";
 import { CCComp } from "db://oops-framework/module/common/CCComp";
 import { UIID } from "../common/config/GameUIConfig";
 import { CocosHandler } from "../common/manager/CocosHandler";
+import { ADHandler } from "../common/manager/ADHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -76,6 +77,6 @@ export class DoubleSpeedViewComp extends CCComp {
     private btn_close() {
         oops.gui.remove(UIID.DoubleSpeed);
         //播放插屏广告
-        CocosHandler.inst.ad_interstitial("107");
+        ADHandler.inst.showAd("107");
     }
 }

+ 111 - 45
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-10 15:29:11
+ * @LastEditTime: 2025-04-11 11:27:37
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -15,6 +15,7 @@ import { GameEvent } from "../common/config/GameEvent";
 import { UIID } from "../common/config/GameUIConfig";
 import { CocosHandler } from "../common/manager/CocosHandler";
 import { smc } from "../common/SingletonModuleComp";
+import { ServerHandler } from "../common/manager/ServerHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -195,6 +196,13 @@ export class EliminateViewComp extends CCComp {
 
     private autoState: boolean = false;  //自动状态
 
+    private eliminateBaseScore: number = 10;
+    private extraGridScore: number = 1;
+    private placementBaseScore: number = 1;
+
+    private totalEliminationCount: number = 0;   // 总消除次数(包括行和列)
+    private currentCombo: number = 0;            // 当前连击次数
+
     /** 视图层逻辑代码分离演示 */
     async start() {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
@@ -211,7 +219,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)
+        oops.message.on(GameEvent.openView, this.openView, this)
     }
 
 
@@ -248,6 +256,8 @@ export class EliminateViewComp extends CCComp {
         this.totalNum = 0;
         this.autoState = false;
         this.shouldResetEliminateCount = true;
+        this.totalEliminationCount = 0;
+        this.currentCombo = 0;
         this.lab_score.string = this.score.toString();
         this.amountLb.string = this.money.toString();
         this.awardLb.string = this.cash.toString();
@@ -268,13 +278,14 @@ export class EliminateViewComp extends CCComp {
     }
 
 
-    openView(args: string) {
+    openView(event: string, args: string) {
         console.log(">>>>>>args>>>>>>>>>>>", args);
         switch (args) {
             case "openRedBagView":
                 oops.gui.open(UIID.RedPacketWithdraw);
                 break;
-            case "":
+            case "openPassView":
+                oops.gui.open(UIID.GamePass);
                 break;
         }
     }
@@ -897,6 +908,9 @@ export class EliminateViewComp extends CCComp {
     showScoreAnimation(position: Vec3, score: number) {
         if (!this.lab_addScore) return;
 
+        // 计算得分(未消除时的得分)
+        const calculatedScore = score * this.placementBaseScore;
+
         // 复制得分Label
         const scoreLabel = instantiate(this.lab_addScore.node);
         scoreLabel.active = true;
@@ -904,7 +918,7 @@ export class EliminateViewComp extends CCComp {
         // 设置文本和位置
         const label = scoreLabel.getComponent(Label);
         if (label) {
-            label.string = `+${score}`;
+            label.string = `+${calculatedScore}`;
         }
 
         // 添加到场景中
@@ -926,24 +940,27 @@ export class EliminateViewComp extends CCComp {
             .start();
 
         // 更新总分
-        this.score += score;
+        this.score += calculatedScore;
         this.lab_score.string = this.score.toString();
         //计算总分够一局没有,够就马上停止,展示界面
-
     }
 
     // 显示消除次数动画
-    showEliminateCountAnimation(yPosition: number) {
+    showEliminateCountAnimation(yPosition: number, eliminationCount: number) {
         if (!this.lab_total) return;
 
         // 如果需要重置计数器,先将计数归零
         if (this.shouldResetEliminateCount) {
-            this.totalNum = 0;
+            this.currentCombo = 0;
             this.shouldResetEliminateCount = false;
         }
 
         // 增加累计消除次数
-        this.totalNum++;
+        this.currentCombo += eliminationCount;
+        this.totalEliminationCount += eliminationCount;
+
+        // 更新总消除次数显示
+        this.lab_total.string = `${this.totalEliminationCount}`;
 
         // 复制总次数Label
         const totalLabel = instantiate(this.lab_total.node);
@@ -952,7 +969,7 @@ export class EliminateViewComp extends CCComp {
         // 设置文本
         const label = totalLabel.getComponent(Label);
         if (label) {
-            label.string = `Combo${this.totalNum}`;
+            label.string = `Combo${this.currentCombo}`;
         }
 
         // 添加到场景中
@@ -969,7 +986,6 @@ export class EliminateViewComp extends CCComp {
         totalLabel.setWorldPosition(centerPos);
 
         // 创建动画效果
-
         const num = this._isDoubleSpeed ? this._doubleNum : 1;
         tween(totalLabel)
             .to(0.3 / num, {
@@ -995,6 +1011,7 @@ export class EliminateViewComp extends CCComp {
             const gridEliminateList = d.gridEliminateList
             const eliminateRowNum = d.eliminateRowNum
             const eliminateColumnNum = d.eliminateColumnNum
+            const totalEliminationsInThisRound = eliminateRowNum + eliminateColumnNum
 
             if (gridEliminateList.length < 1) {
                 // 没有发生消除
@@ -1016,8 +1033,8 @@ export class EliminateViewComp extends CCComp {
                 }
                 // 计算平均Y位置
                 const avgY = validGrids > 0 ? totalY / validGrids : 0;
-                // 显示消除次数动画,传入Y轴位置
-                this.showEliminateCountAnimation(avgY);
+                // 显示消除次数动画,传入Y轴位置和本次消除的行列总数
+                this.showEliminateCountAnimation(avgY, totalEliminationsInThisRound);
             }
 
             const num = this._isDoubleSpeed ? this._doubleNum : 1;
@@ -1045,20 +1062,28 @@ export class EliminateViewComp extends CCComp {
                         this.redPacketPrefab,
                         startPos,
                         this.awardLb.node.getWorldPosition(),
-                        5
+                        3
                     );
                 }
             })
 
             this.scheduleOnce(() => {
-                let score = 0
+                // 计算分数:每行/列的基础分 + 每个额外格子的分数
+                let score = 0;
+
+                // 行消除基础分
                 for (let i = 1; i <= eliminateRowNum; i++) {
-                    score += this.cols * i
+                    score += this.eliminateBaseScore; // 每行基础分
+                    score += (this.cols - 1) * this.extraGridScore; // 额外格子分
                 }
+
+                // 列消除基础分
                 for (let i = 1; i <= eliminateColumnNum; i++) {
-                    score += this.rows * i
+                    score += this.eliminateBaseScore; // 每列基础分
+                    score += (this.rows - 1) * this.extraGridScore; // 额外格子分
                 }
-                this.score += score
+
+                this.score += score;
                 this.lab_score.string = this.score.toString();
 
                 const lastGrid = gridEliminateList[gridEliminateList.length - 1];
@@ -1090,9 +1115,16 @@ export class EliminateViewComp extends CCComp {
                     );
                 }
 
+                if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+                    ServerHandler.inst.updateEliminationReward({
+                        count: 1,
+                        score: this.score,
+                        level: 1
+                    })
+                }
+
                 // 告诉调用者有消除发生
                 resolve(true)
-
                 // 检查是否需要继续消除
                 this.scheduleOnce(() => {
                     // 递归调用,检查并处理连锁消除
@@ -1503,7 +1535,7 @@ export class EliminateViewComp extends CCComp {
         //oops.gui.open(UIID.RedPacketWithdraw);
 
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.getDailyTaskReward();
+            ServerHandler.inst.getDailyTaskReward();
         } else {
             oops.gui.open(UIID.RedPacketWithdraw);
         }
@@ -1534,7 +1566,8 @@ export class EliminateViewComp extends CCComp {
     private startAutoMode() {
         this.stopAutoMode(); // 确保先停止之前的自动模式
         const interval = this._isDoubleSpeed ? this.autoModeInterval / this._doubleNum : this.autoModeInterval;
-        this.autoModeScheduleKey = this.schedule(this.executeAutoPlacement, interval);
+        this.schedule(this.executeAutoPlacement, interval);
+        this.autoModeScheduleKey = 0; // 不再使用返回值
     }
 
     private stopAutoMode() {
@@ -1599,21 +1632,28 @@ export class EliminateViewComp extends CCComp {
                             // 计算放置后的分数
                             const eliminateResult = this.gridEliminateCheck(gridListCopy);
                             const eliminatedCount = eliminateResult.gridEliminateList.length;
+                            const eliminateRowNum = eliminateResult.eliminateRowNum;
+                            const eliminateColumnNum = eliminateResult.eliminateColumnNum;
 
                             let score = 0;
                             // 有消除,计算消除分数
                             if (eliminatedCount > 0) {
-                                for (let i = 1; i <= eliminateResult.eliminateRowNum; i++) {
-                                    score += this.cols * i;
+                                // 行消除基础分
+                                for (let i = 1; i <= eliminateRowNum; i++) {
+                                    score += this.eliminateBaseScore; // 每行基础分
+                                    score += (this.cols - 1) * this.extraGridScore; // 额外格子分
                                 }
-                                for (let i = 1; i <= eliminateResult.eliminateColumnNum; i++) {
-                                    score += this.rows * i;
+
+                                // 列消除基础分
+                                for (let i = 1; i <= eliminateColumnNum; i++) {
+                                    score += this.eliminateBaseScore; // 每列基础分
+                                    score += (this.rows - 1) * this.extraGridScore; // 额外格子分
                                 }
                             }
 
-                            // 如果没有消除,至少给予放置的块数作为基础分
+                            // 如果没有消除,给予放置的块数作为基础分
                             if (score === 0) {
-                                score = currentGridConfig.length * 0.1; // 给一个很小的分数,优先选择能放置的方案
+                                score = currentGridConfig.length * this.placementBaseScore;
                             }
 
                             // 更新最佳方案
@@ -1664,25 +1704,26 @@ export class EliminateViewComp extends CCComp {
         // 从方块列表中移除该方块
         this.bricksList.splice(placement.brickIndex, 1);
 
-        // 准备旋转和定位数据
-        let currentGridConfig = [...brickData.gridConfig];
-        let currentDeg = brickData.deg;
-
-        // 计算目标网格的中心位置
-        const targetGridList: GridData[] = [];
-        let targetPos = new Vec3(0, 0, 0);
-
-        // 确定需要放置的格子
-        for (let i = 0; i < placement.rotateCount; i++) {
-            if (brickData.rotateFlag) {
+        // 先应用旋转到实际的brickData中,这样放置和显示保持一致
+        if (placement.rotateCount > 0 && brickData.rotateFlag) {
+            let currentGridConfig = [...brickData.gridConfig];
+            let currentDeg = brickData.deg;
+            for (let i = 0; i < placement.rotateCount; i++) {
                 const next = this.nextGridRotate(currentGridConfig, currentDeg);
                 currentGridConfig = next.gridConfig;
                 currentDeg = next.deg;
             }
+            // 直接更新brickData的配置
+            brickData.gridConfig = currentGridConfig;
+            brickData.deg = currentDeg;
         }
 
-        // 计算目标位置--这里出问题了
-        currentGridConfig.forEach(configData => {
+        // 计算目标网格的中心位置
+        const targetGridList: GridData[] = [];
+        let targetPos = new Vec3(0, 0, 0);
+
+        // 计算目标位置,使用更新后的brickData.gridConfig
+        brickData.gridConfig.forEach(configData => {
             const gridRow = configData.row + placement.row;
             const gridCol = configData.column + placement.column;
             if (gridRow >= 0 && gridRow < this.rows && gridCol >= 0 && gridCol < this.cols) {
@@ -1704,7 +1745,7 @@ export class EliminateViewComp extends CCComp {
 
         // 1. 先执行旋转动画(如果需要)
         if (placement.rotateCount > 0 && brickData.rotateFlag) {
-            tweenSequence.to(0.3, { angle: currentDeg });
+            tweenSequence.to(0.3, { angle: brickData.deg });
         }
 
         // 2. 再执行移动动画
@@ -1753,9 +1794,8 @@ export class EliminateViewComp extends CCComp {
         });
 
         // 应用二倍速度
-        if (this._isDoubleSpeed) {
-            tweenSequence.speedScale = this._doubleNum;
-        }
+        // 注意:在当前引擎版本中无法直接调整tween的速度
+        // 如需二倍速效果,应在创建tween时直接调整动画持续时间
 
         // 启动动画
         tweenSequence.start();
@@ -1805,4 +1845,30 @@ export class EliminateViewComp extends CCComp {
         }
     }
 
+
+
+
+
+    //界面测试
+    btn_tongguan() {
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            ServerHandler.inst.getGameAwardInfo();
+        }
+    }
+
+    btn_tx() {
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            ServerHandler.inst.getTxbfInfo();
+        }
+    }
+
+    btn_gxfb() {
+        if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
+            ServerHandler.inst.getDoubleSurprise();
+        }
+    }
+
+
+
+
 }

+ 17 - 14
assets/script/game/view/GamePassView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 14:43:24
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-10 14:37:08
+ * @LastEditTime: 2025-04-11 11:27:19
  * @Description: 游戏通关弹窗
  */
 import { Label, Node } from 'cc';
@@ -13,6 +13,8 @@ import { GameComponent } from "db://oops-framework/module/common/GameComponent";
 import { AD_TYPE } from '../common/config/GameDefine';
 import { UIID } from '../common/config/GameUIConfig';
 import { CocosHandler } from '../common/manager/CocosHandler';
+import { smc } from '../common/SingletonModuleComp';
+import { ADHandler } from '../common/manager/ADHandler';
 
 
 const { ccclass, property } = _decorator;
@@ -26,13 +28,6 @@ export class GamePassView extends GameComponent {
     @property(Node)
     private receiveNode: Node = null!; //十倍领取
 
-
-
-    //引导小手
-    @property(Node)
-    private guildNode: Node = null!;
-
-
     @property([Label])
     private lab_list: Label[] = [];
 
@@ -42,33 +37,41 @@ export class GamePassView extends GameComponent {
     callback: Function = null!;
 
     protected start() {
+        this.setButton();
         this.isAuto = true;
+        this.setData();
     }
 
 
 
     private setData() {
-
+        this.isAuto = smc.game.GameModel.passViewInfo.doubleReward;
         this.receiveNode.active = this.isAuto;
         if (this.isAuto) {
             this.setAutoReceive();
         }
-
+        const list = smc.game.GameModel.passViewInfo.showReward;
+        list.forEach((item, index) => {
+            console.log("tiem.propId", item.propId)
+            if (this.lab_list[index]) {
+                this.lab_list[index].string = item.propNum + "";
+            }
+        })
     }
 
 
     //开心收下正常领取
     private btn_none() {
         //是否展示广告
-
-
+        oops.gui.remove(UIID.GamePass);
+        ADHandler.inst.showAd(AD_TYPE.Pass_Receive);
     }
 
     //十倍领取
     private btn_more() {
         this.isAuto = false;
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.show_ad(AD_TYPE.Pass_Receive);
+            ADHandler.inst.showAd(AD_TYPE.Pass_Receive);
         } else {
             oops.gui.remove(UIID.GamePass);
         }
@@ -83,7 +86,7 @@ export class GamePassView extends GameComponent {
             if (time <= 0 && this.isAuto) {
                 this.unschedule(this.callback)
                 //
-                CocosHandler.inst.show_ad(AD_TYPE.Pass_Receive);
+                ADHandler.inst.showAd(AD_TYPE.Pass_Receive);
 
             }
             this.lab_tips.string = `${time}秒后自动领取`;

+ 3 - 2
assets/script/game/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-10 15:11:12
+ * @LastEditTime: 2025-04-11 10:28:16
  * @Description: 红包提现
  */
 import { _decorator, Label, Node } from "cc";
@@ -14,6 +14,7 @@ import { UIID } from "../common/config/GameUIConfig";
 import { CocosHandler } from "../common/manager/CocosHandler";
 import List from "../ui/List";
 import { RedPackeItemView } from "./RedPackeItemView";
+import { ServerHandler } from "../common/manager/ServerHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -81,7 +82,7 @@ export class RedPackeWithdrawalViewComp extends GameComponent {
 
     private btn_record() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.getRecordList();
+            ServerHandler.inst.getRecordList();
         } else {
             oops.gui.open(UIID.WithdrawRecord);
         }

+ 2 - 1
assets/script/game/view/WechatWithdrawalViewComp.ts

@@ -13,6 +13,7 @@ import { CCComp } from "db://oops-framework/module/common/CCComp";
 import { GameEvent } from "../common/config/GameEvent";
 import { UIID } from "../common/config/GameUIConfig";
 import { CocosHandler } from "../common/manager/CocosHandler";
+import { ServerHandler } from "../common/manager/ServerHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -61,7 +62,7 @@ export class WechatWithdrawalViewComp extends CCComp {
 
     private btn_record() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            CocosHandler.inst.getRecordList();
+            ServerHandler.inst.getRecordList();
         } else {
             oops.gui.open(UIID.WithdrawRecord);
         }