|
@@ -198,7 +198,7 @@ public class SysLoginController
|
|
*/
|
|
*/
|
|
@PostMapping("/login/jscode")
|
|
@PostMapping("/login/jscode")
|
|
@ApiOperation("小程序jscode登录")
|
|
@ApiOperation("小程序jscode登录")
|
|
- public Response<TokenDTO> getInfo(String jscode){
|
|
|
|
|
|
+ public Response<TokenDTO> getInfo(String jscode,String pUnionId){
|
|
String result = wxService.getWxInfo(xcxAppid, xcxAppSecret, jscode,"authorization_code");
|
|
String result = wxService.getWxInfo(xcxAppid, xcxAppSecret, jscode,"authorization_code");
|
|
JSONObject jsonString = JSONObject.parseObject(result);
|
|
JSONObject jsonString = JSONObject.parseObject(result);
|
|
WxResult wxResult = JSONObject.toJavaObject(jsonString, WxResult.class);
|
|
WxResult wxResult = JSONObject.toJavaObject(jsonString, WxResult.class);
|
|
@@ -212,6 +212,8 @@ public class SysLoginController
|
|
ServletUtils.getRequest().setAttribute("nickName",wxUserInfo.getNickname());
|
|
ServletUtils.getRequest().setAttribute("nickName",wxUserInfo.getNickname());
|
|
ServletUtils.getRequest().setAttribute("openid",wxUserInfo.getOpenid());
|
|
ServletUtils.getRequest().setAttribute("openid",wxUserInfo.getOpenid());
|
|
ServletUtils.getRequest().setAttribute("xcxOpenid",wxUserInfo.getOpenid());
|
|
ServletUtils.getRequest().setAttribute("xcxOpenid",wxUserInfo.getOpenid());
|
|
|
|
+ ServletUtils.getRequest().setAttribute("xcxOpenid",wxUserInfo.getOpenid());
|
|
|
|
+ ServletUtils.getRequest().setAttribute("pUnionId",pUnionId);
|
|
String token = loginService.login(wxUserInfo.getUnionid(),null, StudentLoginTypeEnum.AUTHORIZATION_XCX_LOGIN.getCode());
|
|
String token = loginService.login(wxUserInfo.getUnionid(),null, StudentLoginTypeEnum.AUTHORIZATION_XCX_LOGIN.getCode());
|
|
tokenDTO.setToken(token);
|
|
tokenDTO.setToken(token);
|
|
tokenDTO.setThirdResult(wxUserInfo);
|
|
tokenDTO.setThirdResult(wxUserInfo);
|