登录注册更改

This commit is contained in:
2026-02-24 14:54:41 +08:00
parent 1a4db805ae
commit ce3abc48a4
4 changed files with 29 additions and 8 deletions

View File

@@ -45,16 +45,17 @@
clearTime()
})
onMounted(() => {
onSendCode()
// onSendCode()
})
const onSendCode = async () => {
const email = props.email
if (!email) {
console.warn('请输入邮箱')
return
return Promise.reject('请输入邮箱')
}
setTime()
await SendVerificationCode({ email })
setTime()
return Promise.resolve()
}
const onResend = () => {
if (time.value > 0) return
@@ -64,6 +65,9 @@
if (code.value.length !== 6) return
emit('submit', code.value)
}
defineExpose({
onSendCode
})
</script>
<style lang="less" scoped>