From a5e3176e496e65bd5fb43c8c4ecef0dbb1bc1f48 Mon Sep 17 00:00:00 2001 From: Jin Zhaonian <86561727+glimmertouch@users.noreply.github.com> Date: Tue, 26 May 2026 21:58:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E4=BC=98=E5=85=88=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=20api2=20=E5=86=8D=E4=BD=BF=E7=94=A8=E7=BC=93=E5=AD=98=20(#168?= =?UTF-8?q?73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Services/Web/MaaApiService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/Services/Web/MaaApiService.cs b/src/MaaWpfGui/Services/Web/MaaApiService.cs index 9dcabe018f..9b2677b82d 100644 --- a/src/MaaWpfGui/Services/Web/MaaApiService.cs +++ b/src/MaaWpfGui/Services/Web/MaaApiService.cs @@ -33,7 +33,8 @@ public class MaaApiService : IMaaApiService private async Task<(bool Cached, JObject? Response)> RequestWithFallback(string api, string primaryBaseUrl, string? fallbackBaseUrl = null, bool allowFallbackToCache = true) { - var result = await TryRequest(api, primaryBaseUrl, allowFallbackToCache); + // 没有备用地址才会直接使用缓存 + var result = await TryRequest(api, primaryBaseUrl, string.IsNullOrEmpty(fallbackBaseUrl) && allowFallbackToCache); if (result.Response != null || string.IsNullOrEmpty(fallbackBaseUrl)) { return result;