登录 绑定手机号

This commit is contained in:
nyoung 2024-09-23 21:16:15 +08:00
parent e3801e9595
commit 1be40d9bb6
2 changed files with 12 additions and 3 deletions

View File

@ -212,11 +212,19 @@ public class SysLoginController {
AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO(); AuthLoginReqVO authLoginReqVO = new AuthLoginReqVO();
authLoginReqVO.setUsername(loginBody.getUsername()); authLoginReqVO.setUsername(loginBody.getUsername());
authLoginReqVO.setPassword(loginBody.getPassword()); authLoginReqVO.setPassword(loginBody.getPassword());
AuthLoginRespVO login = loginService.login(authLoginReqVO);
Map<String,Object> 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())){ if(org.apache.commons.lang3.StringUtils.isEmpty(user.getMobile())){
// 借用此字段设置需要填写手机号标志 为1时弹出验证手机号页面 map.put("needMobile","1");
authLoginReqVO.setSocialState("1"); }else{
map.put("needMobile","0");
} }
return success(loginService.login(authLoginReqVO)); return success(map);
} }
/** /**

View File

@ -228,6 +228,7 @@ yudao:
- /admin-api/rescue/wxLoginJc - /admin-api/rescue/wxLoginJc
- /admin-api/rescue/loginJcApp - /admin-api/rescue/loginJcApp
- /admin-api/system/tenant/getListByWebsite - /admin-api/system/tenant/getListByWebsite
- /admin-api/rescue/loginQx
websocket: websocket:
enable: true # websocket的开关 enable: true # websocket的开关
path: /infra/ws # 路径 path: /infra/ws # 路径