|
|
|
@ -6,7 +6,7 @@ |
|
|
|
|
<div class="header-right"> |
|
|
|
|
<div class="header-user-con"> |
|
|
|
|
<div class="user" @click="toPerson"> |
|
|
|
|
<el-avatar :size="40" :src="avatar"></el-avatar> |
|
|
|
|
<el-avatar :size="40" :src="$store.state.avatar"></el-avatar> |
|
|
|
|
<span class="user-avator">{{userName}}</span> |
|
|
|
|
</div> |
|
|
|
|
<el-divider class="ml20" direction="vertical"></el-divider> |
|
|
|
@ -19,7 +19,6 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png', |
|
|
|
|
userName: '' |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -30,7 +29,7 @@ export default { |
|
|
|
|
getUserInfo(){ |
|
|
|
|
this.$get(this.api.queryUserInfoDetails).then(res => { |
|
|
|
|
let userInfo = res.result.hrUserInfo |
|
|
|
|
if(userInfo.userAvatars) this.avatar = userInfo.userAvatars |
|
|
|
|
if(userInfo.userAvatars) this.$store.commit('userAvatar',{avatar: userInfo.userAvatars}) |
|
|
|
|
this.userName = userInfo.userName |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}, |
|
|
|
|