perf: 优化单个文件的分享连接
This commit is contained in:
parent
7b7dd390ef
commit
7c96c746ee
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="share-header-content sharer">
|
<div class="share-header-content sharer">
|
||||||
<span><span class="user">{{sharer.showName}}</span>的分享</span>
|
<span><span class="user">{{sharer.showName}}</span>的分享</span>
|
||||||
<el-avatar :src="sharer.avatar"></el-avatar>
|
<el-avatar :src="sharerAvatarUrl"></el-avatar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-divider class="header-location"></el-divider>
|
<el-divider class="header-location"></el-divider>
|
||||||
@ -363,6 +363,7 @@
|
|||||||
showUpdateDateItem: this.$pc,// 列表模式下是否显示修改时间
|
showUpdateDateItem: this.$pc,// 列表模式下是否显示修改时间
|
||||||
showSizeItem: this.$pc,// 列表模式下是否显示文件大小
|
showSizeItem: this.$pc,// 列表模式下是否显示文件大小
|
||||||
sharer: {},//分享者信息
|
sharer: {},//分享者信息
|
||||||
|
sharerAvatarUrl: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -561,6 +562,7 @@
|
|||||||
if(this.fileList.length > 0) {
|
if(this.fileList.length > 0) {
|
||||||
api.getSharer({userId: this.fileList[0].userId}).then(res => {
|
api.getSharer({userId: this.fileList[0].userId}).then(res => {
|
||||||
this.sharer = res.data
|
this.sharer = res.data
|
||||||
|
this.sharerAvatarUrl = this.imageUrl + res.data.avatar
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.loadClientHeight()
|
this.loadClientHeight()
|
||||||
@ -868,7 +870,11 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(copy){
|
if(copy){
|
||||||
this.copyDownloadLink(fileConfig.publicDownloadUrl( this.shareId, this.rowContextData))
|
if (this.rowContextData.isShare) {
|
||||||
|
this.copyDownloadLink(window.location.origin + fileConfig.previewUrl(this.sharer.username, this.rowContextData))
|
||||||
|
} else {
|
||||||
|
this.copyDownloadLink(fileConfig.publicPackageDownloadUrl(this.shareId, fileIds))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fileConfig.publicDownload( this.shareId, this.rowContextData)
|
fileConfig.publicDownload( this.shareId, this.rowContextData)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user