소스 검색

【打印】去掉打印

mojunshou 7 달 전
부모
커밋
4c30a78b4d

+ 3 - 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-29 15:08:59
+ * @LastEditTime: 2025-04-30 18:32:37
  * @Description: 登录管理
  */
 // LoginHandler.ts
@@ -79,7 +79,7 @@ export class LoginHandler {
     }
 
     wechatLoginSuccess(str: string) {
-        console.log('[微信] 登录成功', str);
+        //console.log('[微信] 登录成功', str);
         // this.wxLogin(str);
         //向服务器申请登录
         ServerHandler.inst.wxLogin(str);
@@ -87,7 +87,7 @@ export class LoginHandler {
     }
 
     wechatLoginFail(str: number) {
-        console.log('[微信] 登录失败', str);
+        // console.log('[微信] 登录失败', str);
         switch (str) {
             case -5:
                 oops.gui.toast('登录失败,微信未安装~');

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

@@ -2,13 +2,15 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-04-07 10:17:16
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-30 15:02:14
+ * @LastEditTime: 2025-04-30 18:32:45
  * @Description: 消息定义
  */
 
 // const server_url = "http://192.168.10.103:8880";
 // https://central-test.atmob.com
 const server_url = "https://central-test.atmob.com";
+
+
 export enum ProtocolEvent {
     /**微信登录*/
     WechatLogin = server_url + "/project/playlet/v1/user/login",

+ 26 - 26
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-29 18:59:59
+ * @LastEditTime: 2025-04-30 18:33:10
  * @Description: 
  */
 // ServerHandler.ts
@@ -51,7 +51,7 @@ export class ServerHandler {
     }
 
     onWxLoginInfo(str: string) {
-        console.log('[服务器] 微信登录返回', str);
+        //console.log('[服务器] 微信登录返回', str);
         // let 
         this.getAccountInfo();
     }
@@ -66,7 +66,7 @@ export class ServerHandler {
     }
 
     onAccountInfo(str: string) {
-        console.log('[服务器] 获取账号信息返回', str);
+        //console.log('[服务器] 获取账号信息返回', str);
         const data = JSON.parse(str);
         const account = smc.account.AccountModel;
         const game = smc.game.GameModel;
@@ -102,7 +102,7 @@ export class ServerHandler {
     }
 
     onDailyReward(str: string) {
-        console.log('[服务器] 每日奖励返回', str);
+        //console.log('[服务器] 每日奖励返回', str);
         let result = JSON.parse(str);
         smc.account.AccountModel.hbCoin = result.props["1004"];
         smc.account.AccountModel.xcCount = result.props["1007"];  //消除次数
@@ -127,7 +127,7 @@ export class ServerHandler {
     }
 
     onHbTxInfo(str: string) {
-        console.log('[服务器] 获取红包页面信息返回', str);
+        //console.log('[服务器] 获取红包页面信息返回', str);
         let result = JSON.parse(str);
         smc.account.AccountModel.hbCoin = result.props["1004"] || 0;
         smc.account.AccountModel.xcCount = result.props["1007"] || 0;  //消除次数
@@ -177,7 +177,7 @@ export class ServerHandler {
 
     //提现列表
     onRecordList(str: string) {
-        console.log('[服务器] 提现列表返回', str);
+        //console.log('[服务器] 提现列表返回', str);
         const result = JSON.parse(str);
         if (result.count > 0) {
             smc.game.GameModel.recordList = result.list;
@@ -194,7 +194,7 @@ export class ServerHandler {
     }
 
     onGameAwardInfo(str: string) {
-        console.log('[服务器] 获取通关信息', str);
+        //console.log('[服务器] 获取通关信息', str);
         const result = JSON.parse(str);
         smc.game.GameModel.passViewInfo = result;
         oops.message.dispatchEvent(GameEvent.openView, 'openPassView');
@@ -210,7 +210,7 @@ export class ServerHandler {
 
     //提现返利
     onRebates(str: string) {
-        console.log('[服务器] 提现返利信息', str);
+        //console.log('[服务器] 提现返利信息', str);
         let result = JSON.parse(str);
         smc.game.GameModel.cashNum = result.props["1004"];
         smc.account.AccountModel.hbCoin = result.props["1004"];
@@ -229,7 +229,7 @@ export class ServerHandler {
 
     //双倍惊喜返回
     onDoubleSurprise(str: string) {
-        console.log('[服务器] 恭喜翻倍信息', str);
+        //console.log('[服务器] 恭喜翻倍信息', str);
         let result = JSON.parse(str);
         smc.game.GameModel.doubleRewardInfo = result;
         oops.message.dispatchEvent(GameEvent.openView, "openDoubleSurprise");
@@ -250,7 +250,7 @@ export class ServerHandler {
     }
 
     onEliminationSuccess(str: string) {
-        console.log('[服务器] 消除成功返回', str);
+        //console.log('[服务器] 消除成功返回', str);
         let result = JSON.parse(str);
         if (result?.props && result?.changes) {
             const props = result.props;
@@ -278,7 +278,7 @@ export class ServerHandler {
     }
 
     onSign(str: string) {
-        console.log('[服务器] 签名返回', str);
+        //console.log('[服务器] 签名返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.sign = result?.sign || "";
     }
@@ -297,7 +297,7 @@ export class ServerHandler {
     }
     //直接领取通关奖励返回
     onGetPassRewards(str: string) {
-        console.log('[服务器] 直接领取通关奖励成功返回', str);
+        //console.log('[服务器] 直接领取通关奖励成功返回', str);
         let result = JSON.parse(str);
         //全部取小数点后两位
         smc.game.GameModel.changeHbCoin = result.changes['1004'] || 0;
@@ -332,7 +332,7 @@ export class ServerHandler {
 
     //少量领取翻倍奖励返回
     onGetDoubleRewards(str: string) {
-        console.log('[服务器] 少量领取双倍奖励成功返回', str);
+        //console.log('[服务器] 少量领取双倍奖励成功返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.changeHbCoin = result.changes['1004'] || 0;
         smc.game.GameModel.changeWxCoin = result.changes['1005'] || 0;
@@ -347,7 +347,7 @@ export class ServerHandler {
         const sign = smc.game.GameModel.sign;
         // const level = smc.account.AccountModel.curLevel;
         let type = smc.game.GameModel.viewType;
-        console.log("获取视频奖励类型", type)
+        //console.log("获取视频奖励类型", type)
         const param = {
             url: ProtocolEvent.GetVideorReward,
             param: {
@@ -362,7 +362,7 @@ export class ServerHandler {
     }
 
     onGetVideorReward(str: string) {
-        console.log('[服务器] 获取视频奖励放回', str);
+        //console.log('[服务器] 获取视频奖励放回', str);
         let result = JSON.parse(str);
         if (result.tipThreshold) {
             oops.gui.toast("今日奖励已领取,请明天再来吧")
@@ -398,7 +398,7 @@ export class ServerHandler {
     }
 
     onGetNextLevel(str: string) {
-        console.log('[服务器] 下一关数据返回', str);
+        //console.log('[服务器] 下一关数据返回', str);
         let result = JSON.parse(str);
         smc.account.AccountModel.curLevel = result.currentLevelData.level;
         smc.game.GameModel.curScore = result.currentLevelData.score;
@@ -424,7 +424,7 @@ export class ServerHandler {
 
 
     onRestartGame(str: string) {
-        console.log('[服务器] 重新开始游戏返回', str);
+        //console.log('[服务器] 重新开始游戏返回', str);
         let result = JSON.parse(str);
         smc.account.AccountModel.curLevel = result.currentLevelData.level;
         smc.game.GameModel.curScore = result.currentLevelData.score;
@@ -448,7 +448,7 @@ export class ServerHandler {
     }
 
     onWechatReward(str: string) {
-        console.log("[服务器] 微信提现请求成功", str);
+        //console.log("[服务器] 微信提现请求成功", str);
         let result = JSON.parse(str);
         smc.game.GameModel.txNum = result.changes["8001"];
         smc.game.GameModel.txType = 1;
@@ -472,7 +472,7 @@ export class ServerHandler {
     }
 
     onHbReward(str: string) {
-        console.log('[服务器] 红包币提现返回', str);
+        //console.log('[服务器] 红包币提现返回', str);
         let result = JSON.parse(str);
         const wxCash = result.changes["8001"];
         smc.game.GameModel.txNum = wxCash;
@@ -499,7 +499,7 @@ export class ServerHandler {
     }
 
     onGetWechatTxInfo(str: string) {
-        console.log('[服务器] 获取微信提现页信息返回', str);
+        //console.log('[服务器] 获取微信提现页信息返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.wechat_tx_info = result;
         oops.message.dispatchEvent(GameEvent.openView, "openWechatWithdrawalView");
@@ -516,7 +516,7 @@ export class ServerHandler {
     }
 
     onGetDoubleSpeedTime(str: string) {
-        console.log('[服务器] 获取二倍速时长返回', str);
+        //console.log('[服务器] 获取二倍速时长返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.doubleSpeedTime = result.duration;
         oops.message.dispatchEvent(GameEvent.openView, "openDoubleSpeedView");
@@ -533,7 +533,7 @@ export class ServerHandler {
     }
 
     onGetGuideInfo(str: string) {
-        console.log('[服务器] 获取引导界面信息返回', str);
+        //console.log('[服务器] 获取引导界面信息返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.loadbarInfo = result;
     }
@@ -554,7 +554,7 @@ export class ServerHandler {
     }
 
     onUpdatePopupState(str: string) {
-        console.log('[服务器] 更新弹出事件返回', str);
+        //console.log('[服务器] 更新弹出事件返回', str);
         let result = JSON.parse(str);
         smc.game.GameModel.popupShow = result.status || true;
     }
@@ -572,7 +572,7 @@ export class ServerHandler {
     }
 
     onGetFee(str: string) {
-        console.log('[服务器] 领取手续费返回', str);
+        //console.log('[服务器] 领取手续费返回', str);
         let result = JSON.parse(str);
         // smc.game.GameModel.fee = result.fee;
     }
@@ -593,12 +593,12 @@ export class ServerHandler {
     }
 
     onSaveCurLevelInfo(str: string) {
-        console.log('[服务器] 保存当前关卡信息返回', str);
+        //console.log('[服务器] 保存当前关卡信息返回', str);
         let result = JSON.parse(str);
     }
 
     onRequestFail(code: number, str: string) {
-        console.log('[服务器] 请求失败', code, str);
+        //console.log('[服务器] 请求失败', code, str);
         oops.gui.toast("网络错误,请稍后重试~")
     }
 

+ 1 - 2
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-30 18:00:04
+ * @LastEditTime: 2025-04-30 18:33:30
  * @Description: loading界面
  */
 import { _decorator, Toggle } from "cc";
@@ -41,7 +41,6 @@ export class LoadingViewComp extends CCVMParentComp {
     private progress: number = 0;
 
     start() {
-        oops.log.setTags();
         this.enter();
         this.addEvent();
         this.setButton();

+ 1 - 0
assets/script/game/view/CashRebateView.ts

@@ -43,6 +43,7 @@ export class CashRebateView extends GameComponent {
             oops.message.dispatchEvent(GameEvent.showCoinAnimation, "showCoin");
             //下一关
             ServerHandler.inst.getNextLevel();
+            DCHandler.inst.reportData(3000703);
             DCHandler.inst.reportData(3000704);
 
         } else {

+ 11 - 11
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-30 18:04:37
+ * @LastEditTime: 2025-04-30 18:32:05
  * @Description: 消除游戏主场景
  */
 import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, Animation, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
@@ -398,7 +398,7 @@ export class EliminateViewComp extends CCComp {
 
 
     openView(event: string, args: string) {
-        oops.log.logView(args, "<<<<<<<打开的弹窗类型");
+        //oops.log.logView(args, "<<<<<<<打开的弹窗类型");
         switch (args) {
             case "openRedBagView":
                 oops.gui.open(UIID.RedPacketWithdraw);
@@ -1584,13 +1584,13 @@ export class EliminateViewComp extends CCComp {
                             if (minNum && maxNum) {
                                 const randomNum = randomRangeInt(minNum, maxNum + 1);
                                 //这个数可以被总消除次数整除那就可以弹广告
-                                oops.log.logView(randomNum, "<<<<<<<<<随机数");
-                                oops.log.logView(this.eliminateTotal, "<<<<<<<<<消除总数");
-                                oops.log.logView(smc.game.GameModel.skipAdConfig, "<<<<<<<<<skipAdConfig");
-                                oops.log.logView(smc.game.GameModel.skipAdCount, "<<<<<<<<<skipAdCount");
-                                oops.log.logView(smc.game.GameModel.smallAdCount, "<<<<<<<<<smallAdCount");
-                                oops.log.logView(smc.game.GameModel.allAdCount, "<<<<<<<<<allAdCount");
-                                oops.log.logView(smc.game.GameModel.directAdCount, "<<<<<<<<<directAdCount");
+                                //oops.log.logView(randomNum, "<<<<<<<<<随机数");
+                                //oops.log.logView(this.eliminateTotal, "<<<<<<<<<消除总数");
+                                //oops.log.logView(smc.game.GameModel.skipAdConfig, "<<<<<<<<<skipAdConfig");
+                                //oops.log.logView(smc.game.GameModel.skipAdCount, "<<<<<<<<<skipAdCount");
+                                //oops.log.logView(smc.game.GameModel.smallAdCount, "<<<<<<<<<smallAdCount");
+                                //oops.log.logView(smc.game.GameModel.allAdCount, "<<<<<<<<<allAdCount");
+                                //oops.log.logView(smc.game.GameModel.directAdCount, "<<<<<<<<<directAdCount");
                                 if (this.eliminateTotal % randomNum === 0) {
                                     //如果有自动就暂停自动
                                     if (smc.game.GameModel.skipAdConfig != -1) {
@@ -1703,7 +1703,7 @@ export class EliminateViewComp extends CCComp {
         const changeNum = smc.game.GameModel.changeWxCoin;
         this.money = smc.account.AccountModel.wxCoin;
         const formattedValue = changeNum;
-        oops.log.logView(changeNum, "<<<<<<<<<微信币增加");
+        //oops.log.logView(changeNum, "<<<<<<<<<微信币增加");
         // 获取并设置分数标签
         const scoreLabel = this.tweenWechatNode.getChildByName("lab_num")?.getComponent(Label);
         if (scoreLabel) {
@@ -1750,7 +1750,7 @@ export class EliminateViewComp extends CCComp {
         if (!this.tweenRedNode) return;
         //如果有值就是要那个,没有就是取随机
         const changeNum = smc.game.GameModel.changeHbCoin;
-        oops.log.logView(changeNum, "<<<<<<<<<红包分数增加");
+        //oops.log.logView(changeNum, "<<<<<<<<<红包分数增加");
         this.cash = smc.account.AccountModel.hbCoin;
         if (!changeNum) return;
         const formattedValue = changeNum;