post请求的接口参数返回格式blob,以此导出excel表格
1.下面是封装的请求方式
2
onExport(){
orderModel.printOrderExcel(this.params, localStorage.token, (res) => {
console.log(res)
let blob = new Blob([res.data], { type: ‘application/vnd.ms-excel’ })
let objectUrl = URL.createObjectURL(blob)
window.location.href = obj
原创
2020-12-09 12:21:12 ·
1023 阅读 ·
0 评论