个人中心跳转修复

This commit is contained in:
617594538@qq.com 2020-06-08 15:03:58 +08:00
parent 894225cfda
commit 199286ab2e
2 changed files with 8 additions and 7 deletions

View File

@ -34,7 +34,7 @@
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
<router-view ref="child"></router-view>
</el-main>
</el-container>
</el-container>
@ -80,9 +80,9 @@
})
},
goPersonalInfo(userId) {
this.$router.push({name: 'personalinfo'});
sessionStorage.setItem("userId",userId);
setTimeout(()=>{location.reload()},500)
this.$refs.child.getUserInfo();
this.$router.push({name: 'personalinfo'});
},
goMore() {
this.$message({

View File

@ -197,7 +197,10 @@
}
},
mounted() {
// setInterval(()=>{
this.getUserInfo();
},
methods: {
getUserInfo() {
let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
if (userInfo.user_id === sessionStorage.getItem("userId")) {
this.isOwn = true
@ -218,9 +221,7 @@
user_id: r.personalInfo.user_id,
}
})
// },1000)
},
methods: {
deleteLetter(id,type) {
this.$confirm('删除该私信?, 是否继续?', '删除', {
confirmButtonText: '确定',