From 0b38df4576846bb8b17c9eb42d921650c4d52d45 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 16 Dec 2020 14:35:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=8E=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/common/head/SearchList.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/frontend/src/business/components/common/head/SearchList.vue b/frontend/src/business/components/common/head/SearchList.vue index 647621d15d..d4bbf9d1de 100644 --- a/frontend/src/business/components/common/head/SearchList.vue +++ b/frontend/src/business/components/common/head/SearchList.vue @@ -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); }); },