From 9f9b7a95f358aafae44557336d7015ef98bd5634 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期日, 28 八月 2022 21:41:29 +0800 Subject: [PATCH] update: login - regenerateImgOfVerification mechanism --- PAMapp/pages/login/index.vue | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/PAMapp/pages/login/index.vue b/PAMapp/pages/login/index.vue index 6bada8e..f25eae7 100644 --- a/PAMapp/pages/login/index.vue +++ b/PAMapp/pages/login/index.vue @@ -336,7 +336,7 @@ <script lang="ts"> import { namespace } from 'nuxt-property-decorator'; -import { Vue, Component, Ref } from 'vue-property-decorator'; +import { Vue, Component, Ref, Watch } from 'vue-property-decorator'; import { OtpErrorCode } from '~/shared/models/enum/otpErrorCode'; import { Role } from '~/shared/models/enum/Role'; import { LoginRequest } from '~/shared/models/loginRequest.model'; @@ -399,6 +399,20 @@ applyAccount_onAction = false; previousPath = ''; + + @Watch('onEmailVerifyResendStatus') + onEmailVerifyResendStatusChange() { + if (this.onEmailVerifyResendStatus === 'APPLY_OTP') { + this.regenerateImgOfVerification(); + } + } + + @Watch('onPhoneVerifyStep') + onPhoneVerifyStepChange() { + if (this.onPhoneVerifyStep === 'APPLY_OTP') { + this.regenerateImgOfVerification(); + } + } ///////////////////////////////////////////////////// @@ -611,7 +625,6 @@ this.emailOtpCode = ''; } this.removeOtpTime(); - this.regenerateImgOfVerification(); } private resetOtpSetting(type: string) { -- Gitblit v1.8.0