добавлена капча

This commit is contained in:
2026-03-19 12:24:31 +10:00
parent dec6f4a707
commit 31ba3a2b6c
4 changed files with 15 additions and 28 deletions

View File

@@ -17,9 +17,13 @@ const authError = ref(false);
// Функция авторизации
const auth_my = async () => {
try {
const response = await axios.post("http://45.129.78.228:8004/login", {
// Получение токена reCAPTCHA
const recaptchaToken = await grecaptcha.execute("6LdfSo8sAAAAAGGhbgIGO51nHgMUALYjcAMOxnOg", { action: "login" });
const response = await axios.post("http://127.0.0.1:8004/login", {
username: login.value,
password: password.value,
recaptcha_token: recaptchaToken,
});
if (response.data.message === "Login successful") {
authError.value = false;
@@ -57,6 +61,7 @@ function showStartPage() {
password.value = "";
authError.value = false;
}
</script>
<template>
@@ -89,4 +94,5 @@ function showStartPage() {
Неверный логин или пароль
</div>
</div>
</template>