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}, () => {
|
this.$post("/user/update/current", {id: this.userId, lastProjectId: projectId}, () => {
|
||||||
localStorage.setItem(PROJECT_ID, projectId);
|
localStorage.setItem(PROJECT_ID, projectId);
|
||||||
if (this.$route.path.indexOf('/track/review/view/') >= 0) {
|
let path = this.$route.matched[0].path ? this.$route.matched[0].path : '/';
|
||||||
this.$router.replace('/track/review/all');
|
this.$router.push(path).then(() => {
|
||||||
} else if (this.$route.path.indexOf('/track/plan/view/') >= 0) {
|
window.location.reload()
|
||||||
this.$router.replace('/track/plan/all');
|
}).catch(err => err);
|
||||||
} else {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
this.changeProjectName(projectId);
|
this.changeProjectName(projectId);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue