From b7c686564cab8a1630593dfbd1d4c461ab0c21f4 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Wed, 7 May 2025 18:18:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E9=AA=8C=E8=AF=81=E7=A0=81=E7=9B=B8=E5=85=B3=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GuipFormItem.vue | 2 +- src/components/PhoneCode.vue | 219 ++++++++++++++++++++++++++++------------ src/views/Franchise.vue | 142 ++++++++++++++++++++++---- 3 files changed, 277 insertions(+), 86 deletions(-) diff --git a/src/components/GuipFormItem.vue b/src/components/GuipFormItem.vue index f38d3b5..e4ab6d1 100644 --- a/src/components/GuipFormItem.vue +++ b/src/components/GuipFormItem.vue @@ -43,7 +43,7 @@ export default { // } }, mounted(){ - console.log(this.required,'required----'); + // console.log(this.required,'required----'); } } diff --git a/src/components/PhoneCode.vue b/src/components/PhoneCode.vue index ccc58d7..90bd4d7 100644 --- a/src/components/PhoneCode.vue +++ b/src/components/PhoneCode.vue @@ -1,75 +1,164 @@ - - - {{ countdownText }} - - - - + }, + // 校验验证码 + validateCode() { + this.$refs.formRef?.validateField(this.codeProp); + }, + // 发送验证码 + sendCode() { + if (!this.canSendCode) return; - \ No newline at end of file + }, + beforeDestroy() { + if (this.timer) clearInterval(this.timer); + }, +}; + + + \ No newline at end of file diff --git a/src/views/Franchise.vue b/src/views/Franchise.vue index 2512e7e..6c3f13b 100644 --- a/src/views/Franchise.vue +++ b/src/views/Franchise.vue @@ -28,7 +28,8 @@ - + @@ -51,39 +52,60 @@ + + 手机号码 - + + + + + + {{ countdown > 0 ? `${countdown}s后重试` : '获取验证码' }} + + + 验证码 - + + + - + - + - + @@ -92,7 +114,7 @@ \ No newline at end of file From 8965fafc551c4e5d061e28295f342b432266d1b3 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Wed, 7 May 2025 18:20:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Franchise.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/Franchise.vue b/src/views/Franchise.vue index 6c3f13b..93aaefe 100644 --- a/src/views/Franchise.vue +++ b/src/views/Franchise.vue @@ -269,7 +269,10 @@ export default { } }); } - } + }, + beforeDestroy() { + if (this.timer) clearInterval(this.timer); + }, }