diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java index c2d1bcd2..1436cc9c 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/controller/UserLoginController.java @@ -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(); } /** diff --git a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties index 1ab68e8e..a2d45a96 100644 --- a/dq-financial-hrms-auth/src/main/resources/bootstrap.properties +++ b/dq-financial-hrms-auth/src/main/resources/bootstrap.properties @@ -27,11 +27,6 @@ #spring.redis.jedis.pool.max-idle=8 #spring.redis.jedis.pool.min-idle=0 -##微信开放平台配置 -#wxopen.appid=wx3b7bca679da34921 -#wxopen.appsecret=c8de113c18052b4e2173d913511e486d -##回调地址 -#wxopen.redirect_url=http://www.occupationlab.com/apiHrmsAuth/hrms/auth/userlogin/user/callback # ##正式环境(prod) spring.application.name=dq-financial-hrms-auth