iberichman

失败的原因是没将回调方法encode转换

/**
* URL编码(utf-8)
*
* @param source
* @return
*/
public static String urlEncodeUTF8(String source) {
String result = source;
try {
result = java.net.URLEncoder.encode(source, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return result;
}

 

String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid
+ "&redirect_uri="+urlEncodeUTF8(wx_ip)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";

 

分类:

技术点:

相关文章:

  • 2021-05-01
  • 2022-01-03
  • 2021-12-04
  • 2022-01-07
  • 2021-09-06
  • 2021-12-12
  • 2021-11-29
  • 2021-12-27
猜你喜欢
  • 2021-12-31
  • 2021-10-26
  • 2021-12-04
  • 2021-12-14
  • 2021-04-03
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案