From 68e499e5eed17a2b1d2e47ee1790e16f001552f7 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期三, 22 十二月 2021 16:21:28 +0800 Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM --- PAMapp/pages/questionnaire/_agentNo.vue | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue index 83f35e9..69ea619 100644 --- a/PAMapp/pages/questionnaire/_agentNo.vue +++ b/PAMapp/pages/questionnaire/_agentNo.vue @@ -143,8 +143,9 @@ import { getRequestsFromStorage, removeRequestQuestionFromStorage, setRequestsToStorage } from '~/shared/storageRequests'; import _ from 'lodash'; -import queryConsultantService from '~/shared/services/query-consultant.service'; import appointmentService from '~/shared/services/appointment.service'; +import authService from '~/shared/services/auth.service'; +import queryConsultantService from '~/shared/services/query-consultant.service'; import { Consultant } from '~/shared/models/consultant.model'; import { ContactType } from '~/shared/models/enum/ContactType'; import { Gender } from '~/shared/models/enum/Gender'; @@ -280,7 +281,7 @@ beforeRouteEnter(to: any, from: any, next: any) { next(vm => { - const isUserLogin = vm.$store.getters['localStorage/isUserLogin']; + const isUserLogin = authService.isUserLogin(); if (from.name === 'login' && !isUserLogin) { vm.$router.go(-1); return; @@ -293,7 +294,7 @@ } async fetch() { - if (this.isUserLogin) { + if (authService.isUserLogin()) { await this.storeConsultantList(); }; } @@ -451,7 +452,7 @@ : appointmentInfo.appointmentDate; } @Watch('myConsultantList') onMyConsultantListChange() { - if (this.isUserLogin && this.myConsultantList.length > 0) { + if (authService.isUserLogin() && this.myConsultantList.length > 0) { const editAppointment = this.getLatestReserved(this.$route.params.agentNo); if (editAppointment && editAppointment.agentNo) { -- Gitblit v1.8.0