Przeglądaj źródła

【功能】微信提现功能完成

mojunshou 1 rok temu
rodzic
commit
b22aff620f

+ 10 - 4
assets/bundle/gui/eliminate/animation/tx_rotation1.anim

@@ -14,7 +14,7 @@
     },
     "_native": "",
     "sample": 60,
-    "speed": 1,
+    "speed": 0.5,
     "wrapMode": 1,
     "enableTrsBlending": false,
     "_duration": 1.5,
@@ -297,7 +297,9 @@
         "leftTangent": 0,
         "leftTangentWeight": 1,
         "easingMethod": 0,
-        "__editorExtras__": null
+        "__editorExtras__": {
+          "broken": null
+        }
       }
     ],
     "preExtrapolation": 1,
@@ -340,7 +342,9 @@
         "leftTangent": 0,
         "leftTangentWeight": 1,
         "easingMethod": 0,
-        "__editorExtras__": null
+        "__editorExtras__": {
+          "broken": null
+        }
       }
     ],
     "preExtrapolation": 1,
@@ -383,7 +387,9 @@
         "leftTangent": 0,
         "leftTangentWeight": 1,
         "easingMethod": 0,
-        "__editorExtras__": null
+        "__editorExtras__": {
+          "broken": null
+        }
       }
     ],
     "preExtrapolation": 1,

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

@@ -28,17 +28,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 429
+        "__id__": 443
       },
       {
-        "__id__": 431
+        "__id__": 445
       },
       {
-        "__id__": 433
+        "__id__": 447
       }
     ],
     "_prefab": {
-      "__id__": 435
+      "__id__": 449
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -263,26 +263,26 @@
         "__id__": 283
       },
       {
-        "__id__": 390
+        "__id__": 404
       },
       {
-        "__id__": 394
+        "__id__": 408
       },
       {
-        "__id__": 398
+        "__id__": 412
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 424
+        "__id__": 438
       },
       {
-        "__id__": 426
+        "__id__": 440
       }
     ],
     "_prefab": {
-      "__id__": 428
+      "__id__": 442
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -6960,19 +6960,22 @@
       },
       {
         "__id__": 371
+      },
+      {
+        "__id__": 385
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 385
+        "__id__": 399
       },
       {
-        "__id__": 387
+        "__id__": 401
       }
     ],
     "_prefab": {
-      "__id__": 389
+      "__id__": 403
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9502,17 +9505,389 @@
     "nestedPrefabInstanceRoots": null
   },
   {
+    "__type__": "cc.Node",
+    "_name": "btn_text",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 283
+    },
+    "_children": [
+      {
+        "__id__": 386
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 392
+      },
+      {
+        "__id__": 394
+      },
+      {
+        "__id__": 396
+      }
+    ],
+    "_prefab": {
+      "__id__": 398
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 124.257,
+      "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__": 385
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 387
+      },
+      {
+        "__id__": 389
+      }
+    ],
+    "_prefab": {
+      "__id__": 391
+    },
+    "_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__": 386
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 388
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "39tm+02+dGnKJijcCgL3Uq"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 386
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 390
+    },
+    "_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": "0bk8aqZhNFx6deCJB9KVFM"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "8ayLyxOlJPkIKBG+pMRR1E",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 385
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 393
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "b7Gkt6sVtIdLzTFMNrNejG"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 385
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 395
+    },
+    "_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": "3c6BPu4CJFR493aTV1Dlkr"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 385
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 397
+    },
+    "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__": 385
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e2EivPQAlHGKvc7ozX2mAP"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "94qy/OeVZFvZP8wfc5YHkZ",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 283
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 400
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
@@ -9539,7 +9914,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 388
+      "__id__": 402
     },
     "_alignFlags": 44,
     "_target": null,
