|
|
@@ -140,14 +140,14 @@ public class WxUserController {
|
|
|
param.put("access_token",token);
|
|
|
param.put("lang","zh_CN");
|
|
|
HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/sns/userinfo", param, true);
|
|
|
- //HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/user/info", param, false);
|
|
|
+ //HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/user/info", param, true);
|
|
|
String body = res.body();
|
|
|
- System.err.println("res======"+res);
|
|
|
- System.err.println("body======"+body);
|
|
|
+ //System.err.println("res======"+res);
|
|
|
+ //System.err.println("body======"+body);
|
|
|
String headimgurl = JSON.parseObject(body).getString("headimgurl");
|
|
|
String encode =null;
|
|
|
try {
|
|
|
- encode = URLEncoder.encode(headimgurl, "ISO-8859-1");
|
|
|
+ encode = URLEncoder.encode(headimgurl.toString(), "ISO-8859-1");
|
|
|
System.err.println("headimgurl======"+headimgurl);
|
|
|
System.err.println("encode======"+encode);
|
|
|
} catch (UnsupportedEncodingException e) {
|