PDF 预览
return axios({
url: `${urlPath}${fileName}`,
method: "GET",
responseType: 'arraybuffer',
}).then(res => {
const binaryData = [res.data];
//获取blob链接
const pdfUrl = window.URL.createObjectURL(new Blob(binaryData, { type: 'application/pdf' }));
window.open(pdfUrl);
})
}