mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-08 09:48:26 +08:00
♻️ 去除工具类方法,使用原生方法
This commit is contained in:
parent
9d1ab36e21
commit
374b71e5fe
@ -63,7 +63,7 @@ public class AuthMiRequest extends BaseAuthRequest {
|
|||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
JSONObject userProfile = JSONObject.parseObject(userResponse.body());
|
JSONObject userProfile = JSONObject.parseObject(userResponse.body());
|
||||||
if (StrUtil.equalsIgnoreCase(userProfile.getString("result"), "error")) {
|
if ("error".equalsIgnoreCase(userProfile.getString("result"))) {
|
||||||
throw new AuthException(userProfile.getString("description"));
|
throw new AuthException(userProfile.getString("description"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ public class AuthMiRequest extends BaseAuthRequest {
|
|||||||
|
|
||||||
HttpResponse emailResponse = HttpRequest.get(emailPhoneUrl).execute();
|
HttpResponse emailResponse = HttpRequest.get(emailPhoneUrl).execute();
|
||||||
JSONObject userEmailPhone = JSONObject.parseObject(emailResponse.body());
|
JSONObject userEmailPhone = JSONObject.parseObject(emailResponse.body());
|
||||||
if (!StrUtil.equalsIgnoreCase(userEmailPhone.getString("result"), "error")) {
|
if (!"error".equalsIgnoreCase(userEmailPhone.getString("result"))) {
|
||||||
JSONObject emailPhone = userEmailPhone.getJSONObject("data");
|
JSONObject emailPhone = userEmailPhone.getJSONObject("data");
|
||||||
authUser.setEmail(emailPhone.getString("email"));
|
authUser.setEmail(emailPhone.getString("email"));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user