@@ -9590,11 +9965,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 391
+        "__id__": 405
       }
     ],
     "_prefab": {
-      "__id__": 393
+      "__id__": 407
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9631,11 +10006,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 390
+      "__id__": 404
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 392
+      "__id__": 406
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9678,11 +10053,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 395
+        "__id__": 409
       }
     ],
     "_prefab": {
-      "__id__": 397
+      "__id__": 411
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9719,11 +10094,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 394
+      "__id__": 408
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 396
+      "__id__": 410
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9764,20 +10139,20 @@
     },
     "_children": [
       {
-        "__id__": 399
+        "__id__": 413
       },
       {
-        "__id__": 405
+        "__id__": 419
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 421
+        "__id__": 435
       }
     ],
     "_prefab": {
-      "__id__": 423
+      "__id__": 437
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9814,20 +10189,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 398
+      "__id__": 412
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 400
+        "__id__": 414
       },
       {
-        "__id__": 402
+        "__id__": 416
       }
     ],
     "_prefab": {
-      "__id__": 404
+      "__id__": 418
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -9864,11 +10239,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 399
+      "__id__": 413
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 401
+      "__id__": 415
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -9892,11 +10267,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 399
+      "__id__": 413
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 403
+      "__id__": 417
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -9950,24 +10325,24 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 398
+      "__id__": 412
     },
     "_children": [
       {
-        "__id__": 406
+        "__id__": 420
       },
       {
-        "__id__": 412
+        "__id__": 426
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 418
+        "__id__": 432
       }
     ],
     "_prefab": {
-      "__id__": 420
+      "__id__": 434
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -10004,20 +10379,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 405
+      "__id__": 419
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 407
+        "__id__": 421
       },
       {
-        "__id__": 409
+        "__id__": 423
       }
     ],
     "_prefab": {
-      "__id__": 411
+      "__id__": 425
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -10054,11 +10429,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 406
+      "__id__": 420
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 408
+      "__id__": 422
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10082,11 +10457,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 406
+      "__id__": 420
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 410
+      "__id__": 424
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -10140,20 +10515,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 405
+      "__id__": 419
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 413
+        "__id__": 427
       },
       {
-        "__id__": 415
+        "__id__": 429
       }
     ],
     "_prefab": {
-      "__id__": 417
+      "__id__": 431
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -10190,11 +10565,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 412
+      "__id__": 426
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 414
+      "__id__": 428
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10218,11 +10593,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 412
+      "__id__": 426
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 416
+      "__id__": 430
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -10299,11 +10674,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 405
+      "__id__": 419
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 419
+      "__id__": 433
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10340,11 +10715,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 398
+      "__id__": 412
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 422
+      "__id__": 436
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10385,7 +10760,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 425
+      "__id__": 439
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10413,7 +10788,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 427
+      "__id__": 441
     },
     "_alignFlags": 45,
     "_target": null,
@@ -10462,7 +10837,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 430
+      "__id__": 444
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -10490,7 +10865,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 432
+      "__id__": 446
     },
     "amountLb": {
       "__id__": 23
@@ -10576,10 +10951,10 @@
       "__id__": 246
     },
     "moveNode": {
-      "__id__": 390
+      "__id__": 404
     },
     "rotateNode": {
-      "__id__": 394
+      "__id__": 408
     },
     "brickNode": {
       "__id__": 298
@@ -10619,7 +10994,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 434
+      "__id__": 448
     },
     "_alignFlags": 45,
     "_target": null,

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

@@ -223,7 +223,7 @@
         "__id__": 21
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 165
@@ -1867,7 +1867,7 @@
     "propertyPath": [
       "_string"
     ],
-    "value": "发起打款:$元"
+    "value": "发起打款:$m元"
   },
   {
     "__type__": "cc.TargetInfo",
@@ -1885,7 +1885,7 @@
     ],
     "value": {
       "__type__": "cc.Size",
-      "width": 183.572265625,
+      "width": 206.896484375,
       "height": 50.4
     }
   },
