From f6d46b7c08c91334d30a19e4eadd27a11e50753e Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期四, 02 十二月 2021 12:47:41 +0800 Subject: [PATCH] fixed TODO#131354 修改登入成功點選我知道了的跳轉頁面邏輯 --- PAMapp/pages/login/index.vue | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PAMapp/pages/login/index.vue b/PAMapp/pages/login/index.vue index a05f29c..581fb06 100644 --- a/PAMapp/pages/login/index.vue +++ b/PAMapp/pages/login/index.vue @@ -505,7 +505,7 @@ confirmApplySuccess(): void { this.phoneSuccessConfirmVisable = false; this.registerSuccessConfirmVisable = false; - this.$router.push('/'); + this.redirect(); } private autoRedirect() { @@ -514,13 +514,17 @@ if (this.autoRedirectCounter === 0) { clearInterval(this.autoRedirectInterval); - const backToPrevious = ['questionnaire', 'myConsultantList']; - const find = backToPrevious.findIndex(item => this.previousPath.includes(item)); - find > -1 ? this.$router.go(-1) : this.$router.push('/'); + this.redirect(); } }, 1000) } + private redirect() { + const backToPrevious = ['questionnaire', 'myConsultantList']; + const find = backToPrevious.findIndex(item => this.previousPath.includes(item)); + find > -1 ? this.$router.go(-1) : this.$router.push('/'); + } + beforeRouteEnter (to, from, next) { next(vm => { vm.previousPath = from.path; -- Gitblit v1.8.0