From ff1e8cdab9e0a5157af55463af325049b89dfd77 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期三, 20 七月 2022 17:11:54 +0800 Subject: [PATCH] Merge branch 'Phase3' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into Phase3 --- PAMapp/pages/login/index.vue | 26 +++++++++++++++++--------- PAMapp/shared/services/httpClient.ts | 9 +++++++-- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/PAMapp/pages/login/index.vue b/PAMapp/pages/login/index.vue index e9b152d..7b14692 100644 --- a/PAMapp/pages/login/index.vue +++ b/PAMapp/pages/login/index.vue @@ -82,7 +82,7 @@ <template v-if="connectDevice === 'MOBILE'"> <div v-show="showPhoneOtpCodeField"> <el-row type="flex" justify="space-between"> - <div class="mdTxt">頛詨撽�Ⅳ</div> + <div class="mdTxt">頛詨 OTP 撽�Ⅳ</div> <div class="otp-count-timer"> {{counterTime(otpCounterSec)}} </div> @@ -95,11 +95,11 @@ 'is-invalid': !otpCode }" v-model="otpCode" - placeholder="隢撓�撽�Ⅳ" + placeholder="隢撓� OTP 撽�Ⅳ" > </el-row> <div class="error mt-5 mb-10"> - <span v-show="otpCounterSec === 0">撽�Ⅳ撌脤�����撽�Ⅳ</span> + <span v-show="otpCounterSec === 0">OTP 撽�Ⅳ撌脤����� OTP 撽�Ⅳ</span> </div> <el-row> @@ -108,7 +108,7 @@ @click="resentOtp('MOBILE')" icon="icon-arrow" > - ��撽�Ⅳ<span + �� OTP 撽�Ⅳ<span class="pam-field-title__hint pl-5" v-if="otpResendCounter !== 0" >({{ otpResendCounter }})</span> @@ -133,7 +133,7 @@ <template v-if="connectDevice === 'EMAIL'"> <el-row v-show="showEmailVerifyField"> <el-row type="flex" justify="space-between"> - <div class="mdTxt">頛詨撽�Ⅳ</div> + <div class="mdTxt">頛詨 OTP 撽�Ⅳ</div> <div class="otp-count-timer"> {{counterTime(emailCounterSec)}} </div> @@ -146,11 +146,11 @@ 'is-invalid': !emailOtpCode }" v-model="emailOtpCode" - placeholder="隢撓�撽�Ⅳ" + placeholder="隢撓� OTP 撽�Ⅳ" > </el-row> <div class="error mt-5 mb-10"> - <span v-show="emailCounterSec === 0">撽�Ⅳ撌脤�����撽�Ⅳ</span> + <span v-show="emailCounterSec === 0">OTP 撽�Ⅳ撌脤����� OTP 撽�Ⅳ</span> </div> <el-button @@ -158,7 +158,7 @@ icon="icon-arrow" @click="resentOtp('EMAIL')" > - ��撽�Ⅳ<span + �� OTP 撽�Ⅳ<span v-if="emailResendCounter !== 0" class="pam-field-title__hint pl-5" >({{ emailResendCounter }})</span> @@ -566,6 +566,10 @@ this.emailCounterSec -= 1; if (this.emailResendCounter !== 0) { this.emailResendCounter -= 1; + if (this.emailResendCounter === 0) { + this.verificationCode = ''; + this.regenerateImgOfVerification(); + } } if (this.emailCounterSec === 0) { clearInterval(this.emailResendInterval); @@ -578,9 +582,13 @@ this.otpCounterSec -= 1; if (this.otpResendCounter !== 0) { this.otpResendCounter -= 1; + if (this.otpResendCounter === 0) { + this.verificationCode = ''; + this.regenerateImgOfVerification(); + } } if (this.otpCounterSec === 0) { - clearInterval(this.otpInterval) + clearInterval(this.otpInterval); } }, 1000) } diff --git a/PAMapp/shared/services/httpClient.ts b/PAMapp/shared/services/httpClient.ts index 7441584..e704513 100644 --- a/PAMapp/shared/services/httpClient.ts +++ b/PAMapp/shared/services/httpClient.ts @@ -6,7 +6,7 @@ const notRequireInterceptorErrorUrl = [ '/otp/verify', - '/otp/sendOtp', + // '/otp/sendOtp', '/eService/authenticate', '/login/validate/get_img_code', '/login/validate/verify_img_code', @@ -66,8 +66,13 @@ function showErrorMessageBox(error: any): void { setTimeout(() => { + console.log('errorerrorerror', error.config); // NOTE: 甇斤 HOT FIX 憿批��憭望������暹��� dialog [Tomas, 2022/7/20 14:21] - if(error.config.url.include('api/eService/authenticate')) return; + if(error.config.url.includes('api/eService/authenticate')) return; + if (error.config.url.includes('/otp/sendOtp')) { + messageBoxService.showErrorMessage('', error); + return + } if (!_.includes(notRequireInterceptorErrorUrl, error.config.url)) { switch (error.response.status) { case 401: -- Gitblit v1.8.0