@@ -1926,7 +1926,7 @@
     ],
     "value": {
       "__type__": "cc.Size",
-      "width": 229.572265625,
+      "width": 252.896484375,
       "height": 36
     }
   },
@@ -1946,7 +1946,7 @@
     ],
     "value": {
       "__type__": "cc.Vec3",
-      "x": 137.7861328125,
+      "x": 149.4482421875,
       "y": 0,
       "z": 0
     }
@@ -3549,7 +3549,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 516,
+      "width": 0,
       "height": 23
     },
     "_anchorPoint": {
@@ -3711,7 +3711,7 @@
     },
     "_mode": 0,
     "_totalLength": 516,
-    "_progress": 1,
+    "_progress": 0,
     "_reverse": false,
     "_id": ""
   },
@@ -3856,7 +3856,7 @@
       "b": 32,
       "a": 255
     },
-    "_string": "发起打款:$元",
+    "_string": "发起打款:$m元",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 28,
@@ -3921,7 +3921,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 137.7861328125,
+      "x": 149.4482421875,
       "y": 0,
       "z": 0
     },
@@ -3962,7 +3962,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 183.572265625,
+      "width": 206.896484375,
       "height": 50.4
     },
     "_anchorPoint": {

+ 2 - 0
assets/script/game/common/config/GameEvent.ts

@@ -31,5 +31,7 @@ export enum GameEvent {
 
     //更新红包提现任务列表
     updateRedPackeTaskList = "updateRedPackeTaskList",
+    //更新红包币和微信币
+    updateHbAndWxCoin = "updateHbAndWxCoin",
 
 }

+ 7 - 7
assets/script/game/common/manager/ServerHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:16:41
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-16 15:01:15
+ * @LastEditTime: 2025-04-16 16:55:25
  * @Description: 
  */
 // ServerHandler.ts
@@ -451,10 +451,14 @@ export class ServerHandler {
     onHbReward(str: string) {
         console.log('[服务器] 红包币提现返回', str);
         let result = JSON.parse(str);
-        smc.game.GameModel.txNum = result.changes["8001"];
+        const wxCash = result.changes["8001"] / 100;
+        smc.game.GameModel.txNum = wxCash;
         smc.game.GameModel.txType = 2;
-        //这里打开界面关闭的时候只是关闭,不是打开提现返利
         oops.message.dispatchEvent(GameEvent.openView, "openCashWithdrawalView");
+        //更新红包页面的数值
+        smc.account.AccountModel.hbCoin = this.formatNumber(result.props["1004"], 100);
+        smc.account.AccountModel.wxCoin = this.formatNumber(result.props["1005"], 1000);
+        oops.message.dispatchEvent(GameEvent.updateHbAndWxCoin);
     }
 
 
@@ -491,14 +495,10 @@ export class ServerHandler {
         oops.message.dispatchEvent(GameEvent.openView, "openDoubleSpeedView");
     }
 
-
-
     onRequestFail(code: number, str: string) {
         console.log('[服务器] 请求失败', code, str);
     }
 
-
-
     //小数点保留两位小数,返回的还是数字,不是字符串
     formatNumber(num: number, type: number) {
         num = num / type;

+ 4 - 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-16 10:58:34
+ * @LastEditTime: 2025-04-16 16:42:00
  * @Description: 
  */
 import { ecs } from "db://oops-framework/libs/ecs/ECS";
@@ -112,12 +112,10 @@ export class GameModelComp extends ecs.Comp {
 
     /**提现必反*/
     _cashNum: number = 0;
-
+    //微信提现页金钱
     _txNum: number = 0;
-
     //事件类型 WITHDRAW_POINT-提现点  SIGN_POINT--预约登记  --PROCEDURE_POINT手续费
-    _eventType: string = "";
-
+    _eventType: string = "WITHDRAW_POINT";
     /**提现方式 1正常提现 2红包币提现,不要打开提现返利*/
     _txType: number = 1;
 
@@ -194,7 +192,7 @@ export class GameModelComp extends ecs.Comp {
 
     //提现成功的金额
     set txNum(v: number) {
-        this._txNum;
+        this._txNum = v;
     }
 
     get txNum() {

+ 22 - 12
assets/script/game/view/CashWithdrawalView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 15:03:37
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-15 10:40:20
+ * @LastEditTime: 2025-04-16 16:56:52
  * @Description: 微信提现到零钱,需要有一个动画展示步骤
  */
 import { _decorator, Node, Animation } from 'cc';
@@ -33,17 +33,16 @@ export class CashWithdrawalView extends GameComponent {
     @property(ProgressBar)
     private loadProgressBar: ProgressBar = null!;
 
-
-
     protected start() {
         this.setButton();
         this.setData();
     }
 
-
-
     setData() {
+        this.mainNode.active = false;
+        this.loadNode.active = false;
         const num = smc.game.GameModel.txNum;
+        console.log(">>>>>>>>>>>金钱数量")
         if (num > 0) {
             if (this.lab_cashNum) {
                 this.lab_cashNum.string = `¥${num}`;
@@ -68,8 +67,15 @@ export class CashWithdrawalView extends GameComponent {
         if (this.loadNode && this.loadProgressBar) {
             this.loadProgressBar.progress = 0;
             this.loadNode.active = true;
-            tween(this.loadProgressBar)
-                .to(0.5, { progress: 1 })
+            // 创建中间变量对象
+            const progressObj = { value: 0 };
+            tween(progressObj)
+                .to(2, { value: 1 }, {
+                    onUpdate: (target) => {
+                        this.loadProgressBar.progress = target.value;
+                    },
+                    easing: 'linear' // 匀速,也可以换成 'quadIn', 'cubicOut' 等
+                })
                 .call(() => {
                     this.loadNode.active = false;
                     if (this.mainNode) {
@@ -77,15 +83,19 @@ export class CashWithdrawalView extends GameComponent {
                         this.showAnimation();
                     }
                 })
+                .start();
         }
     }
 
-
-
     showAnimation() {
         if (this.mainNode) {
-            const animationComponent = this.mainNode.addComponent(Animation);
-            animationComponent.play();
+            const aniNode = this.mainNode.getChildByPath("Bg/Mask");
+            if (aniNode) {
+                const animationComponent = aniNode.getComponent(Animation);
+                if (animationComponent) {
+                    animationComponent.play();
+                }
+            }
         }
     }
 
@@ -106,6 +116,6 @@ export class CashWithdrawalView extends GameComponent {
 
     protected onDestroy(): void {
         this.mainNode.active = false;
-        this.loadNode.active = true;
+        this.loadNode.active = false;
     }
 }

+ 183 - 7
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-16 14:58:52
+ * @LastEditTime: 2025-04-16 16:30:17
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -196,16 +196,27 @@ export class EliminateViewComp extends CCComp {
     private totalEliminationCount: number = 0;   // 总消除次数(包括行和列)
     private currentCombo: number = 0;            // 当前连击次数
 
+
+    //新手引导
+    private isGuideMode = false;
+    private guideStep = 0;
+
     /** 视图层逻辑代码分离演示 */
     async start() {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
         this.setButton();
         this.initButtonState(false);
         await this.loadConfig();
-        this.initGrid();
         this.initData();
         this.setData();
         this.addEventList();
+        this.initGrid();
+        // if (this.guideStep === 0) {
+        //     this.startGuideMode()
+        // } else {
+        //     this.initGrid();
+        // }
+
     }
 
 
@@ -215,6 +226,7 @@ export class EliminateViewComp extends CCComp {
         oops.message.on(GameEvent.openView, this.openView, this);
         oops.message.on(GameEvent.showCoinAnimation, this.showCoinAnimation, this);
         oops.message.on(GameEvent.Resurrection, this.onResurrection, this);
+        oops.message.on(GameEvent.updateHbAndWxCoin, this.updateCoin, this);
     }
 
 
@@ -269,8 +281,14 @@ export class EliminateViewComp extends CCComp {
         this.awardLb.string = this.cash.toString();
         this.lab_taget.string = this.targetScore.toString();
         this.lab_goldNum.string = smc.account.AccountModel.goldCoin.toString();
-        console.log("目标分数>>>>>>", this.targetScore);
-        console.log("金块>>>>>>>>>>", smc.account.AccountModel.goldCoin)
+    }
+
+
+    updateCoin() {
+        this.money = smc.account.AccountModel.wxCoin;
+        this.cash = smc.account.AccountModel.hbCoin;
+        this.amountLb.string = this.money.toString();
+        this.awardLb.string = this.cash.toString();
     }
 
 
@@ -309,6 +327,144 @@ export class EliminateViewComp extends CCComp {
         console.log("复活游戏,分数不清零");
     }
 
+
+
+    startGuideMode() {
+        this.isGuideMode = true
+        this.guideStep = 1
+        this.setupGuideStep(this.guideStep)
+    }
+
+    setupGuideStep(step: number) {
+        this.clearAllGuideGrids()
+        this.bricksList.length = 0
+        this.brickNode.destroyAllChildren();
+
+        this.guideStep = step
+
+        if (step === 1) {
+            const emptyIndex = Math.floor(this.cols / 2)
+            for (let c = 0; c < this.cols; c++) {
+                if (c !== emptyIndex) {
+                    const g = this.gridList[0][c]
+                    g.status = 1
+                    g.type = 1;
+                    this.generateGrid(g)
+                }
+            }
+            this.createGuideBrick([{ row: 0, column: 0 }], "Brick1", 1, 1)
+        }
+        else if (step === 2) {
+            const emptyRow = this.rows - 1
+            for (let r = 0; r < this.rows; r++) {
+                if (r !== emptyRow) {
+                    const g = this.gridList[r][0]
+                    g.status = 1
+                    g.type = 1;
+                    this.generateGrid(g)
+                }
+            }
+            this.createGuideBrick([{ row: 0, column: 0 }], "Brick1", 1, 1)
+        }
+        else if (step === 3) {
+            // 填满前两列,除去 [2][0] 这个位置,制造一个L型缺口
+            for (let r = 0; r < this.rows; r++) {
+                for (let c = 0; c < 2; c++) {
+                    if (r === 2 && c === 0) continue // 留一个空位用于放置旋转后的L型砖块
+                    if (r === 2 && c === 1) continue // 留一个空位用于放置旋转后的L型砖块
+                    if (r === 1 && c === 1) continue // 留一个空位用于放置旋转后的L型砖块
+                    if (r === 3 && c === 1) continue // 留一个空位用于放置旋转后的L型砖块
+                    const g = this.gridList[r][c]
+                    g.status = 1
+                    g.type = 1;
+                    this.generateGrid(g)
+                }
+            }
+
+            // 创建一个L型方块,引导玩家旋转后放置
+            this.createGuideBrick([
+                { row: 0, column: 0 },
+                { row: 0, column: -1 },
+                { row: 0, column: 1 },
+                { row: 1, column: 0 }
+            ], "BrickT", 1, 1, true)  //这要双II 
+        }
+        else if (step === 4) {
+            const centerRow = Math.floor(this.rows / 2);
+            const centerCol = Math.floor(this.cols / 2);
+
+            // 遍历整个网格
+            for (let r = 0; r < this.rows; r++) {
+                for (let c = 0; c < this.cols; c++) {
+                    const inCenter =
+                        r >= centerRow && r <= centerRow + 1 &&
+                        c >= centerCol && c <= centerCol + 1;
+
+                    const isCross =
+                        r === centerRow || r === centerRow + 1 || // 中间两行
+                        c === centerCol || c === centerCol + 1;   // 中间两列
+
+                    if (isCross && !inCenter) {
+                        const g = this.gridList[r][c];
+                        g.status = 1;
+                        g.type = 1;
+                        this.generateGrid(g);
+                    }
+                }
+            }
+            this.createGuideBrick([
+                { row: 0, column: 0 },
+                { row: 0, column: 1 },
+                { row: 1, column: 0 },
+                { row: 1, column: 1 }
+            ], "BrickO", 1, 1)
+        }
+    }
+
+    clearAllGuideGrids() {
+        for (let row = 0; row < this.rows; row++) {
+            for (let col = 0; col < this.cols; col++) {
+                const grid = this.gridList[row][col]
+                grid.status = 0;
+                grid.type = 0;
+                this.generateGrid(grid)
+            }
+        }
+    }
+
+
+    // 引导砖块保持底部中间生成
+    createGuideBrick(gridConfig: GridConfigData[], brickKey: string, colorIndex: number, index: number, rotateFlag = false) {
+        const brickData = {
+            index,
+            brickKey: brickKey,
+            rotateFlag,
+            gridConfig,
+            deg: 0,
+            brickNode: new Node(),
+            gridColorKey: "colorKey",
+            brickInitPos: new Vec3(),
+            type: 0,
+            rotateNode: null,
+        }
+        const node = this.generateBrick(brickKey, colorIndex)
+        this.brickNode.addChild(node);
+
+        const transform = this.brickNode.getComponent(UITransform);
+        if (transform) {
+            const midX = transform.width / 2;
+            node.setPosition(midX, 0);
+            brickData.brickNode = node
+            brickData.brickInitPos = node.getWorldPosition()
+            this.bricksList.push(brickData)
+            this.brickAddEvent(brickData)
+        }
+    }
+
+
+
+
+
     //显示金币动画 --是否只计算红包
     showCoinAnimation(event: string, args: string) {
         //计算中间的坐标就好
@@ -368,7 +524,7 @@ export class EliminateViewComp extends CCComp {
     private clearExistingGrids(): void {
         this.gridList = [];
         if (this.gridNode) {
-            this.gridNode.children.forEach(node => node.destroy());
+            this.gridNode.destroyAllChildren();
         }
     }
 
@@ -1892,7 +2048,27 @@ export class EliminateViewComp extends CCComp {
         }
     }
 
+    btn_text() {
+        const param = {
+            "ssid": "7308c662d2264b1a952d2690e585872e",
+            "props": {
+                "1004": 0,
+                "1005": 2786919,
+                "1006": 9,
+                "1007": 71,
+                "2001": 2,
+                "8001": 20,
+                "9001": 0
+            },
+            "changes": {
+                "1004": -200000,
+                "8001": 20
+            },
+            "transferStatus": 1,
+            "outTransferNo": "2504161109911229182337024"
+        }
 
-
-
+        let str = JSON.stringify(param);
+        ServerHandler.inst.onHbReward(str);
+    }
 }

+ 7 - 1
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-15 18:45:04
+ * @LastEditTime: 2025-04-16 16:21:28
  * @Description: 红包提现
  */
 import { _decorator, Label, Node } from "cc";
@@ -71,6 +71,7 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
 
     addEvent() {
         oops.message.on(GameEvent.updateRedPackeTaskList, this.updateList, this);
+        oops.message.on(GameEvent.updateHbAndWxCoin, this.updateCoin, this);
     }
 
 
@@ -97,6 +98,11 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
 
     }
 
+    updateCoin() {
+        this.data.wxCash = smc.account.AccountModel.wxCoin;
+        this.data.hbCoin = smc.account.AccountModel.hbCoin;
+    }
+
     private btn_back() {
         oops.gui.remove(UIID.RedPacketWithdraw);
     }