From 37ecae6b27c559a093f42d850160926cff177f2f Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 01 十二月 2021 15:05:27 +0800
Subject: [PATCH] fixed: 調整 backactionbar 邏輯: 推薦顧問推薦/業務員資訊/進行預約-回上一頁, 其餘頁面統一回首頁

---
 PAMapp/components/BackActionBar.vue |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/PAMapp/components/BackActionBar.vue b/PAMapp/components/BackActionBar.vue
index ecb8c26..1bfc41a 100644
--- a/PAMapp/components/BackActionBar.vue
+++ b/PAMapp/components/BackActionBar.vue
@@ -62,8 +62,9 @@
   }
 
   pushRouterByLoginRole():void{
-    const previousPageName = this.$route.name;
-    previousPageName?.includes('myConsultantList') ? this.$router.push('/') : this.$router.go(-1);
+    const backToPrevious = ['recommendConsultant-result', 'agentInfo-agentNo', 'questionnaire-agentNo'];
+    const find = backToPrevious.findIndex(item => this.$route.name?.includes(item));
+    find > -1 ? this.$router.go(-1) : this.$router.push('/');
   }
 }
 </script>

--
Gitblit v1.8.0