api获取
//获取列表二维码
export const erweima = prarms => {
return request({
url: `/cemetery/getQRCodeById`,
method: "get",
data: prarms,
responseType: "blob"
});
};
前端获取并赋值给img的src
erweima({ id: id }).then((res) => {
// console.log('二维码文件流', res);
const myBlob = new window.Blob([res], { type: 'image/jpeg' })
const qrUrl = window.URL.createObjectURL(myBlob)
this.erweimaImg = qrUrl;
// console.log(myBlob, qrUrl);
});