From fb3b3e41804abeeb4a54d9df3030bc3cdb75c245 Mon Sep 17 00:00:00 2001 From: 吴健 <14790700720@163.com> Date: 星期三, 27 十一月 2024 10:21:02 +0800 Subject: [PATCH] add 工艺配方 --- 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 42acd00..bb85ce1 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.data); + const isBlob = blobValidate(res.index); if (isBlob) { - const blob = new Blob([res.data]) + const blob = new Blob([res.index]) this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { - this.printErrMsg(res.data); + this.printErrMsg(res.index); } }) }, @@ -34,12 +34,12 @@ responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { - const isBlob = blobValidate(res.data); + const isBlob = blobValidate(res.index); if (isBlob) { - const blob = new Blob([res.data]) + const blob = new Blob([res.index]) this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { - this.printErrMsg(res.data); + this.printErrMsg(res.index); } }) }, @@ -52,12 +52,12 @@ responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { - const isBlob = blobValidate(res.data); + const isBlob = blobValidate(res.index); if (isBlob) { - const blob = new Blob([res.data], { type: 'application/zip' }) + const blob = new Blob([res.index], { type: 'application/zip' }) this.saveAs(blob, name) } else { - this.printErrMsg(res.data); + this.printErrMsg(res.index); } downloadLoadingInstance.close(); }).catch((r) => { -- Gitblit v1.9.3