Авторизация успешна!
Ожидайте... пока идет переадресация
Введите последние 4 цифры входящего номера или код из SMS:
На ваш номер отправлен код подтверждения. Срок действия вашего кода 3 минуты.
{
const val = (e.target.value || '').replace(/\\D/g, '').slice(0, 1);
e.target.value = val;
otp[i] = val;
// Сбрасываем ошибку при вводе
if (otpError) otpError = null;
if (val && i === 3) {
const code = otp.join('');
if (code.length === 4) $nextTick(() => verifySms());
} else if (val && i < 3) {
$nextTick(() => {
const nextInput = e.target.parentElement.querySelector(`[data-otp-index='${i + 1}']`);
if (nextInput) nextInput.focus();
});
}
}"
@keydown="(e) => {
if (e.key === 'Backspace' && !otp[i] && i > 0) {
e.preventDefault();
const prevInput = e.target.parentElement.querySelector(`[data-otp-index='${i - 1}']`);
if (prevInput) prevInput.focus();
} else if (e.key === 'Backspace' && otp[i]) {
otp[i] = '';
e.target.value = '';
}
}"
@paste.prevent="(e) => {
const pasted = (e.clipboardData?.getData('text') || '').replace(/\\D/g, '').slice(0, 4);
for (let j = 0; j < pasted.length && (i + j) < 4; j++) {
otp[i + j] = pasted[j];
}
if (otpError) otpError = null;
if (pasted.length === 4) {
$nextTick(() => verifySms());
} else if (pasted.length > 0) {
const nextIdx = Math.min(i + pasted.length, 3);
$nextTick(() => {
const nextEl = e.target.parentElement.querySelector(`[data-otp-index='${nextIdx}']`);
if (nextEl) nextEl.focus();
});
}
}"
:class="[
i === 0 ? 'otp1' : '',
otpError
? 'border-[#DC2626] text-[#DC2626] shadow-[0_0_8px_rgba(255,6,6,0.5)]'
: 'border-gray-300 text-gray-900 focus:border-[#FF7500]'
]"
class="
w-12 h-12 md:w-[70px] md:h-[70px]
rounded-lg md:rounded-[10px]
border
bg-white
text-center
text-xl md:text-[26px] leading-6 md:leading-[32px] font-bold
text-gray-900
outline-none
transition
"
>