fix: bugs

This commit is contained in:
qier222 2021-04-12 14:12:15 +08:00
parent 872fd73b05
commit 4f4f2b09e3
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
9 changed files with 85 additions and 29 deletions

View file

@ -124,8 +124,8 @@ export default {
return isLooseLoggedIn();
},
avatarUrl() {
return this.data.user.avatarUrl
? `${this.data.user.avatarUrl}?param=512y512`
return this.data?.user?.avatarUrl && this.isLooseLoggedIn
? `${this.data?.user?.avatarUrl}?param=512y512`
: "http://s4.music.126.net/style/web2/img/default/default_avatar.jpg?param=60y60";
},
},