根据后端返回的流转为url

38 阅读1分钟
   let pic = "";  let bytes = window.atob(file);  let buffer = new ArrayBuffer(bytes.length);  let unit = new Uint8Array(buffer);  for (let i = 0; i < bytes.length; i++) {    unit[i] = bytes.charCodeAt(i);  }  let blob = new Blob([buffer], {type});  pic = window.URL.createObjectURL(blob);