|
@@ -2,7 +2,7 @@
|
|
|
<div class="c-panel">
|
|
|
<div class="c-panel-header">
|
|
|
<div class="avatar-wrap" @click="$showUserInfo" v-if="userInfo">
|
|
|
- <img v-if="userInfo.cover_photo" :src="`${userInfo.cover_photo}?imageview/0/w/180`" alt="">
|
|
|
+ <img v-if="userInfo.cover_photo" :src="avatarUrl" alt="">
|
|
|
<div v-else class="user-avatar"
|
|
|
:class="'avatar_bg' + userInfo.user_id % 9"
|
|
|
:data-name="userInfo.nick_name && userInfo.nick_name.slice(0,2).toUpperCase()"></div>
|
|
@@ -94,6 +94,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ avatarUrl () {
|
|
|
+ if (/^http/.test(this.userInfo.cover_photo)) return `${this.userInfo.cover_photo}?imageview/0/w/400`
|
|
|
+ else return this.userInfo.cover_photo
|
|
|
+ },
|
|
|
...mapState({
|
|
|
curSession: state => state.curSession,
|
|
|
userId: state => state.userId,
|