|
|
@@ -26,9 +26,8 @@ public class WeChatServiceImpl implements WeChatService {
|
|
|
try {
|
|
|
HttpUtil.ResponseWrap res = HttpUtil.doGet(url);
|
|
|
if (res.getContent() != null) {
|
|
|
- System.out.println(res.getContent().toString());
|
|
|
// {"access_token":"xxx","expires_in":7200,"refresh_token":"xxx","openid":"xxx","scope":"snsapi_userinfo","unionid":"xxx"}
|
|
|
- OAuthInfo oAuthInfo = JSON.parseObject(res.getContent().toString(), OAuthInfo.class);
|
|
|
+ OAuthInfo oAuthInfo = JSON.parseObject(res.getContent(), OAuthInfo.class);
|
|
|
return oAuthInfo;
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -44,8 +43,7 @@ public class WeChatServiceImpl implements WeChatService {
|
|
|
try {
|
|
|
HttpUtil.ResponseWrap res = HttpUtil.doGet(url);
|
|
|
if (res.getContent() != null) {
|
|
|
- System.out.println(res.getContent().toString());
|
|
|
- UserInfo userInfo = JSON.parseObject(res.getContent().toString(), UserInfo.class);
|
|
|
+ UserInfo userInfo = JSON.parseObject(res.getContent(), UserInfo.class);
|
|
|
return userInfo;
|
|
|
}
|
|
|
} catch (Exception e) {
|