解决接收后台二进制图片乱码问题

2019-10-09  本文已影响0人  命题_1f6e
  axios({
     url : 'http//:182.12.13.587/api/get/img' + 跟后台定好参数,
     method : "post",
     responseType :"arraybuffer",
     headers :{
         "Content-Type" : "multipart/form-data;charset=UTF-8"
     }
       }).then(res=>{
           let blob = new Blob([res.data],{type:"application/vnd.ms-excel"})
           let imgUrl = URl.createobkectURl(blob)
           console.log(imgUrl)
     })
   })
上一篇 下一篇

猜你喜欢

热点阅读