From 0e0629d809e634a7dead29ec76c26cd228ff46fc Mon Sep 17 00:00:00 2001 From: Trae AI Date: Sun, 21 Jun 2026 16:31:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A2=E6=88=B7=E7=AB=AF=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=8D=E5=9C=A8=E5=88=97=E8=A1=A8=E4=B8=AD=E6=97=B6?= =?UTF-8?q?=E8=A7=86=E4=B8=BA=E9=9C=80=E8=A6=81=E6=9B=B4=E6=96=B0=E8=80=8C?= =?UTF-8?q?=E9=9D=9E=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/router/app/info.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/internal/router/app/info.go b/backend/internal/router/app/info.go index 40c457d..2433e8a 100644 --- a/backend/internal/router/app/info.go +++ b/backend/internal/router/app/info.go @@ -159,10 +159,13 @@ func handleAppCheckUpdate(c *gin.Context) { } } - // 客户端版本不存在于服务器版本列表中,返回参数错误 + // 客户端版本不存在于服务器版本列表中,视为需要更新 + // 构造一个虚拟的客户端版本记录,ID为0,确保所有服务器版本都比它新 if clientVersionRecord == nil { - response.Error(c, 400, "版本号参数错误") - return + clientVersionRecord = &model.Version{ + ID: 0, + Version: clientVersion, + } } // 判断客户端版本状态:检查是否有更高ID的强制更新版本