From 78e62dd1b55cf17bf915ab22bb6ae8f96e07fca0 Mon Sep 17 00:00:00 2001 From: KUN1007 Date: Wed, 1 Nov 2023 12:41:36 +0800 Subject: [PATCH] BUG fix: send register code --- src/components/verification-code/Code.vue | 49 +++++++++++------------ src/views/login/components/Register.vue | 11 +++-- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/src/components/verification-code/Code.vue b/src/components/verification-code/Code.vue index 900954b5..3924ff7b 100644 --- a/src/components/verification-code/Code.vue +++ b/src/components/verification-code/Code.vue @@ -1,8 +1,7 @@ diff --git a/src/views/login/components/Register.vue b/src/views/login/components/Register.vue index 70afbca7..afce4314 100644 --- a/src/views/login/components/Register.vue +++ b/src/views/login/components/Register.vue @@ -110,15 +110,14 @@ const handleSendCode = () => { return } - // If human verification is not completed - if (!isCaptureSuccessful.value) { + if (isCaptureSuccessful.value) { + // Change isSendCode, because Code component use watch + isSendCode.value = !isSendCode.value + isCaptureSuccessful.value = false + } else { // Show human verification isShowCapture.value = true - return } - - // Mark that the code has been sent - isSendCode.value = true } const handleRegister = async () => {