// 微信小程序ID
String appid = "";
// 微信小程序秘钥
String secret = "";
// 根据小程序穿过来的code想这个url发送请求
String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + appid + "&secret=" + secret + "&js_code=" + code + "&grant_type=authorization_code";
// 发送请求,返回Json字符串
String str = WxmpUtil.httpRequest(url, "GET", null);
f返回 JSON字符串为""