Browse Source

修改头像报错后不能进行切换其他菜单

master
liaoxinyu 1 year ago
parent
commit
552658b844
  1. 3
      src/components/main/main.vue
  2. 3
      src/view/single-page/own/own.vue

3
src/components/main/main.vue

@ -76,7 +76,8 @@ export default {
if (JSON.stringify(this.$store.state.user.userInfo) !== '{}') { if (JSON.stringify(this.$store.state.user.userInfo) !== '{}') {
let userData = {} let userData = {}
if (this.$store.state.user.userInfo.hasOwnProperty('user_data') && !this.$store.state.user.userInfo.hasOwnProperty('userData')) { if (this.$store.state.user.userInfo.hasOwnProperty('user_data') && !this.$store.state.user.userInfo.hasOwnProperty('userData')) {
userData = this.$store.state.user.userInfo.user_data // userData = this.$store.state.user.userInfo.user_data
userData = this.$store.state.user.userInfo.userData
} else { } else {
userData = this.$store.state.user.userInfo.userData userData = this.$store.state.user.userInfo.userData
} }

3
src/view/single-page/own/own.vue

@ -179,7 +179,8 @@ export default {
this.username = userInfo.username this.username = userInfo.username
this.formItem.nickname = userInfo.nickname this.formItem.nickname = userInfo.nickname
if (userInfo.hasOwnProperty('userData') && !userInfo.hasOwnProperty('user_data')) { if (userInfo.hasOwnProperty('userData') && !userInfo.hasOwnProperty('user_data')) {
userInfo.userData = userInfo.user_data // userInfo.userData = userInfo.user_data
userInfo.userData = userInfo.userData
} }
this.formItem.head_img = userInfo.userData.head_img this.formItem.head_img = userInfo.userData.head_img
}, },

Loading…
Cancel
Save