fix(download): 修复文件下载路径拼接问题
| | |
| | | }, |
| | | handleDown(row) { |
| | | downFile({ id: row.id }).then((res) => { |
| | | this.$download.saveAs(res.data.fileUrl, row.fileName) |
| | | const resourcePath = Number(res.data.type) === 1 ? "/img/" : "/word/"; |
| | | const fileUrl = this.javaApi + resourcePath + encodeURIComponent(res.data.fileUrl); |
| | | this.$download.saveAs(fileUrl, row.fileName); |
| | | }) |
| | | .catch((error) => { }); |
| | | }, |
| | |
| | | }, |
| | | handleDown(row) { |
| | | downFile({ id: row.id }).then((res) => { |
| | | this.$download.saveAs(res.data.fileUrl, row.fileName) |
| | | const resourcePath = Number(res.data.type) === 1 ? "/img/" : "/word/"; |
| | | const fileUrl = this.javaApi + resourcePath + encodeURIComponent(res.data.fileUrl); |
| | | this.$download.saveAs(fileUrl, row.fileName); |
| | | }) |
| | | .catch((error) => { }); |
| | | }, |