From 0e27da107dd3329b4d0c11ce7d0173c3bd1358e9 Mon Sep 17 00:00:00 2001 From: Jack <jack.su@pollex.com.tw> Date: 星期三, 19 一月 2022 19:06:52 +0800 Subject: [PATCH] Merge branch 'Phase3' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into Phase3 --- PAMapp/pages/consultantLogin/index.vue | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/PAMapp/pages/consultantLogin/index.vue b/PAMapp/pages/consultantLogin/index.vue index 2358123..dcebb79 100644 --- a/PAMapp/pages/consultantLogin/index.vue +++ b/PAMapp/pages/consultantLogin/index.vue @@ -61,8 +61,11 @@ import { Role } from '~/shared/models/enum/Role'; import messageBoxService from '~/shared/services/message-box.service'; import loginService from '~/shared/services/login.service' +import { AgentInfo } from '~/shared/models/agent-info.model'; + const loginStore = namespace('login.store'); const roleStorage = namespace('localStorage'); + @Component({ layout: 'home' }) @@ -75,6 +78,9 @@ @roleStorage.Mutation storageConsultantId!:(id:string) => void; + + @loginStore.Action + getLoginConsultantDetail!: (agentNo: string) => Promise<AgentInfo>; consultantDto = { password: '', @@ -130,7 +136,7 @@ private verify():void{ loginService.getVerificationStatus(this.verificationCode).then( verifySuccess => { if(verifySuccess.data){ - this.loginWithConsultant() + this.loginWithConsultant(); }else{ this.clearValue(); this.regenerateImgOfVerification(); @@ -141,6 +147,7 @@ private loginWithConsultant(): void { loginService.logInToConsultant(this.consultantDto).then(res => { + this.getLoginConsultantDetail(this.consultantDto.username); this.storageIdToken(res.data.id_token); this.storageRole(Role.ADMIN); this.storageConsultantId(this.consultantDto.username) -- Gitblit v1.8.0