diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index efc2d1ca..ca0c4754 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -58,7 +58,7 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss profiles: - active: dev + active: prod # 文件上传 servlet: multipart: diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index b1256853..b9632e47 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -386,7 +386,7 @@ var table = { $.modal.loading("正在导出数据,请稍候..."); $.post(table.options.exportUrl, dataParam, function (result) { if (result.code == web_status.SUCCESS) { - window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true; } else if (result.code == web_status.WARNING) { $.modal.alertWarning(result.msg) } else { @@ -400,7 +400,7 @@ var table = { importTemplate: function () { $.get(activeWindow().table.options.importTemplateUrl, function (result) { if (result.code == web_status.SUCCESS) { - window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true; } else if (result.code == web_status.WARNING) { $.modal.alertWarning(result.msg) } else { diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/exportSelected.html b/ruoyi-admin/src/main/resources/templates/demo/table/exportSelected.html index 657bb835..ebf76cf4 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/table/exportSelected.html +++ b/ruoyi-admin/src/main/resources/templates/demo/table/exportSelected.html @@ -108,7 +108,7 @@ $.modal.confirm(tipMsg, function() { $.post(prefix + "/exportData", dataParam, function(result) { if (result.code == web_status.SUCCESS) { - window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true; } else { $.modal.alertError(result.msg); } diff --git a/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html b/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html index 41ad8528..372e6229 100644 --- a/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html +++ b/ruoyi-admin/src/main/resources/templates/manage/delivery/import.html @@ -104,7 +104,7 @@ url: prefix + "/list", $.modal.loading("正在下载,请稍候..."); $.post( prefix + "/export", {deliveryId:-1,productCode:'',serialNumber:''}, function(result) { if (result.code == web_status.SUCCESS) { - window.location.href = ctx + "common/download?fileName=" +encodeURI(result.msg) + "&delete=" + true; + window.location.href = ctx + "common/download?fileName=" +encodeURIComponent(result.msg) + "&delete=" + true; } else if (result.code == web_status.WARNING) { $.modal.alertWarning(result.msg) } else { diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html index 3771b52f..b6ae85e0 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html @@ -982,12 +982,12 @@ ${ } function downFile(filePath, fileName) { - window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName); + window.location.href = prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName); } function preview(filePath, fileName) { let iframe = window.open('', 'iframe') - let url = ctx + prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName) + let url = ctx + prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName) iframe.document.write(`