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);
      });

Logo

前往低代码交流专区

更多推荐