From 3d20db977a13282f8ec25101b1a1aef9435546f2 Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Mon, 22 Sep 2025 14:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E9=9A=8F=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/App.cs | 2 +- .../Assets/Script/AppMain/Manager/HttpAPI.cs | 40 +++---------------- .../AppMain/Manager/RomLib/FileDownloader.cs | 4 +- .../SaveFileSyncStates/DownloadingState.cs | 4 +- 4 files changed, 10 insertions(+), 40 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs index aa5ba5a8..efd87ec2 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/App.cs @@ -213,7 +213,7 @@ namespace AxibugEmuOnline.Client.ClientCore else if (request.downloadHandler.bHadErr) { bHttpCheckDone = false; - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); } else { diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs index 22f7623a..99ee5fc5 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/HttpAPI.cs @@ -28,18 +28,9 @@ namespace AxibugEmuOnline.Client if (!string.IsNullOrEmpty(searchKey)) { string oldsearch = searchKey; - //searchKey = System.Net.WebUtility.UrlEncode(searchKey); searchKey = AxiHttp.UrlEncode(searchKey); App.log.Info($"search->{oldsearch} ->{searchKey}"); - //searchKey = HttpUtility.UrlDecode(searchKey); } - //避免特殊字符和个别文字编码问题 - //byte[] gb2312Bytes = Encoding.Default.GetBytes(searchKey); - //byte[] utf8Bytes = Encoding.Convert(Encoding.Default, Encoding.UTF8, gb2312Bytes); - //// 将UTF-8编码的字节数组转换回字符串(此时是UTF-8编码的字符串) - //string utf8String = Encoding.UTF8.GetString(utf8Bytes); - //searchKey = UrlEncode(utf8String); - //App.log.Info($"search->{utf8String} ->{searchKey}"); string url = $"{WebSiteApi}/RomList?Page={page}&PageSize={pageSize}&PType={(int)platform}&SearchKey={searchKey}&Token={App.user.Token}"; App.log.Info($"GetRomList=>{url}"); AxiHttpProxy.SendWebRequestProxy request = AxiHttpProxy.Get(url); @@ -57,19 +48,8 @@ namespace AxibugEmuOnline.Client yield break; } - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); callback.Invoke(page, null); - - /* - UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}&SearchKey={searchKey}"); - yield return request.SendWebRequest(); - - if (request.result != UnityWebRequest.Result.Success) - { - callback.Invoke(null); - yield break; - }*/ - } private IEnumerator GetRomListFlow(AxibugProtobuf.RomPlatformType platform, int page, int pageSize, Action callback) { @@ -91,18 +71,8 @@ namespace AxibugEmuOnline.Client yield break; } - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); callback.Invoke(page, null); - /* - UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}"); - yield return request.SendWebRequest(); - - if (request.result != UnityWebRequest.Result.Success) - { - callback.Invoke(null); - yield break; - } - */ } public void GetMarkList(Action callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10) @@ -147,7 +117,7 @@ namespace AxibugEmuOnline.Client yield break; } - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); callback.Invoke(page, null); /* @@ -181,7 +151,7 @@ namespace AxibugEmuOnline.Client yield break; } - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); callback.Invoke(page, null); /* UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/NesRomList?Page={page}&PageSize={pageSize}"); @@ -215,7 +185,7 @@ namespace AxibugEmuOnline.Client yield break; } - App.log.Error(request.downloadHandler.ErrInfo); + App.log.Error(request.downloadHandler.errInfo); callback.Invoke(null); /* diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/FileDownloader.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/FileDownloader.cs index bb053334..068a018f 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/FileDownloader.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/RomLib/FileDownloader.cs @@ -23,7 +23,7 @@ namespace AxibugEmuOnline.Client m_downloadingTasks.TryGetValue(url, out var proxy); if (proxy == null) return null; - return Mathf.Clamp01(proxy.downloadHandler.DownLoadPr); + return Mathf.Clamp01(proxy.downloadHandler.downLoadPr); } HashSet temp = new HashSet(); @@ -53,7 +53,7 @@ namespace AxibugEmuOnline.Client } else { - Debug.LogError($"{overTask.downloadHandler.ErrInfo}:{overTask.downloadHandler.url}"); + Debug.LogError($"{overTask.downloadHandler.errInfo}:{overTask.downloadHandler.url}"); } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs index 23949a35..67e02563 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs @@ -43,7 +43,7 @@ namespace AxibugEmuOnline.Client if (m_downloadTask.downloadHandler.bHadErr) //下载失败 { - FSM.GetState().Error = m_downloadTask.downloadHandler.ErrInfo; + FSM.GetState().Error = m_downloadTask.downloadHandler.errInfo; FSM.ChangeState(); return; } @@ -52,7 +52,7 @@ namespace AxibugEmuOnline.Client if (m_downloadTaskImg.downloadHandler.bHadErr) //下载失败 { - FSM.GetState().Error = m_downloadTaskImg.downloadHandler.ErrInfo; + FSM.GetState().Error = m_downloadTaskImg.downloadHandler.errInfo; FSM.ChangeState(); return; }