refactor(login): 优化登录页面逻辑

- 移除了多余的注释代码
- 简化了验证码发送逻辑
- 删除了未使用的函数
- 优化了代码结构,提高了代码可读性
This commit is contained in:
xingyy 2025-03-12 11:18:37 +08:00
parent 29cf4490e1
commit 13bc4f4883

View File

@ -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