fix: 修复切换项目后路由跳转问题
This commit is contained in:
parent
a73b202551
commit
0b38df4576
|
@ -98,13 +98,10 @@ export default {
|
|||
}
|
||||
this.$post("/user/update/current", {id: this.userId, lastProjectId: projectId}, () => {
|
||||
localStorage.setItem(PROJECT_ID, projectId);
|
||||
if (this.$route.path.indexOf('/track/review/view/') >= 0) {
|
||||
this.$router.replace('/track/review/all');
|
||||
} else if (this.$route.path.indexOf('/track/plan/view/') >= 0) {
|
||||
this.$router.replace('/track/plan/all');
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
let path = this.$route.matched[0].path ? this.$route.matched[0].path : '/';
|
||||
this.$router.push(path).then(() => {
|
||||
window.location.reload()
|
||||
}).catch(err => err);
|
||||
this.changeProjectName(projectId);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue