From ba6b02708e47a7b55b9533212ee5811d529ad585 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 20 七月 2022 15:23:45 +0800
Subject: [PATCH] fix: [login] resend 機制

---
 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 99b8193..7b14692 100644
--- a/PAMapp/pages/login/index.vue
+++ b/PAMapp/pages/login/index.vue
@@ -566,10 +566,12 @@
       this.emailCounterSec -= 1;
       if (this.emailResendCounter !== 0) {
         this.emailResendCounter -= 1;
+        if (this.emailResendCounter === 0) {
+          this.verificationCode = '';
+          this.regenerateImgOfVerification();
+        }
       }
       if (this.emailCounterSec === 0) {
-        this.verificationCode = '';
-        this.regenerateImgOfVerification();
         clearInterval(this.emailResendInterval);
       }
     }, 1000)
@@ -580,10 +582,12 @@
       this.otpCounterSec -= 1;
       if (this.otpResendCounter !== 0) {
         this.otpResendCounter -= 1;
+        if (this.otpResendCounter === 0) {
+          this.verificationCode = '';
+          this.regenerateImgOfVerification();
+        }
       }
       if (this.otpCounterSec === 0) {
-        this.verificationCode = '';
-        this.regenerateImgOfVerification();
         clearInterval(this.otpInterval);
       }
     }, 1000)

--
Gitblit v1.8.0