diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java index cab37536..8bbd839a 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java @@ -212,11 +212,19 @@ public class SysLoginController { AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO(); authLoginReqVO.setUsername(loginBody.getUsername()); authLoginReqVO.setPassword(loginBody.getPassword()); + + AuthLoginRespVO login = loginService.login(authLoginReqVO); + Map map = new HashMap<>(); + map.put("accessToken",login.getAccessToken()); + map.put("expiresTime",login.getExpiresTime()); + map.put("refreshToken",login.getRefreshToken()); + map.put("userId",login.getUserId()); if(org.apache.commons.lang3.StringUtils.isEmpty(user.getMobile())){ - // 借用此字段设置需要填写手机号标志 为1时弹出验证手机号页面 - authLoginReqVO.setSocialState("1"); + map.put("needMobile","1"); + }else{ + map.put("needMobile","0"); } - return success(loginService.login(authLoginReqVO)); + return success(map); } /** diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 067b502c..cee7bbe6 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -228,6 +228,7 @@ yudao: - /admin-api/rescue/wxLoginJc - /admin-api/rescue/loginJcApp - /admin-api/system/tenant/getListByWebsite + - /admin-api/rescue/loginQx websocket: enable: true # websocket的开关 path: /infra/ws # 路径