From 550a519973fc7ecf377d19227c5bb7b5cd785497 Mon Sep 17 00:00:00 2001 From: jmal Date: Sun, 13 Aug 2023 18:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8C=82=E8=BD=BD=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/file-config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/file-config.js b/src/utils/file-config.js index 4b40280..781b857 100644 --- a/src/utils/file-config.js +++ b/src/utils/file-config.js @@ -21,9 +21,11 @@ export default { }, // 预览文件的url previewUrl: function(username, file, token, shareToken) { - let owner = username - if (username !== store.getters.username) { + let owner + if (username !== store.getters.name) { owner = localStorage.getItem('mountFileOwner') + } else { + owner = username } let fileUrl = `${this.baseUrl}/file/${owner}${encodeURI(file.path)}${encodeURI(file.name)}` fileUrl = fileUrl.replace(/%5C/g, '/')