From a09855bd8fdf2bd12ece8e9d4550a3fdfda3572e Mon Sep 17 00:00:00 2001 From: "COMPUTER\\EDY" <249929363@qq.com> Date: Thu, 25 Jun 2026 14:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scene/GameScene.fire | 4 ++-- assets/Script/GameManager.ts | 16 ++++++++++++++++ assets/Script/Map.ts | 4 ++-- assets/Script/Sdk/MiniGameSdk.ts | 11 +++++++++++ assets/Script/module/Config/GameConfig.ts | 6 +++++- assets/Script/module/Pay/Utils.ts | 4 ++-- assets/Script/module/Tool/GameTool.ts | 3 +++ assets/Script/ranking.ts | 4 ++-- assets/custom/Json/level1760.json | 4 ++-- 9 files changed, 45 insertions(+), 11 deletions(-) diff --git a/assets/Scene/GameScene.fire b/assets/Scene/GameScene.fire index ef82692..37e095a 100644 --- a/assets/Scene/GameScene.fire +++ b/assets/Scene/GameScene.fire @@ -8511,7 +8511,7 @@ "__uuid__": "c5195cb6-e974-4b2b-9b9a-fa73a8c21cfb" }, "_texture": null, - "_stopped": false, + "_stopped": true, "playOnLoad": true, "autoRemoveOnFinish": false, "totalParticles": 100, @@ -8687,7 +8687,7 @@ "__uuid__": "a28b8261-be09-47df-aaa7-db3b6edebc3e" }, "_texture": null, - "_stopped": false, + "_stopped": true, "playOnLoad": true, "autoRemoveOnFinish": false, "totalParticles": 100, diff --git a/assets/Script/GameManager.ts b/assets/Script/GameManager.ts index 450f270..55f3192 100644 --- a/assets/Script/GameManager.ts +++ b/assets/Script/GameManager.ts @@ -65,6 +65,22 @@ export default class GameManager extends cc.Component { cc.fx.GameConfig.init(true); cc.fx.GameConfig.GM_INFO.sceneValue = "loadScene"; cc.fx.GameConfig.GM_INFO.gameState = false; + + //@ts-ignore + if (typeof wx !== 'undefined' && wx !== null) { + //@ts-ignore + let query = wx.getLaunchOptionsSync().query; + if (query.ge_ad_id) cc.fx.GameConfig.GM_INFO.ge_ad_id = query.ge_ad_id; + if (query.ge_creative_id) cc.fx.GameConfig.GM_INFO.ge_creative_id = query.ge_creative_id; + + // 遍历 query 中除 ge_ad_id、ge_creative_id 之外的其他参数 + for (const key in query) { + if (key !== 'ge_ad_id' && key !== 'ge_creative_id') { + cc.fx.GameTool.trackErrorToShushu({ message: key }); + } + } + } + setTimeout(() => { cc.fx.GameTool.initWechatErrorTracking(); }, 500); diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index cad5995..10839ae 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -314,7 +314,7 @@ export default class MapConroler extends cc.Component { } Utils.getCityRank((res) => { if (res.code === 1) { - console.log("城市排行数据:", res.data); + // console.log("城市排行数据:", res.data); if (res.data.length > 0) { for (let i = 0; i < res.data.length; i++) { if (res.data[i].addLevel <= cc.fx.GameConfig.GM_INFO.addLevel) { @@ -3171,7 +3171,7 @@ export default class MapConroler extends cc.Component { // alert("游戏成功"); Utils.getCityRank((res) => { if (res.code === 1) { - console.log("城市排行数据:", res.data); + // console.log("城市排行数据:", res.data); if (res.data.length > 0) { for (let i = 0; i < res.data.length; i++) { if (res.data[i].addLevel <= (cc.fx.GameConfig.GM_INFO.addLevel + 1)) { diff --git a/assets/Script/Sdk/MiniGameSdk.ts b/assets/Script/Sdk/MiniGameSdk.ts index 7c98210..db0a82e 100644 --- a/assets/Script/Sdk/MiniGameSdk.ts +++ b/assets/Script/Sdk/MiniGameSdk.ts @@ -1572,6 +1572,17 @@ export namespace MiniGameSdk { } else { // console.log('未获取到用户的 account_id'); } + + // 设置广告属性 + if (cc.fx.GameConfig.GM_INFO.ge_ad_id != "") { + console.log("___________上报ge_ad_id", cc.fx.GameConfig.GM_INFO.ge_ad_id); + API._ta.userSet({ ge_ad_id: cc.fx.GameConfig.GM_INFO.ge_ad_id }); + } + + if (cc.fx.GameConfig.GM_INFO.ge_creative_id != "") { + console.log("___________上报ge_creative_id", cc.fx.GameConfig.GM_INFO.ge_creative_id); + API._ta.userSet({ ge_creative_id: cc.fx.GameConfig.GM_INFO.ge_creative_id }); + } } } diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts index 0347b46..d2650a9 100644 --- a/assets/Script/module/Config/GameConfig.ts +++ b/assets/Script/module/Config/GameConfig.ts @@ -153,6 +153,8 @@ export class GameConfig { GameplayType: number; //游戏类型 canIos: boolean, //ios展示是否可以 iosCanPay: boolean, //ios是否支持支付 + ge_ad_id: string, //广告ID + ge_creative_id: string, //创意ID }; @@ -300,7 +302,7 @@ export class GameConfig { vibrateOpen: true, //震动 coinnum: 0, //每局的金币数 paid_user: false, //是否是付费用户 - version: "1.9.87", //版本号 + version: "1.9.88", //版本号 shushu_DistinctId: "", //数数访客ID shushu_AccountId: "", //数数账号ID uid: "", //用户和后端唯一id @@ -353,6 +355,8 @@ export class GameConfig { GameplayType: 0, // 0 正常模式, 1无尽模式 canIos: true, //ios展示是否可以 iosCanPay: false, //ios是否支持支付 + ge_ad_id: "", //广告ID + ge_creative_id: "", //广告创意ID }; // this.setCode(this.getKey("scode")); // this.GM_INFO.level = 0; diff --git a/assets/Script/module/Pay/Utils.ts b/assets/Script/module/Pay/Utils.ts index 8fac212..6708778 100644 --- a/assets/Script/module/Pay/Utils.ts +++ b/assets/Script/module/Pay/Utils.ts @@ -965,8 +965,8 @@ export default class Utils { }, 3000); console.log("请求uid:" + Utils.uid); Utils.POST("getRank", { uid: cc.fx.GameConfig.GM_INFO.uid }, res => { - console.log("查询排行榜结果"); - console.log(res); + // console.log("查询排行榜结果"); + // console.log(res); // 清除超时定时器 clearTimeout(timeoutId); if (!isCallBackCalled) { diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 730e905..215b786 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -2176,6 +2176,9 @@ var GameTool = { if (error.message.includes("null is not an object (evaluating 't._components.length')")) { return; } + else if (error.message.includes("wx7095f7fa398a2f30")) { + return; + } else if (error.message.includes("o.call is not a function. (In 'o.call(this)', 'o.call' is undefined)")) { return; } diff --git a/assets/Script/ranking.ts b/assets/Script/ranking.ts index 9f285c4..d857278 100644 --- a/assets/Script/ranking.ts +++ b/assets/Script/ranking.ts @@ -297,8 +297,8 @@ export default class ranking extends cc.Component { this.selfInfo = null; for (let i = 0; i < this.wordRank.length; i++) { if (this.wordRank[i]._id == cc.fx.GameConfig.GM_INFO.uid) { - console.log("我自己的UID", cc.fx.GameConfig.GM_INFO.uid); - console.log("排行榜中的ID:", this.wordRank[i]._id); + // console.log("我自己的UID", cc.fx.GameConfig.GM_INFO.uid); + // console.log("排行榜中的ID:", this.wordRank[i]._id); // this.selfInfo = this.wordRank[i]; this.selfInfo = JSON.parse(JSON.stringify(this.wordRank[i])); if (this.selfInfo.useravatar == "0" || this.selfInfo.useravatar == "1" || this.selfInfo.useravatar == "2" diff --git a/assets/custom/Json/level1760.json b/assets/custom/Json/level1760.json index c612747..0934ab8 100644 --- a/assets/custom/Json/level1760.json +++ b/assets/custom/Json/level1760.json @@ -601,7 +601,7 @@ "color": 1, "special": 0, "length": 2, - "colorArray": "02112" + "colorArray": "021102" }, { "id": 1777, @@ -609,7 +609,7 @@ "color": 1, "special": 0, "length": 0, - "colorArray": "02112" + "colorArray": "021102" } ] ]