From 0708f6f1c83cd459a64a31fc10cb5e9538f51612 Mon Sep 17 00:00:00 2001 From: luqingjie <544309509@qq.com> Date: Tue, 20 Oct 2026 21:25:30 -0400 Subject: [PATCH] =?UTF-8?q?google=E8=AE=A4=E8=AF=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/system/GoogleOauthController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GoogleOauthController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GoogleOauthController.java index 8c81026..8c67427 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GoogleOauthController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/GoogleOauthController.java @@ -41,7 +41,10 @@ public class GoogleOauthController { /** 已登录用户发起绑定,绑定目标用户ID从当前JWT读取。 */ @GetMapping("/bind-url") public AjaxResult bindUrl() { - return AjaxResult.success(googleOauthService.buildAuthorizationUrl("BIND", SecurityUtils.getUserId())); + // 显式使用消息和数据两个参数,避免匹配 success(String) 重载将授权地址写入 msg。 + // 登录页和个人中心均从 data 读取此地址,并跳转至 Google 官方授权页面。 + return AjaxResult.success("操作成功", + googleOauthService.buildAuthorizationUrl("BIND", SecurityUtils.getUserId())); } /** Google控制台登记的固定回调地址。 */