From 3f23422c13226ce37150afed0b4d8d0309da45d3 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期二, 25 三月 2025 19:24:40 +0800 Subject: [PATCH] 修改 --- billion-ui/src/plugins/download.js | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/billion-ui/src/plugins/download.js b/billion-ui/src/plugins/download.js index bb85ce1..42acd00 100644 --- a/billion-ui/src/plugins/download.js +++ b/billion-ui/src/plugins/download.js @@ -17,12 +17,12 @@ responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { - const isBlob = blobValidate(res.index); + const isBlob = blobValidate(res.data); if (isBlob) { - const blob = new Blob([res.index]) + const blob = new Blob([res.data]) this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { - this.printErrMsg(res.index); + this.printErrMsg(res.data); } }) }, @@ -34,12 +34,12 @@ responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { - const isBlob = blobValidate(res.index); + const isBlob = blobValidate(res.data); if (isBlob) { - const blob = new Blob([res.index]) + const blob = new Blob([res.data]) this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { - this.printErrMsg(res.index); + this.printErrMsg(res.data); } }) }, @@ -52,12 +52,12 @@ responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { - const isBlob = blobValidate(res.index); + const isBlob = blobValidate(res.data); if (isBlob) { - const blob = new Blob([res.index], { type: 'application/zip' }) + const blob = new Blob([res.data], { type: 'application/zip' }) this.saveAs(blob, name) } else { - this.printErrMsg(res.index); + this.printErrMsg(res.data); } downloadLoadingInstance.close(); }).catch((r) => { -- Gitblit v1.9.3