From 4084a5870a05fbd49b8a3c704e5b0dfcfe897736 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 15 Jul 2021 16:34:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header.vue | 5 ++--- src/views/setting/Person.vue | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index f738f53..2ebf747 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -6,7 +6,7 @@
- + {{userName}}
@@ -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 => {}) }, diff --git a/src/views/setting/Person.vue b/src/views/setting/Person.vue index d1dcb6e..4397c04 100644 --- a/src/views/setting/Person.vue +++ b/src/views/setting/Person.vue @@ -567,7 +567,7 @@ export default { //取得头像地址 getRes(res) { this.avatar = res.message - this.$store.commit('userPhoto',{avatar:res.message}) + this.$store.commit('userAvatar',{avatar:res.message}) }, getdata() { this.$get(this.api.queryUserInfoDetails).then(res => {