|
|
@@ -13,6 +13,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpResource;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -208,7 +209,10 @@ public class AuthController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/loginByPhoneCodeAndLoginCode")
|
|
|
- public R<LoginVo> registerByPhonecode(@RequestParam String logincode,@RequestParam String phonecode) throws WxErrorException {
|
|
|
+ public R<LoginVo> registerByPhonecode(@RequestBody String loginbody) throws WxErrorException {
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(loginbody);
|
|
|
+ String logincode = jsonObject.getStr("logincode");
|
|
|
+ String phonecode = jsonObject.getStr("phonecode");
|
|
|
|
|
|
AuthRequest authRequest = SocialUtils.getAuthRequest("wechat_mini_program", socialProperties);
|
|
|
AuthResponse<AuthUser> response = authRequest.login(AuthCallback.builder().code(logincode).build());
|
|
|
@@ -249,7 +253,7 @@ public class AuthController {
|
|
|
sysSocialService.updateByBo(bo);
|
|
|
}
|
|
|
|
|
|
- SysClient client = clientService.queryByClientId("39769a71109d3579c97f2e007f8afdaf");
|
|
|
+ SysClient client = clientService.queryByClientId("e5cd7e4891bf95d1d19206ce24a7b32e");
|
|
|
LoginUser loginUser = loginService.buildLoginUser(userVo);
|
|
|
loginUser.setClientKey(client.getClientKey());
|
|
|
loginUser.setDeviceType(client.getDeviceType());
|