diff --git a/src/components/ShareDialog/index.vue b/src/components/ShareDialog/index.vue index 07e041e..3507549 100644 --- a/src/components/ShareDialog/index.vue +++ b/src/components/ShareDialog/index.vue @@ -163,10 +163,6 @@ export default { } }, watch: { - file(file) { - if (file.fileId) { - } - }, status(visible) { if(visible){ this.shareDialogVisible = true diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 117ec95..383d6a7 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2921,7 +2921,6 @@ export default { this.shareDialogVisible = true }, shareSuccess(shareBase) { - console.log('shareSuccess', shareBase) // 这3行代码是为了让vue刷新数据 const isFavorite = this.rowContextData.isFavorite this.rowContextData.isFavorite = !isFavorite diff --git a/src/views/public/share/shareList.vue b/src/views/public/share/shareList.vue index 7e2542d..e7c0bdb 100644 --- a/src/views/public/share/shareList.vue +++ b/src/views/public/share/shareList.vue @@ -235,6 +235,9 @@ 查看文件 +
+ {{shareData.expireDate ? "到期时间:" + shareData.expireDate : "永久有效"}} +
-  {{ summaries }} { @@ -612,22 +615,14 @@ export default { if (Object.getPrototypeOf(res.data) === String.prototype) { this.prompt = '该链接已失效' } else { - let userId = null if (res.data.isPrivacy) { this.showShareCode = true - userId = res.data.userId this.shareData = res.data } else { this.fileList = res.data this.fileList.map((item, index) => { item.index = index }) - if (this.fileList.length > 0) { - userId = this.fileList[0].userId - } - } - if (userId !== null) { - this.getSharer(userId) } if (this.fileList.length > 0 && !this.fileList[0].isPrivacy) { store.dispatch('user/resetShareToken').then(() => { @@ -672,8 +667,8 @@ export default { } }) }, - getSharer(userId) { - api.getSharer({userId: userId}).then(res => { + getSharer() { + api.getSharer({shareId: this.shareId}).then(res => { this.sharer = res.data this.sharerAvatarUrl = window.location.origin + this.imageUrl + res.data.avatar if (this.sharer.netdiskName) { @@ -989,7 +984,6 @@ export default { this.$message({message: '该浏览器不支持自动复制', type: 'warning', duration: 1000}); clipboard.destroy() }) - console.log('url', url) }, // 点击文件或文件夹 fileClick(row) { @@ -1079,6 +1073,10 @@ export default { } .share-header { + text-align: center; + font-size: 18px; + font-weight: 500; + margin-top: 20px; height: 45px; .logo { @@ -1172,7 +1170,17 @@ export default { .share-code { > > > .el-input { width: 200px; + ::placeholder { + text-align: center; + } + input:-moz-placeholder { + text-align: center; + } + input::-webkit-input-placeholder { + text-align: center; + } } + } .share-code-valid { @@ -1183,5 +1191,11 @@ export default { } } +.share-expire-date { + color: #25262b5c; + font-size: 12px; + margin-top: 10px; +} +