const res = await ToolApi.getPics(param)
this.url1 = 'data:image/png;base64,' + uni.arrayBufferToBase64(res)
request 中配置
// 获取图片
ToolApi.getPics = (data) => {
return request({
url: `xx/xx/xx`,
method: 'get',
data,
responseType: 'arraybuffer',
})
}