diff --git a/src/api/file-api.js b/src/api/file-api.js index 4e62db8..ab2cb43 100644 --- a/src/api/file-api.js +++ b/src/api/file-api.js @@ -191,6 +191,14 @@ export default { params }) }, + // 挂载文件夹 + mountFolder: function(data) { + return request({ + url: '/share/mount-folder', + method: 'put', + data: data + }) + }, // 验证提取码 validShareCode: function(data) { return request({ diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index cc5b781..8021c17 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2675,7 +2675,7 @@ export default { .searchFileAndOpenDir({ userId: this.$store.state.user.userId, username: this.$store.getters.name, - id: row.id, + id: row.mountFileId || row.id, currentDirectory: encodeURI(this.$route.query.path), pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize diff --git a/src/views/public/share/shareList.vue b/src/views/public/share/shareList.vue index c420454..470eb5f 100644 --- a/src/views/public/share/shareList.vue +++ b/src/views/public/share/shareList.vue @@ -9,7 +9,7 @@ {{ netdiskName }} -
+
{{ loginTitle }} {{ sharer.showName }}的分享 @@ -41,7 +41,7 @@ @@ -979,6 +979,18 @@ export default { this.$router.push({path: '/login', query: {redirect: this.$route.fullPath}}) } }, + /** + * 挂载操作 + */ + mountFolder() { + api.mountFolder({ + userId: this.$store.getters.userId, + shareId: this.shareId, + fileId: this.selectTreeNode.id + }).then(() => { + this.$message.success("挂载成功") + }) + }, fileTreeAndNewFolder() { this.$refs.fileTreeMount.fileTreeAndNewFolder(this.selectTreeNode) },