微信获取小程序码–带参数-乱码解决`
1.引入 import org.apache.commons.codec.binary.Base64;
public String genQrCode(String accessToken, String path, String scene) {
String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken;
JSONObject paramJson = new JSONObject();
paramJson.put("page", path); // 参数叫page 不是path
paramJson.put("scene", scene);// 这个是你写了什么,小程序就收到什么,
//返回值不能使用String接受
CloseableHttpClient httpClient = null;
CloseableHttpResponse httpResponse = null;
//创建httpClient连接对象
httpClient = HttpClients.