Преглед изворни кода

【功能】添加数据打点

mojunshou пре 7 месеци
родитељ
комит
d0858652eb
30 измењених фајлова са 921 додато и 966 уклоњено
  1. 1 1
      assets/bundle/gui/eliminate/prefab/item/gooditem_3.prefab
  2. 1 1
      assets/bundle/gui/eliminate/prefab/popup/AutoWithdrawBar.prefab
  3. 6 3
      assets/bundle/gui/eliminate/prefab/popup/keepDoubleSpeed.prefab
  4. 1 1
      assets/bundle/gui/eliminate/prefab/popup/wechatTransferring.prefab
  5. 6 6
      assets/bundle/gui/eliminate/prefab/redPacketWithdrawal.prefab
  6. 451 590
      assets/bundle/gui/eliminate/prefab/wechatWithdrawal.prefab
  7. 156 295
      assets/bundle/gui/eliminate/prefab/withdrawalRecord.prefab
  8. BIN
      assets/bundle/gui/eliminate/texture/icon_20%.png
  9. 134 0
      assets/bundle/gui/eliminate/texture/icon_20%.png.meta
  10. 2 1
      assets/script/game/common/manager/ADHandler.ts
  11. 10 4
      assets/script/game/common/manager/DCHandler.ts
  12. 4 3
      assets/script/game/common/manager/LoginHandler.ts
  13. 1 2
      assets/script/game/common/manager/ProtocolEvent.ts
  14. 7 2
      assets/script/game/common/manager/ServerHandler.ts
  15. 10 1
      assets/script/game/common/setting/SettingViewComp.ts
  16. 4 3
      assets/script/game/common/tips/KindTipsView.ts
  17. 3 2
      assets/script/game/common/tips/RetentionView.ts
  18. 4 1
      assets/script/game/view/CashRebateView.ts
  19. 6 1
      assets/script/game/view/CashWithdrawalView.ts
  20. 8 1
      assets/script/game/view/DoubleRewardsView.ts
  21. 6 2
      assets/script/game/view/DoubleSpeedViewComp.ts
  22. 18 12
      assets/script/game/view/EliminateViewComp.ts
  23. 6 2
      assets/script/game/view/GameOverView.ts
  24. 8 2
      assets/script/game/view/GamePassView.ts
  25. 3 1
      assets/script/game/view/RedPackeItemView.ts
  26. 12 26
      assets/script/game/view/RedPackeWithdrawalViewComp.ts
  27. 5 1
      assets/script/game/view/WechatWithdrawalViewComp.ts
  28. 41 1
      assets/script/game/view/keepDoubleSpeedView.ts
  29. 2 0
      assets/script/game/view/popup/ReservePopup.ts
  30. 5 1
      assets/script/game/view/popup/WechatTransfer.ts

+ 1 - 1
assets/bundle/gui/eliminate/prefab/item/gooditem_3.prefab

@@ -757,7 +757,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "f2147dd1-00a8-4cf8-9727-bf5a668cfccd@f9941",
+      "__uuid__": "a839492e-9a60-4732-a263-42460aaa393b@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,

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

@@ -1655,7 +1655,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 6 - 3
assets/bundle/gui/eliminate/prefab/popup/keepDoubleSpeed.prefab

@@ -2373,8 +2373,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 180,
-      "height": 195
+      "width": 120,
+      "height": 130
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2549,7 +2549,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2610,6 +2610,9 @@
     "__prefab": {
       "__id__": 107
     },
+    "lab_time": {
+      "__id__": 88
+    },
     "_id": ""
   },
   {

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

@@ -88,7 +88,7 @@
         "__id__": 3
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 226

+ 6 - 6
assets/bundle/gui/eliminate/prefab/redPacketWithdrawal.prefab

@@ -43,7 +43,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 0.9489999999999554,
+      "y": 3.129000000000019,
       "z": 0
     },
     "_lrot": {
@@ -137,7 +137,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4960,7 +4960,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5037,7 +5037,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1600.0000000000002
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5090,8 +5090,8 @@
     "_target": null,
     "_left": 0,
     "_right": 0,
-    "_top": -0.949,
-    "_bottom": 0.949,
+    "_top": -3.1290000000000444,
+    "_bottom": 3.1290000000000444,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,

Разлика између датотеке није приказан због своје велике величине
+ 451 - 590
assets/bundle/gui/eliminate/prefab/wechatWithdrawal.prefab


Разлика између датотеке није приказан због своје велике величине
+ 156 - 295
assets/bundle/gui/eliminate/prefab/withdrawalRecord.prefab


BIN
assets/bundle/gui/eliminate/texture/icon_20%.png


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

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "a839492e-9a60-4732-a263-42460aaa393b",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "a839492e-9a60-4732-a263-42460aaa393b@6c48a",
+      "displayName": "icon_20%",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "a839492e-9a60-4732-a263-42460aaa393b",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "a839492e-9a60-4732-a263-42460aaa393b@f9941",
+      "displayName": "icon_20%",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": -1.5,
+        "trimX": 0,
+        "trimY": 6,
+        "width": 56,
+        "height": 32,
+        "rawWidth": 56,
+        "rawHeight": 41,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -28,
+            -16,
+            0,
+            28,
+            -16,
+            0,
+            -28,
+            16,
+            0,
+            28,
+            16,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            35,
+            56,
+            35,
+            0,
+            3,
+            56,
+            3
+          ],
+          "nuv": [
+            0,
+            0.07317073170731707,
+            1,
+            0.07317073170731707,
+            0,
+            0.8536585365853658,
+            1,
+            0.8536585365853658
+          ],
+          "minPos": [
+            -28,
+            -16,
+            0
+          ],
+          "maxPos": [
+            28,
+            16,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "a839492e-9a60-4732-a263-42460aaa393b@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "a839492e-9a60-4732-a263-42460aaa393b@6c48a"
+  }
+}

