diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 6793a70..bd6f5d0 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2431,7 +2431,7 @@ export default { keywordQuery = '' searchOpenFolder = '' } - this.$router.push(`?vmode=${this.vmode}&path=${encodeURIComponent(this.path).replaceAll('#', '%23')}${queryFolder ? '&folder=' + queryFolder : ''}${queryTagId}${basePath}${keywordQuery}${searchOpenFolder}`) + this.$router.push(`?vmode=${this.vmode}&path=${encodeURIComponent(this.path)}${queryFolder ? '&folder=' + queryFolder : ''}${queryTagId}${basePath}${keywordQuery}${searchOpenFolder}`) } if (!unRefresh) { this.pagination.pageIndex = 1 @@ -4423,7 +4423,7 @@ export default { this.path = this.path.replace(/\/\//g, '/') // 去掉this.path开头的this.basePath this.path = this.path.replace(this.basePath, '/') - const path = encodeURIComponent(this.path).replaceAll('#', '%23') + const path = encodeURIComponent(this.path) const item = { folder: row.name, shareBase: row.shareBase } this.pathList.push(item) this.pagination.pageIndex = 1 diff --git a/src/utils/file-config.js b/src/utils/file-config.js index 3853745..db5db56 100644 --- a/src/utils/file-config.js +++ b/src/utils/file-config.js @@ -37,7 +37,6 @@ export default { previewUrl: function(username, file, token, shareToken, serverUrl) { let baseUrl = serverUrl || this.baseUrl let fileUrl = `${baseUrl}/file/${store.getters.name}${encodeURIComponent(file.path)}${encodeURIComponent(file.name)}` - fileUrl = fileUrl.replaceAll('#', '%23') fileUrl = fileUrl.replaceAll(/%5C/g, '/') if (file.userId !== store.getters.userId && token && !shareToken) {