From 2e82d4b3bc242072f2acc4f50a1b3ba4d03575ef Mon Sep 17 00:00:00 2001 From: jmal Date: Fri, 14 Apr 2023 21:53:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/public/share/shareList.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/public/share/shareList.vue b/src/views/public/share/shareList.vue index a8ee97c..1cc7c7d 100644 --- a/src/views/public/share/shareList.vue +++ b/src/views/public/share/shareList.vue @@ -9,7 +9,7 @@ {{ netdiskName }} -
+ @@ -670,14 +670,16 @@ export default { 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) { - this.netdiskName = this.sharer.netdiskName + if (res.data) { + this.sharerAvatarUrl = window.location.origin + this.imageUrl + res.data.avatar + if (this.sharer.netdiskName) { + this.netdiskName = this.sharer.netdiskName + } + if (this.sharer.netdiskLogo) { + this.netdiskLogo = this.sharer.netdiskLogo + } + this.$store.dispatch('user/setLogo', {netdiskName: this.netdiskName, netdiskLogo: this.netdiskLogo}) } - if (this.sharer.netdiskLogo) { - this.netdiskLogo = this.sharer.netdiskLogo - } - this.$store.dispatch('user/setLogo', {netdiskName: this.netdiskName, netdiskLogo: this.netdiskLogo}) }) }, currentChange(pageIndex) {