refactor(login): 优化登录页面逻辑
- 移除了多余的注释代码 - 简化了验证码发送逻辑 - 删除了未使用的函数 - 优化了代码结构,提高了代码可读性
This commit is contained in:
parent
29cf4490e1
commit
13bc4f4883
@ -110,20 +110,6 @@ loadingRef.value.loading1=true
|
|||||||
isShow.value=true
|
isShow.value=true
|
||||||
loadingRef.value.loading1=false
|
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 = () => {
|
const goBack = () => {
|
||||||
code.value = ''
|
code.value = ''
|
||||||
@ -177,13 +163,7 @@ onUnmounted(() => {
|
|||||||
window.removeEventListener('resize', () => {})
|
window.removeEventListener('resize', () => {})
|
||||||
})
|
})
|
||||||
const isShow=ref(false)
|
const isShow=ref(false)
|
||||||
const onSuccess=()=>{
|
|
||||||
// userCaptchaValidate()
|
|
||||||
isShow.value=false
|
|
||||||
}
|
|
||||||
const onClose=()=>{
|
|
||||||
isShow.value=false
|
|
||||||
}
|
|
||||||
const onLeave =async (moveX, callback) => {
|
const onLeave =async (moveX, callback) => {
|
||||||
loadingRef.value.loading1=true
|
loadingRef.value.loading1=true
|
||||||
const res=await senCode({
|
const res=await senCode({
|
||||||
@ -198,7 +178,7 @@ const onLeave =async (moveX, callback) => {
|
|||||||
if (res.status===408){
|
if (res.status===408){
|
||||||
callback(false)
|
callback(false)
|
||||||
getCode()
|
getCode()
|
||||||
}else{
|
}else if([407,0].includes(res.status)){
|
||||||
callback(true)
|
callback(true)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
pane.value = 1
|
pane.value = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user