已知下载地址DownUrl
await fetch(DownUrl)
.then((response) => response.blob())
.then((res) => {
let blob = new Blob([res],{type: 'application/pdf'});
// pdfurl即转化后的结果
let pdfurl = window.URL.createObjectURL(blob);
// 新标签页打开,即可预览并下载
window.open(pdfurl);
})