fix(api): 修复二维码登录接口图片字节读取错误
- 将获取响应体字节的方法由bytes()改为bodyBytes() - 修正了二维码图片内容的读取问题 - 增加接口调用的稳定性和正确性
This commit is contained in:
@@ -153,7 +153,7 @@ public class QrLoginServiceImpl implements QrLoginService {
|
|||||||
byte[] imageBytes = HttpRequest.post(apiUrl)
|
byte[] imageBytes = HttpRequest.post(apiUrl)
|
||||||
.body(JSON.toJSONString(params))
|
.body(JSON.toJSONString(params))
|
||||||
.timeout(15000)
|
.timeout(15000)
|
||||||
.execute().bytes();
|
.execute().bodyBytes();
|
||||||
|
|
||||||
// 判断是否返回图片(二进制)或错误(JSON)
|
// 判断是否返回图片(二进制)或错误(JSON)
|
||||||
if (imageBytes == null || imageBytes.length == 0) {
|
if (imageBytes == null || imageBytes.length == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user