移动端和 PC 端登录页都加了“图形验证码
This commit is contained in:
@@ -26,15 +26,22 @@ export function useSmsCountdown() {
|
||||
}
|
||||
})
|
||||
|
||||
async function handleSendCode(phone: string) {
|
||||
async function handleSendCode(
|
||||
phone: string,
|
||||
captcha?: { captchaId: string; captchaCode: string }
|
||||
) {
|
||||
if (!phone.trim()) {
|
||||
showToast({ message: '请输入手机号', icon: 'warning-o' })
|
||||
return false
|
||||
}
|
||||
if (!captcha?.captchaId || !captcha.captchaCode.trim()) {
|
||||
showToast({ message: '请输入图形验证码', icon: 'warning-o' })
|
||||
return false
|
||||
}
|
||||
|
||||
sending.value = true
|
||||
try {
|
||||
await sendSmsCode(phone)
|
||||
await sendSmsCode(phone, captcha.captchaId, captcha.captchaCode)
|
||||
showToast({
|
||||
message: '验证码已发送,请注意查收',
|
||||
icon: 'passed',
|
||||
|
||||
Reference in New Issue
Block a user