|
|
|
@ -128,7 +128,7 @@ public class UserLoginController implements UserLoginControllerApi { |
|
|
|
|
//生成jwt
|
|
|
|
|
String token = JwtUtils.createJWT(user.getId()+"","token", times); |
|
|
|
|
// state 当前用户的页面地址,需要拼接 http:// 这样才不会站内跳转
|
|
|
|
|
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token); |
|
|
|
|
response.sendRedirect("http://www.huorantech.cn/dq/index.html#/Dashboard?token="+token+"&account="+user.getAccount()); |
|
|
|
|
//response.sendRedirect(state+"?token="+token+"&head_img="+user.getHeadImg()+"&name="+URLEncoder.encode(user.getName(),"UTF-8"));
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -141,7 +141,15 @@ public class UserLoginController implements UserLoginControllerApi { |
|
|
|
|
@PostMapping("/bindPhoneAndOpenId") |
|
|
|
|
public ResponseResult bindPhoneAndOpenId(@RequestBody @Valid BindOpenIdRequest bindOpenIdRequest){ |
|
|
|
|
boolean result = userLoginService.bindPhoneAndOpenId(bindOpenIdRequest); |
|
|
|
|
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL(); |
|
|
|
|
LoginRequest loginRequest = new LoginRequest(); |
|
|
|
|
if(result){ |
|
|
|
|
//绑定手机号成功调登录接口需要的参数
|
|
|
|
|
loginRequest.setWechatId(bindOpenIdRequest.getWechatId()); |
|
|
|
|
loginRequest.setTenDayEffective(2); |
|
|
|
|
loginRequest.setType(2); |
|
|
|
|
loginRequest.setPhone(bindOpenIdRequest.getPhoneAccount()); |
|
|
|
|
} |
|
|
|
|
return result ? ResponseResult.SUCCESS(loginRequest) : ResponseResult.FAIL(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|