From a5a9a36fe627fa68a56ea536d425f81d55ac78af Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期三, 08 十二月 2021 16:32:45 +0800 Subject: [PATCH] update: myConsultantList - 使用者輸入網址進入後,自動轉向已預約列表路由 --- PAMapp/pages/myConsultantList.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/PAMapp/pages/myConsultantList.vue b/PAMapp/pages/myConsultantList.vue index 490d23c..ca2fb20 100644 --- a/PAMapp/pages/myConsultantList.vue +++ b/PAMapp/pages/myConsultantList.vue @@ -42,10 +42,14 @@ onMyConsultantListChange() { this.filterContactedList(); } - - tabClick(path: string) { - this.activeTabName = path; - this.$router.push('/myConsultantList/' + this.activeTabName) + + beforeRouteEnter(to: any, from: any, next: any) { + next(vm => { + if (to.name === 'myConsultantList') { + vm.$router.push('myConsultantList/consultantList'); + return; + } + }) } mounted() { @@ -56,6 +60,12 @@ } } + tabClick(path: string) { + this.activeTabName = path; + this.$router.push('/myConsultantList/' + this.activeTabName) + } + + filterContactedList() { this.consultantList = (this.myConsultantList || []) .filter(item => item.contactStatus !== 'contacted') -- Gitblit v1.8.0