From 7d874e31cfa42163fe448a6d742a805492359fc1 Mon Sep 17 00:00:00 2001 From: Zeno <15270656234@163.com> Date: Mon, 28 Nov 2022 10:29:38 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-ui/src/plugins/download.js.=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E5=90=8D=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=EF=BC=88+=E3=80=81-?= =?UTF-8?q?=E3=80=81*...=EF=BC=89=E7=9A=84=E6=96=87=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zeno <15270656234@163.com> --- ruoyi-ui/src/plugins/download.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/plugins/download.js b/ruoyi-ui/src/plugins/download.js index 86e2031..a3bb8c4 100644 --- a/ruoyi-ui/src/plugins/download.js +++ b/ruoyi-ui/src/plugins/download.js @@ -9,7 +9,7 @@ const baseURL = process.env.VUE_APP_BASE_API export default { name(name, isDelete = true) { - var url = baseURL + "/common/download?fileName=" + encodeURI(name) + "&delete=" + isDelete + var url = baseURL + "/common/download?fileName=" + encodeURIComponent(name) + "&delete=" + isDelete axios({ method: 'get', url: url, @@ -19,14 +19,14 @@ export default { const isLogin = await blobValidate(res.data); if (isLogin) { const blob = new Blob([res.data]) - this.saveAs(blob, decodeURI(res.headers['download-filename'])) + this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { this.printErrMsg(res.data); } }) }, resource(resource) { - var url = baseURL + "/common/download/resource?resource=" + encodeURI(resource); + var url = baseURL + "/common/download/resource?resource=" + encodeURIComponent(resource); axios({ method: 'get', url: url, @@ -36,7 +36,7 @@ export default { const isLogin = await blobValidate(res.data); if (isLogin) { const blob = new Blob([res.data]) - this.saveAs(blob, decodeURI(res.headers['download-filename'])) + this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { this.printErrMsg(res.data); }