@@ -285,8 +285,13 @@ const verifyCodeLogin = async () => {
|
||||
|
||||
if (!isCodeEmpty()) return false
|
||||
|
||||
const res = await loginWithCode(email.value, code.value)
|
||||
return res || null
|
||||
try {
|
||||
const res = await loginWithCode(email.value, code.value)
|
||||
return res
|
||||
} catch (error) {
|
||||
console.error('验证码登录失败:', error)
|
||||
return null
|
||||
}
|
||||
}
|
||||
// 密码登录
|
||||
const passwordLogin = async () => {
|
||||
@@ -296,8 +301,13 @@ const passwordLogin = async () => {
|
||||
|
||||
if (!isPasswordEmpty()) return false
|
||||
|
||||
const res = await loginWithPassword(phoneEmail.value, password.value)
|
||||
return res || null
|
||||
try {
|
||||
const res = await loginWithPassword(phoneEmail.value, password.value)
|
||||
return res
|
||||
} catch (error) {
|
||||
console.error('密码登录失败:', error)
|
||||
return null
|
||||
}
|
||||
}
|
||||
// 提交登录
|
||||
const onSubmit = async () => {
|
||||
|
||||
Reference in New Issue
Block a user