Mr. Xie
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
apps/web-ele/src/views/_core/authentication/code-login.vue
-
packages/@core/ui-kit/shadcn-ui/src/components/pin-input/input.vue
|
|
@ -40,6 +40,10 @@ const formSchema = computed((): VbenFormSchema[] => { |
|
|
return text; |
|
|
return text; |
|
|
}, |
|
|
}, |
|
|
placeholder: $t('authentication.code'), |
|
|
placeholder: $t('authentication.code'), |
|
|
|
|
|
handleSendCode: async () => { |
|
|
|
|
|
console.warn('发送验证码前校验等逻辑'); |
|
|
|
|
|
throw new Error('手机号校验失败'); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
fieldName: 'code', |
|
|
fieldName: 'code', |
|
|
label: $t('authentication.code'), |
|
|
label: $t('authentication.code'), |
|
|
|
|
|
@ -59,9 +59,9 @@ function handleComplete(e: string[]) { |
|
|
async function handleSend(e: Event) { |
|
|
async function handleSend(e: Event) { |
|
|
try { |
|
|
try { |
|
|
e?.preventDefault(); |
|
|
e?.preventDefault(); |
|
|
|
|
|
await handleSendCode(); |
|
|
countdown.value = maxTime; |
|
|
countdown.value = maxTime; |
|
|
startCountdown(); |
|
|
startCountdown(); |
|
|
await handleSendCode(); |
|
|
|
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('Failed to send code:', error); |
|
|
console.error('Failed to send code:', error); |
|
|
// Consider emitting an error event or showing a notification |
|
|
// Consider emitting an error event or showing a notification |
|
|
|