From 60148849816a85fb15cb7b65f99e1fee53e772db Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Mon, 26 May 2025 18:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E8=90=BD=E5=BA=A7=E6=B2=A1=E6=B3=95=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameLogic/Manager/DataGameModelManager.cs | 75 ++++++++++--------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs index 9cab8b9a..c2c0921f 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs @@ -96,48 +96,55 @@ public class DataGameModelManager : GameBase.Singleton } }); - // 新接口额外包装了一层数据 - - UploadScoreRequest uploadScoreRequest = new UploadScoreRequest(); - uploadScoreRequest.roomId = EventConts.RoomData.room_id; - uploadScoreRequest.roundId = RoundId.ToString(); - uploadScoreRequest.rankVos = rankInfos; - uploadScoreRequest.anchorUid = EventConts.RoomData.anchor_open_id; - uploadScoreRequest.winSide = "blue"; - RoundId++; - - - Log.Debug($"上传排行榜数据:{rankInfos.ToJson()}"); - string m_Json = EventConts.PlatformType == PlatformType.None ? HttpSendHelper.HttpPostRequest(EventConts.UploadScoreTest, uploadScoreRequest.ToJson()) : HttpSendHelper.HttpPostRequest(EventConts.UploadScore, uploadScoreRequest.ToJson()); - Log.Debug($"收到排行榜数据:{m_Json}"); - - - PlayRankRootData playRankRootData = JsonHelper.Deserialize(m_Json); - if (playRankRootData != null && playRankRootData.code == 200) + if (rankInfos.Count <= 0) { - // // 清理礼物队列 - // DataGameManager.Instance.m_VipItemDatas.Clear(); - // DataGameManager.Instance.m_GiftItemDatas.Clear(); - - // 打开结算界面 - //object[] objects = new object[2]; - //objects[0] = GameRankType.当局排行榜; - //objects[1] = playRankRootData.data; - - GameModule.UI.ShowUI(playRankRootData.data); + List data = new List(); + GameModule.UI.ShowUI(data); GameModule.UI.CloseUI(); } else { - UITip.ShowMessageBox("排行榜结算异常,请联系管理员!!Code:" + playRankRootData.code, MessageShowType.TwoButton, () => - { + // 新接口额外包装了一层数据 + UploadScoreRequest uploadScoreRequest = new UploadScoreRequest(); + uploadScoreRequest.roomId = EventConts.RoomData.room_id; + uploadScoreRequest.roundId = RoundId.ToString(); + uploadScoreRequest.rankVos = rankInfos; + uploadScoreRequest.anchorUid = EventConts.RoomData.anchor_open_id; + uploadScoreRequest.winSide = "blue"; + RoundId++; - }, () => - { - }); + Log.Debug($"上传排行榜数据:{rankInfos.ToJson()}"); + string m_Json = EventConts.PlatformType == PlatformType.None ? HttpSendHelper.HttpPostRequest(EventConts.UploadScoreTest, uploadScoreRequest.ToJson()) : HttpSendHelper.HttpPostRequest(EventConts.UploadScore, uploadScoreRequest.ToJson()); + Log.Debug($"收到排行榜数据:{m_Json}"); + + + PlayRankRootData playRankRootData = JsonHelper.Deserialize(m_Json); + if (playRankRootData != null && playRankRootData.code == 200) + { + // // 清理礼物队列 + // DataGameManager.Instance.m_VipItemDatas.Clear(); + // DataGameManager.Instance.m_GiftItemDatas.Clear(); + + // 打开结算界面 + //object[] objects = new object[2]; + //objects[0] = GameRankType.当局排行榜; + //objects[1] = playRankRootData.data; + + GameModule.UI.ShowUI(playRankRootData.data); + GameModule.UI.CloseUI(); + } + else + { + UITip.ShowMessageBox("排行榜结算异常,请联系管理员!!Code:" + playRankRootData.code, MessageShowType.TwoButton, () => + { + + }, () => + { + + }); + } } - }