axios异步获取流程图片流文件进行图片
var _this = this
var url = _this.host
axios({
method: 'GET',
url: url,
headers: {
auth: _this.auth
},
responseType: 'arraybuffer'
})
.then((response) => {
return (
'data:image/png;base64,' +
btoa(
new Uint8Array(response.data).reduce(
(data, byte) => data + String.fromCharCode(byte),
''
)
)
)
})
.then((response) => {
this.src = response
})
.catch(function (error) {})

浙公网安备 33010602011771号