From d018a282008275538edd0b82ce3103e99fb02f44 Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Mon, 16 Dec 2024 10:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E5=86=8C=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E5=80=92=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/login/index.vue | 31 +++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue index 6a76a52..9b506aa 100644 --- a/src/renderer/src/views/login/index.vue +++ b/src/renderer/src/views/login/index.vue @@ -38,7 +38,7 @@ - 发送验证码 + {{ codeName }} @@ -64,7 +64,7 @@ width="500" style=" -webkit-app-region: no-drag;" > - 根据图片回答相关问题 + 根据图片回答相关问题1
@@ -162,6 +162,14 @@ const sbmitImg=()=>{ ElMessage.success('短信发送成功') ruleForm.Code=res.data isImg.value=false + codeName.value=60 + timer.value=setInterval(()=>{ + codeName.value-- + if(codeName.value==0){ + codeName.value='发送验证码' + clearInterval(timer.value); + } + },1000) } }) @@ -182,14 +190,14 @@ const sendyzm=()=>{ isPeopleImg.value='data:image/jpg;base64,'+res.img isImg.value=true resImg.imgData=res - codeName.value=60 - timer.value=setInterval(()=>{ - codeName.value-- - if(codeName.value==0){ - codeName.value='发送验证码' - clearInterval(timer.value); - } - },1000) + // codeName.value=60 + // timer.value=setInterval(()=>{ + // codeName.value-- + // if(codeName.value==0){ + // codeName.value='发送验证码' + // clearInterval(timer.value); + // } + // },1000) }else{ ElMessage.error(res.msg) } @@ -278,6 +286,9 @@ const setCookie = (name, value) => { } const gotoLogin = () => { codeName.value='发送验证码' + if (timer.value){ + clearInterval(timer.value); + } if (ruleFormRef.value) ruleFormRef.value.resetFields() isRegister.value = true } -- 2.44.0.windows.1