|
@@ -9,7 +9,7 @@
|
|
|
<div class="modal-bd" v-if="userInfo">
|
|
|
<div class="user-top">
|
|
|
<div class="user-avatar" @click="$editUserAvatar(userInfo.cover_photo)">
|
|
|
- <img v-if="userInfo.cover_photo" :src="userInfo.cover_photo" alt="">
|
|
|
+ <img v-if="avatarUrl" :src="avatarUrl" alt="">
|
|
|
<div v-else class="user-avatar"
|
|
|
:class="'avatar_bg' + userInfo.user_id % 9"
|
|
|
:data-name="userInfo.nick_name.slice(0,2).toUpperCase()"
|
|
@@ -87,7 +87,11 @@ export default {
|
|
|
...mapState({
|
|
|
scatter: state => state.scatter,
|
|
|
userInfo: state => state.userInfo
|
|
|
- })
|
|
|
+ }),
|
|
|
+ avatarUrl () {
|
|
|
+ if (/^http/.test(this.userInfo.cover_photo)) return `${this.userInfo.cover_photo}?imageview/0/w/180`
|
|
|
+ else return this.userInfo.cover_photo
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
// 账号显示与隐藏
|