+ 2 - 1
assets/script/game/common/manager/ADHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:14:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-23 15:03:22
+ * @LastEditTime: 2025-04-23 16:41:31
  * @Description: 
  */
 // ADHandler.ts
@@ -98,6 +98,7 @@ export class ADHandler {
     adInterstitialClose = (type: boolean) => {
         smc.game.GameModel.isShowAd = false;
         console.log('[广告] 插屏广告关闭', type);
+        //如果有弹窗,则不发送事件,
         oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
     };
 

+ 10 - 4
assets/script/game/common/manager/DCHandler.ts

@@ -14,10 +14,17 @@ export class DCHandler {
 
 
     //数据上报
-    async reportData(eventId: number) {
-        const param = {
-            eventId: eventId
+    async reportData(eventId: number, id?: number) {
+        let param = {
+            eventId: eventId,
+            props: {}
         }
+        if (id) {
+            param.props = {
+                id: id
+            }
+        }
+
         const data = {
             method: 'analysis.event',
             param: JSON.stringify(param)
@@ -27,5 +34,4 @@ export class DCHandler {
     }
 }
 
-
 window["DCHandler"] = DCHandler;

+ 4 - 3
assets/script/game/common/manager/LoginHandler.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-11 10:15:45
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-22 18:44:21
+ * @LastEditTime: 2025-04-23 15:42:19
  * @Description: 登录管理
  */
 // LoginHandler.ts
@@ -10,6 +10,7 @@ import { oops } from 'db://oops-framework/core/Oops';
 import { smc } from '../SingletonModuleComp';
 import { CocosHandler } from './CocosHandler';
 import { ServerHandler } from './ServerHandler';
+import { DCHandler } from './DCHandler';
 
 export class LoginHandler {
     private static _inst: LoginHandler;
@@ -65,6 +66,7 @@ export class LoginHandler {
         // this.wxLogin(str);
         //向服务器申请登录
         ServerHandler.inst.wxLogin(str);
+        DCHandler.inst.reportData(3000004, 1001);
     }
 
     wechatLoginFail(str: number) {
@@ -76,9 +78,8 @@ export class LoginHandler {
             default:
                 oops.gui.toast('登录失败,请稍后再试~');
                 break
-
-
         }
+        DCHandler.inst.reportData(3000004, 1002);
     }
 
 }

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

@@ -2,10 +2,9 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-21 15:07:58
+ * @LastEditTime: 2025-04-23 16:55:22
  * @Description: 消息定义
  */
-
 // const server_url = "http://192.168.10.103:8880";
 // https://central-test.atmob.com
 

+ 7 - 2
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-23 15:17:01
+ * @LastEditTime: 2025-04-23 17:29:41
  * @Description: 
  */
 // ServerHandler.ts
@@ -463,7 +463,7 @@ export class ServerHandler {
                 riskToken: "",
                 riskBusinessId: ""
             },
-            callback: this.buildCallback('ServerHandler.inst.onHbReward', 'ServerHandler.inst.onRequestFail')
+            callback: this.buildCallback('ServerHandler.inst.onHbReward', 'ServerHandler.inst.onHbRewardFail')
         }
         this.sendMsgToServer(param);
     }
@@ -478,9 +478,14 @@ export class ServerHandler {
         //更新红包页面的数值
         smc.account.AccountModel.hbCoin = result.props["1004"];
         smc.account.AccountModel.wxCoin = result.props["1005"];
+        smc.game.GameModel.wxCash = result.money || 0;
         oops.message.dispatchEvent(GameEvent.updateHbAndWxCoin);
     }
 
+    onHbRewardFail(code: number, str: string) {
+        oops.gui.toast(str);
+    }
+
 
     //获取微信提现页信息
     getWechatTxInfo() {

+ 10 - 1
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-23 11:57:18
+ * @LastEditTime: 2025-04-23 15:50:37
  * @Description:设置界面 
  */
 import { _decorator } from "cc";
@@ -22,6 +22,7 @@ import { LoginHandler } from "../manager/LoginHandler";
 import { UITransform } from "cc";
 import { Size } from "cc";
 import { GameEvent } from "../config/GameEvent";
+import { DCHandler } from "../manager/DCHandler";
 const { ccclass, property } = _decorator;
 
 /** 视图层对象 */
@@ -53,6 +54,7 @@ export class SettingViewComp extends CCVMParentComp {
         this.setButton();
         this.updateBtnState();
         this.updateHead();
+        DCHandler.inst.reportData(3001000);
 
     }
 
@@ -64,12 +66,14 @@ export class SettingViewComp extends CCVMParentComp {
 
     private btn_about() {
         oops.gui.open(UIID.AboutUs);
+        DCHandler.inst.reportData(3001004);
     }
 
 
     private btn_close() {
         oops.gui.remove(UIID.Setting);
         oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
+        DCHandler.inst.reportData(3001001);
     }
 
 
@@ -140,6 +144,11 @@ export class SettingViewComp extends CCVMParentComp {
     //打开音乐
     private btn_music() {
         this._musicState = !this._musicState;
+        if (this._musicState) {
+            DCHandler.inst.reportData(3001002);
+        } else {
+            DCHandler.inst.reportData(3001003);
+        }
         oops.storage.set("music_state", this._musicState);
         oops.audio.switchMusic = this._musicState;
         const btn_on = this.musicBtn.node.getChildByPath("btn_on")!;

+ 4 - 3
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-22 11:34:43
+ * @LastEditTime: 2025-04-23 15:39:56
  * @Description: 温馨提示弹窗
  */
 import { _decorator } from 'cc';
@@ -14,6 +14,7 @@ import { UIID } from '../config/GameUIConfig';
 import { CocosHandler } from '../manager/CocosHandler';
 import { ADHandler } from '../manager/ADHandler';
 import { LoginHandler } from '../manager/LoginHandler';
+import { DCHandler } from '../manager/DCHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('KindTipsView')
@@ -23,9 +24,8 @@ export class KindTipsView extends GameComponent {
     }
 
     private async btn_agree() {
-        console.log("同意");
+        DCHandler.inst.reportData(3000000)
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
-            // CocosHandler.inst.ad_interstitial_start();
             LoginHandler.inst.savePrivacyStatus(true);
             this.scheduleOnce(() => {
                 ADHandler.inst.showAd(AD_TYPE.Start);
@@ -37,6 +37,7 @@ export class KindTipsView extends GameComponent {
     }
 
     private btn_disagree() {
+        DCHandler.inst.reportData(3000001)
         oops.gui.open(UIID.Retention);
         oops.gui.remove(UIID.KindTips);
     }

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

@@ -14,6 +14,7 @@ import { UIID } from '../config/GameUIConfig';
 import { CocosHandler } from '../manager/CocosHandler';
 import { ADHandler } from '../manager/ADHandler';
 import { LoginHandler } from '../manager/LoginHandler';
+import { DCHandler } from '../manager/DCHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('RetentionView')
@@ -23,7 +24,7 @@ export class RetentionView extends GameComponent {
     }
 
     private async btn_agree() {
-        console.log("同意");
+        DCHandler.inst.reportData(3000002);
         //调用安卓给权限
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             // CocosHandler.inst.ad_interstitial_start();
@@ -37,7 +38,7 @@ export class RetentionView extends GameComponent {
     }
 
     private btn_disagree() {
-        console.log("不同意");
+        DCHandler.inst.reportData(3000003);
         game.end();
     }
 }

+ 4 - 1
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-19 17:46:48
+ * @LastEditTime: 2025-04-23 16:06:31
  * @Description: 提现必返
  */
 import { _decorator, Label } from 'cc';
@@ -16,6 +16,7 @@ import { smc } from '../common/SingletonModuleComp';
 import { GameEvent } from '../common/config/GameEvent';
 import { ServerHandler } from '../common/manager/ServerHandler';
 import { Format } from '../utils/Format';
+import { DCHandler } from '../common/manager/DCHandler';
 
 
 const { ccclass, property } = _decorator;
@@ -26,6 +27,7 @@ export class CashRebateView extends GameComponent {
     @property(Label)
     lab_num: Label = null!;
     protected start() {
+        DCHandler.inst.reportData(3000702);
         this.setButton();
         this.setData();
     }
@@ -42,6 +44,7 @@ export class CashRebateView extends GameComponent {
             oops.message.dispatchEvent(GameEvent.showCoinAnimation, "showCoin");
             //下一关
             ServerHandler.inst.getNextLevel();
+            DCHandler.inst.reportData(3000704);
 
         } else {
             oops.gui.remove(UIID.CashRebate);

+ 6 - 1
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-21 18:25:47
+ * @LastEditTime: 2025-04-23 17:45:40
  * @Description: 微信提现到零钱,需要有一个动画展示步骤
  */
 import { _decorator, Node, Animation } from 'cc';
@@ -16,6 +16,7 @@ import { ProgressBar } from 'cc';
 import { tween } from 'cc';
 import { smc } from '../common/SingletonModuleComp';
 import { Format } from '../utils/Format';
+import { DCHandler } from '../common/manager/DCHandler';
 
 const { ccclass, property } = _decorator;
 
@@ -35,11 +36,14 @@ export class CashWithdrawalView extends GameComponent {
     private loadProgressBar: ProgressBar = null!;
 
     protected start() {
+        DCHandler.inst.reportData(3000700);
         this.setButton();
         this.setData();
     }
 
     setData() {
+        const curLevel = smc.account.AccountModel.curLevel;
+        DCHandler.inst.reportData(3000101, curLevel);
         this.mainNode.active = false;
         this.loadNode.active = false;
         const num = smc.game.GameModel.txNum;
@@ -110,6 +114,7 @@ export class CashWithdrawalView extends GameComponent {
                 ServerHandler.inst.getTxbfInfo();
             }
             oops.gui.remove(UIID.WithSussce);
+            DCHandler.inst.reportData(3000701);
         } else {
             await oops.gui.open(UIID.CashRebate);
             oops.gui.remove(UIID.WithSussce);

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

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-21 11:57:43
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 15:37:20
+ * @LastEditTime: 2025-04-23 17:33:31
  * @Description: 惊喜翻倍弹窗
  */
 import { _decorator, instantiate, Label, Node, Prefab, UITransform } from 'cc';
@@ -13,6 +13,7 @@ import { UIID } from '../common/config/GameUIConfig';
 import { ADHandler } from '../common/manager/ADHandler';
 import { smc } from '../common/SingletonModuleComp';
 import { BricsItem } from './BricsItem';
+import { DCHandler } from '../common/manager/DCHandler';
 
 const { ccclass, property } = _decorator;
 
@@ -69,6 +70,7 @@ export class DoubleRewardsView extends VMParent {
 
 
     protected start() {
+        DCHandler.inst.reportData(2000400);
         this.setButton();
         this.setData();
         this.setAutoReceive();
@@ -80,6 +82,9 @@ export class DoubleRewardsView extends VMParent {
         oops.gui.remove(UIID.DoubleRewards);
         //插屏广告
         ADHandler.inst.showAd(AD_TYPE.Double_Close);
+        DCHandler.inst.reportData(2000401);
+        DCHandler.inst.reportData(2000403);
+
     }
 
 
@@ -102,6 +107,8 @@ export class DoubleRewardsView extends VMParent {
                     oops.gui.remove(UIID.DoubleRewards);
                     //插屏广告
                     ADHandler.inst.showAd(AD_TYPE.Double_Close);
+                    DCHandler.inst.reportData(2000402);
+                    DCHandler.inst.reportData(2000403);
                 }
 
                 this.unschedule(this.callback);

+ 6 - 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-23 10:49:01
+ * @LastEditTime: 2025-04-23 17:40:03
  * @Description: 二倍速弹窗
  */
 import { _decorator } from "cc";
@@ -13,6 +13,7 @@ import { UIID } from "../common/config/GameUIConfig";
 import { ADHandler } from "../common/manager/ADHandler";
 import { smc } from "../common/SingletonModuleComp";
 import { GameEvent } from "../common/config/GameEvent";
+import { DCHandler } from "../common/manager/DCHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -26,6 +27,7 @@ export class DoubleSpeedViewComp extends VMParent {
 
     start() {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
+        DCHandler.inst.reportData(3000300);
         this.setButton();
         this.data.time = smc.game.GameModel.doubleSpeedTime / 60;
 
@@ -42,6 +44,7 @@ export class DoubleSpeedViewComp extends VMParent {
         smc.game.GameModel.viewType = "speed_reward";
         ADHandler.inst.showAd(AD_TYPE.Double_Speed_Receive);
         oops.message.dispatchEvent(GameEvent.updateGameState, "paused");
+        DCHandler.inst.reportData(3000301);
     }
 
 
@@ -49,7 +52,7 @@ export class DoubleSpeedViewComp extends VMParent {
         oops.gui.remove(UIID.DoubleSpeed);
         ADHandler.inst.showAd("107");
         oops.message.dispatchEvent(GameEvent.updateGameState, "paused");
-
+        DCHandler.inst.reportData(3000302);
     }
 
 
@@ -58,5 +61,6 @@ export class DoubleSpeedViewComp extends VMParent {
         //播放插屏广告
         ADHandler.inst.showAd("107");
         oops.message.dispatchEvent(GameEvent.updateGameState, "paused");
+        DCHandler.inst.reportData(3000302);
     }
 }

+ 18 - 12
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-23 15:13:01
+ * @LastEditTime: 2025-04-23 16:45:39
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -16,6 +16,7 @@ import { UIID } from "../common/config/GameUIConfig";
 import { ServerHandler } from "../common/manager/ServerHandler";
 import { smc } from "../common/SingletonModuleComp";
 import { Format } from "../utils/Format";
+import { DCHandler } from "../common/manager/DCHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -247,6 +248,8 @@ export class EliminateViewComp extends CCComp {
         //更新福利点
         this.updateWelfarePoint();
 
+        DCHandler.inst.reportData(3000005);
+
     }
 
 
@@ -1045,6 +1048,8 @@ export class EliminateViewComp extends CCComp {
                             brickData.rotateNode.active = false;
                         }
                     }, 0.4);
+                    //打点
+                    DCHandler.inst.reportData(3000600);
                 }
             } else if (this.editingData.brickData && this.editingData.gridList.length > 0) {
                 if (this.isGuideMode && this.guideStep > 0) {
@@ -1534,22 +1539,17 @@ export class EliminateViewComp extends CCComp {
         for (let i = 0; i < totalCoins; i++) {
             const coin = instantiate(prefab);
             this.node.addChild(coin);
-            coin.setWorldPosition(startPos);
 
-            // 随机偏移起始位置
-            const randomOffset = new Vec3(
-                (Math.random() - 0.5) * 50,
-                (Math.random() - 0.5) * 50,
-                0
-            );
+            //设置位置,取舞台中间位置世界坐标
+            coin.setWorldPosition(startPos);
 
             // 创建曲线动画
             const num = this.isDoubleSpeed ? this.doubleNum : 1;
             tween(coin)
                 .to(0.2 / num, {
                     position: new Vec3(
-                        coin.position.x + randomOffset.x,
-                        coin.position.y + randomOffset.y,
+                        coin.position.x,
+                        coin.position.y,
                         0
                     )
                 })
@@ -1902,16 +1902,19 @@ export class EliminateViewComp extends CCComp {
     private btn_setting() {
         oops.gui.open(UIID.Setting);
         this.gameState = GameState.PAUSED;
+        DCHandler.inst.reportData(3000011);
     }
 
     //左边微信按钮
     private btn_withdraw() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             ServerHandler.inst.getWechatTxInfo();
+            DCHandler.inst.reportData(3000006);
         } else {
             oops.gui.open(UIID.WechatWithdraw);
         }
         this.gameState = GameState.PAUSED;
+
     }
 
     //顶部红包按钮
@@ -1920,6 +1923,7 @@ export class EliminateViewComp extends CCComp {
 
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             ServerHandler.inst.getHbTxInfo();
+            DCHandler.inst.reportData(3000007);
         } else {
             oops.gui.open(UIID.RedPacketWithdraw);
         }
@@ -1932,6 +1936,7 @@ export class EliminateViewComp extends CCComp {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             this.gameState = GameState.PAUSED;
             ServerHandler.inst.getDoubleSpeedTime();
+            DCHandler.inst.reportData(3000010);
         } else {
             oops.gui.open(UIID.DoubleSpeed);
         }
@@ -1946,13 +1951,14 @@ export class EliminateViewComp extends CCComp {
         this.autoState = !this.autoState;
         this.initButtonState(this.autoState);
         if (this.autoState) {
-
+            DCHandler.inst.reportData(3000008);
             this.executeAutoPlace();
             this.autoFunction = this.executeAutoPlace;
             this.schedule(this.autoFunction, 1.5);
         } else {
             //关闭
             if (this.autoFunction) {
+                DCHandler.inst.reportData(3000009);
                 this.unschedule(this.autoFunction);
                 this.autoFunction = null;
                 this.initButtonState(false);
@@ -2158,7 +2164,7 @@ export class EliminateViewComp extends CCComp {
         this.doubleNum = 2;
         //改变按钮时间
         // let time = smc.game.GameModel.doubleSpeedTime;
-        this.doubleSpeedTime = smc.game.GameModel.doubleSpeedTime;
+        this.doubleSpeedTime = this.doubleSpeedTime + smc.game.GameModel.doubleSpeedTime;
         if (this.doubleSpeedTime <= 0) {
             return
         }

+ 6 - 2
assets/script/game/view/GameOverView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-27 18:19:53
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-21 18:10:36
+ * @LastEditTime: 2025-04-23 17:49:45
  * @Description: 游戏结束界面
  */
 import { _decorator } from 'cc';
@@ -13,6 +13,7 @@ import { UIID } from '../common/config/GameUIConfig';
 import { ADHandler } from '../common/manager/ADHandler';
 import { ServerHandler } from '../common/manager/ServerHandler';
 import { smc } from '../common/SingletonModuleComp';
+import { DCHandler } from '../common/manager/DCHandler';
 
 const { ccclass, property } = _decorator;
 
@@ -28,6 +29,7 @@ export class GameOverView extends VMParent {
 
     protected start() {
         this.setButton();
+        DCHandler.inst.reportData(3000601);
         //计算分数,取后两位小数*100
         let score = smc.game.GameModel.curScore;
         let targetScore = smc.game.GameModel.targetScore;
@@ -46,6 +48,7 @@ export class GameOverView extends VMParent {
         // oops.message.dispatchEvent(GameEvent.RestartGame);
         ServerHandler.inst.RestartGame();
         oops.gui.remove(UIID.GameOver);
+        DCHandler.inst.reportData(3000603);
     }
 
 
@@ -53,6 +56,7 @@ export class GameOverView extends VMParent {
         smc.game.GameModel.viewType = "revive_reward";
         //复活 分数不清零
         ADHandler.inst.showAd(AD_TYPE.Resurrection);
-        // oops.gui.remove(UIID.GameOver);
+        oops.gui.remove(UIID.GameOver);
+        DCHandler.inst.reportData(3000602);
     }
 }

+ 8 - 2
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-23 10:54:37
+ * @LastEditTime: 2025-04-23 17:32:10
  * @Description: 游戏通关弹窗
  */
 import { Label, Node } from 'cc';
@@ -17,6 +17,7 @@ import { smc } from '../common/SingletonModuleComp';
 import { ADHandler } from '../common/manager/ADHandler';
 import { GameEvent } from '../common/config/GameEvent';
 import { ServerHandler } from '../common/manager/ServerHandler';
+import { DCHandler } from '../common/manager/DCHandler';
 
 
 const { ccclass, property } = _decorator;
@@ -39,6 +40,7 @@ export class GamePassView extends GameComponent {
     callback: Function = null!;
 
     protected start() {
+        DCHandler.inst.reportData(3000500);
         this.setButton();
         this.isAuto = true;
         this.setData();
@@ -76,8 +78,10 @@ export class GamePassView extends GameComponent {
     private btn_none() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             ServerHandler.inst.getPassRewards();
+            DCHandler.inst.reportData(3000501);
         }
         oops.gui.remove(UIID.GamePass);
+        DCHandler.inst.reportData(3000503);
     }
 
     //十倍领取
@@ -87,6 +91,7 @@ export class GamePassView extends GameComponent {
             smc.game.GameModel.viewType = "pass_reward";
             ADHandler.inst.showAd(AD_TYPE.Pass_Receive);
             oops.gui.remove(UIID.GamePass);
+            DCHandler.inst.reportData(3000503);
         } else {
             oops.gui.remove(UIID.GamePass);
         }
@@ -102,7 +107,8 @@ export class GamePassView extends GameComponent {
             time--;
             if (time <= 0 && this.isAuto) {
                 this.btn_more();
-                this.unschedule(this.callback)
+                this.unschedule(this.callback);
+                DCHandler.inst.reportData(3000502);
             }
         }
         this.schedule(this.callback, 1, this.time);

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

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 18:39:37
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-15 18:51:35
+ * @LastEditTime: 2025-04-23 15:53:24
  * @Description: 红包列表item
  */
 import { _decorator, Label, Node, ProgressBar, Sprite } from 'cc';
@@ -11,6 +11,7 @@ import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
 import { smc } from '../common/SingletonModuleComp';
 import { TableLevelConfig } from '../common/table/TableLevelConfig';
 import { ServerHandler } from '../common/manager/ServerHandler';
+import { DCHandler } from '../common/manager/DCHandler';
 
 const { ccclass, property } = _decorator;
 
@@ -84,6 +85,7 @@ export class RedPackeItemView extends GameComponent {
         if (this.data.status == 1) {
             console.log("发送领取红包请求");
             ServerHandler.inst.getDailyReward(this.data.level);
+            DCHandler.inst.reportData(3000902, this.data.level);
         }
     }
 

+ 12 - 26
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-21 16:30:05
+ * @LastEditTime: 2025-04-23 17:29:58
  * @Description: 红包提现
  */
 import { _decorator, Label, Node } from "cc";
@@ -17,6 +17,7 @@ import List from "../ui/List";
 import { RedPackeItemView } from "./RedPackeItemView";
 import { smc } from "../common/SingletonModuleComp";
 import { Format } from "../utils/Format";
+import { DCHandler } from "../common/manager/DCHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -40,26 +41,7 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
     start() {
         this.setButton();
         this.addEvent();
-        // const data = {
-        //     title: `每日消除100次即可领取`,
-        //     current: 1,
-        //     total: 100,
-        //     state: 0,
-        //     goods: [
-        //         {
-        //             type: 1001,
-        //             num: 100
-        //         }
-        //     ]
-        // }
-
-        // for (let i = 0; i < 10; i++) {
-        //     this.data.push(data);
-        // }
-        // oops.log.logView(this.data, "this.data");
-        // this.recordList.numItems = this.data.length;
-        // oops.log.logView(this.recordList.numItems, "this.recordList.numItems");
-        // this
+        DCHandler.inst.reportData(3000900);
         this.data.taskList = smc.game.GameModel.taskList;
         this.data.wxCash = smc.game.GameModel.wxCash;
         this.data.hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
@@ -87,7 +69,7 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
     updateList() {
         // console.log("更新提现记录信息", this.data.wxCash);
         this.data.taskList = smc.game.GameModel.taskList;
-        this.data.wxCash = Format.formatWxCoin(smc.game.GameModel.wxCash);
+        this.data.wxCash = smc.game.GameModel.wxCash;
         this.data.hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
         this.data.goldNum = smc.account.AccountModel.goldCoin;
         this.recordList.numItems = 0;
@@ -99,35 +81,39 @@ export class RedPackeWithdrawalViewComp extends CCVMParentComp {
     }
 
     updateCoin() {
-        this.data.wxCash = Format.formatWxCoin(smc.game.GameModel.wxCash);
+        console.log("更新红包币和微信币", smc.account.AccountModel.hbCoin, smc.game.GameModel.wxCash);
+        this.data.wxCash = smc.game.GameModel.wxCash;
         this.data.hbCoin = Format.formatRedPacketCoin(smc.account.AccountModel.hbCoin);
+        //可以提现的那个金额币
     }
 
     private btn_back() {
         oops.gui.remove(UIID.RedPacketWithdraw);
         oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
+        DCHandler.inst.reportData(3000901);
     }
 
 
     private btn_record() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             ServerHandler.inst.getRecordList();
+            DCHandler.inst.reportData(3000902);
         } else {
             oops.gui.open(UIID.WithdrawRecord);
         }
     }
 
-    private btn_withdrawal() {
+    private async btn_withdrawal() {
         //全部提现
         if (this.data.wxCash > 0.1) {
-            //红包提现
             ServerHandler.inst.HbReward();
+            DCHandler.inst.reportData(3000900, 1001);
         } else {
             oops.gui.toast("微信官方限制大于0.1元,才能提现~");
+            DCHandler.inst.reportData(3000900, 1002);
         }
     }
 
-
     /** 视图对象通过 ecs.Entity.remove(WechatWithdrawalViewComp) 删除组件是触发组件处理自定义释放逻辑 */
     reset() {
         this.node.destroy();

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

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 17:00:12
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-23 11:57:06
+ * @LastEditTime: 2025-04-23 15:54:40
  * @Description: 微信提现页面
  */
 import { _decorator, ImageAsset, Label, Node, RichText, Size, Sprite, SpriteFrame, Texture2D, tween, UITransform, Vec3 } from "cc";
@@ -16,6 +16,7 @@ import { UIID } from "../common/config/GameUIConfig";
 import { ServerHandler } from "../common/manager/ServerHandler";
 import { smc } from "../common/SingletonModuleComp";
 import { Format } from "../utils/Format";
+import { DCHandler } from "../common/manager/DCHandler";
 
 const { ccclass, property } = _decorator;
 
@@ -55,6 +56,7 @@ export class WechatWithdrawalViewComp extends CCVMParentComp {
     /** 视图层逻辑代码分离演示 */
     start() {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
+        DCHandler.inst.reportData(3000800);
         this.setButton();
         this.updateNotice();
         this.setData();
@@ -105,11 +107,13 @@ export class WechatWithdrawalViewComp extends CCVMParentComp {
     private btn_back() {
         oops.gui.remove(UIID.WechatWithdraw);
         oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
+        DCHandler.inst.reportData(3000801);
     }
 
     private btn_record() {
         if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
             ServerHandler.inst.getRecordList();
+            DCHandler.inst.reportData(3000802);
         } else {
             oops.gui.open(UIID.WithdrawRecord);
         }

+ 41 - 1
assets/script/game/view/keepDoubleSpeedView.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-15 20:16:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-23 15:13:16
+ * @LastEditTime: 2025-04-23 16:32:13
  * @Description: 继续二倍速
  */
 import { _decorator, Component, Node } from 'cc';
@@ -12,18 +12,48 @@ import { AD_TYPE } from '../common/config/GameDefine';
 import { UIID } from '../common/config/GameUIConfig';
 import { ADHandler } from '../common/manager/ADHandler';
 import { smc } from '../common/SingletonModuleComp';
+import { Label } from 'cc';
+import { DCHandler } from '../common/manager/DCHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('keepDoubleSpeedView')
 export class keepDoubleSpeedView extends GameComponent {
+    private isAuto: boolean = false;
+
+    @property(Label)
+    private lab_time: Label = null!;
+
+    private time: number = 3;
+    private autoFunction: Function | null = null;
     start() {
         this.setButton();
+        //设置3秒自启动
+        this.isAuto = true;
+        this.time = 3;
+        this.lab_time.string = `${this.time}秒后自启动`;
+        this.autoFunction = () => {
+            this.time--
+            this.lab_time.string = `${this.time}秒后自启动`;
+            if (this.isAuto && this.time <= 0) {
+                if (this.autoFunction) {
+                    this.unschedule(this.autoFunction);
+                    this.isAuto = false;
+                    this.openAd();
+                    oops.gui.remove(UIID.KeepSpeed);
+                    DCHandler.inst.reportData(3000304);
+
+                }
+            }
+        }
+        this.schedule(this.autoFunction, 1);
     }
 
 
     private btn_open() {
+        this.isAuto = false;
         this.openAd();
         oops.gui.remove(UIID.KeepSpeed);
+        DCHandler.inst.reportData(3000303);
     }
 
     //打开广告
@@ -33,14 +63,24 @@ export class keepDoubleSpeedView extends GameComponent {
     }
 
     private btn_no() {
+        this.isAuto = false;
         oops.gui.remove(UIID.KeepSpeed);
         ADHandler.inst.showAd("107");
     }
 
     private btn_close() {
+        this.isAuto = false;
         oops.gui.remove(UIID.KeepSpeed);
         //播放插屏广告
         ADHandler.inst.showAd("107");
+        DCHandler.inst.reportData(3000305);
+    }
+
+    protected onDisable(): void {
+        this.isAuto = false;
+        if (this.autoFunction) {
+            this.unschedule(this.autoFunction);
+        }
     }
 
 }

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

@@ -5,6 +5,7 @@ import { UIID } from '../../common/config/GameUIConfig';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { smc } from '../../common/SingletonModuleComp';
 import { Format } from '../../utils/Format';
+import { DCHandler } from '../../common/manager/DCHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('ReservePopup')
@@ -20,6 +21,7 @@ export class ReservePopup extends VMParent {
 
 
     start() {
+        DCHandler.inst.reportData(3000200);
         this.setButton();
         this.updateData();
     }

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

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-19 11:34:46
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 17:00:16
+ * @LastEditTime: 2025-04-23 17:43:19
  * @Description: 微信转账中界面
  */
 import { _decorator, Component, Node, Animation } from 'cc';
@@ -12,6 +12,7 @@ import { oops } from 'db://oops-framework/core/Oops';
 import { UIID } from '../../common/config/GameUIConfig';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { Format } from '../../utils/Format';
+import { DCHandler } from '../../common/manager/DCHandler';
 const { ccclass, property } = _decorator;
 
 @ccclass('WechatTransfer')
@@ -43,6 +44,7 @@ export class WechatTransfer extends VMParent {
 
 
     start() {
+        DCHandler.inst.reportData(3000201);
         this.setButton();
         this.showNode1.active = true;
         this.showNode2.active = false;
@@ -67,6 +69,7 @@ export class WechatTransfer extends VMParent {
         this.showNode1.active = false;
         this.showNode2.active = true;
         //播放动画
+        DCHandler.inst.reportData(3000202);
         const animation = this.showNode2.getComponent(Animation);
         if (animation) {
             animation.play();
@@ -88,6 +91,7 @@ export class WechatTransfer extends VMParent {
     }
 
     onVerifyClose() {
+        DCHandler.inst.reportData(3000203);
         this.showNode2.active = false;
         this.showNode3.active = true;
         const animation = this.showNode3.getComponent(Animation);