添加微信接口二进制转base64

master
吴顺杰 2 years ago
parent 0d689924dd
commit 7dcd519017

@ -156,11 +156,8 @@ public class WeChatServiceImpl implements WeChatService {
}
map.put("path", req.getPath() + "?shanghuId=" + req.getShanghuId());
String jsonStr = JSONUtil.toJsonStr(map);
byte[] qrCode = HttpRequest.post("https://api.weixin.qq.com/wxa/getwxacode?access_token=" + accessToken)
return HttpRequest.post("https://api.weixin.qq.com/wxa/getwxacode?access_token=" + accessToken)
.body(jsonStr)
.execute().bodyBytes();
String filePath = "../classes/data/uploads/"+"vx图片"+".jpg";
File file = FileUtil.writeBytes(qrCode, filePath);
return qrCode;
}
}

Loading…
Cancel
Save