From 13bc4f4883adc0602cd05b984d3e34eaddfd2702 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:18:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(login):=20=E4=BC=98=E5=8C=96=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了多余的注释代码 - 简化了验证码发送逻辑 - 删除了未使用的函数 - 优化了代码结构,提高了代码可读性 --- app/pages/login/index.vue | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/app/pages/login/index.vue b/app/pages/login/index.vue index 9519ec5..e7ac625 100644 --- a/app/pages/login/index.vue +++ b/app/pages/login/index.vue @@ -110,20 +110,6 @@ loadingRef.value.loading1=true isShow.value=true loadingRef.value.loading1=false } -// loadingRef.value.loading1=true -// const res=await senCode({ -// telNum:phoneNum.value, -// zone:selectedZone.value -// }) -// loadingRef.value.loading1=false -// if (res.status===0){ - - -// } -// pane.value = 1 -// vanSwipeRef.value?.swipeTo(pane.value) - -// startCountdown(); } const goBack = () => { code.value = '' @@ -177,13 +163,7 @@ onUnmounted(() => { window.removeEventListener('resize', () => {}) }) const isShow=ref(false) -const onSuccess=()=>{ - // userCaptchaValidate() - isShow.value=false -} -const onClose=()=>{ - isShow.value=false -} + const onLeave =async (moveX, callback) => { loadingRef.value.loading1=true const res=await senCode({ @@ -198,7 +178,7 @@ const onLeave =async (moveX, callback) => { if (res.status===408){ callback(false) getCode() - }else{ + }else if([407,0].includes(res.status)){ callback(true) setTimeout(() => { pane.value = 1