Browse Source

修改个人信息后需要刷新页面才生效的问题

feature
mk 1 year ago
parent
commit
edd85e6653
  1. 2
      src/views/communityPublicity/index.vue
  2. 6
      src/views/mine/index.vue
  3. 8
      src/views/userInfo/index.vue

2
src/views/communityPublicity/index.vue

@ -123,9 +123,9 @@ export default {
return chineseCharsAndPunctuation ? chineseCharsAndPunctuation.join('') : ''; return chineseCharsAndPunctuation ? chineseCharsAndPunctuation.join('') : '';
}, },
handelChangeTags(val, title) { handelChangeTags(val, title) {
this.PublicityList = [];
if (val !== 0) { if (val !== 0) {
this.tagId = this.tagList[val].id; this.tagId = this.tagList[val].id;
this.PublicityList = [];
} else { } else {
this.tagId = ''; this.tagId = '';
} }

6
src/views/mine/index.vue

@ -71,7 +71,11 @@ export default {
}, },
mounted() { mounted() {
this.userInfo = this.$store.state.app.userInfo this.$nextTick(()=>{
setTimeout(()=>{
this.userInfo = this.$store.state.app.userInfo;
},500)
})
}, },
methods: { methods: {
handleNumber(value){ handleNumber(value){

8
src/views/userInfo/index.vue

@ -262,9 +262,11 @@ export default {
this.$router.back() this.$router.back()
}) })
} else { } else {
editUser(params).then(() => { editUser(params).then((res) => {
this.$toast.success('修改成功') this.$toast.success('修改成功');
this.$router.back() this.$store.dispatch('getUserInfo').then(()=>{
this.$router.push('/mine')
})
}) })
} }
}, },

Loading…
Cancel
Save