获取不限制的小程序码?
POST https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN
调用这个接口返回的转化为图片打不开
String token = getAccessToken();
String url = String.format(wechatConfig.getUnlimitedQRCodeURL(), token);
String str = HttpClientUtil.post(url, json);
String filename ="C:/Users/86156/Downloads/" +"微信小程序二维码" + System.currentTimeMillis() + ".png";
// InputStream inputStream = new ByteArrayInputStream(str.getBytes());
File file = new File(filename);
PrintWriter writer = new PrintWriter(file);
writer.println(str);
writer.close();
OssResMessage ossResMessage = ossSdkUtil.uploadFile(inputStream, filename);
log.info("微信二维码上传oss:{}", ossResMessage);
return ossResMessage.getPublicCdnHttp();