简述
问题
重点
//预览流
export const wsPreview = (data) => {
return axios({
url: `/t/mailInfo/liuText?guid=${data}`,
method: 'post',
responseType: 'blob',
headers: {
"Content-Type": "application/pdf",
},
})
}
//预览附件
async preview(item) {
let res = await this.$api.mail.wsPreview(item.id);
var href = window.URL.createObjectURL(res);
window.open(
"../../static/web/viewer.html?file=" + encodeURIComponent(href)
);
},