From 87fa5e8e08756e4161204a9b7d2b0cdd95b0f414 Mon Sep 17 00:00:00 2001 From: Yro Boros Date: Wed, 11 Mar 2026 22:20:05 +1000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B8=D0=B7=D0=B1=D1=80=D0=B0=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=84=D1=80=D0=B0=D0=B3=D0=BC=D0=B5=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 47 ++++++++++++++++++------------------ src/components/Section.vue | 49 +++++++++++++++++++++++++++++++------- src/components/Setings.vue | 2 +- src/components/Stat.vue | 4 ++-- 4 files changed, 67 insertions(+), 35 deletions(-) diff --git a/src/App.vue b/src/App.vue index c58d8d8..03a2bb2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,9 +3,9 @@ import { onMounted, ref, watch } from "vue"; import My_naw from "./components/My_naw.vue"; import Section from "./components/Section.vue"; import Setings from "./components/Setings.vue"; -import Status from "./components/Status.vue"; +// import Status from "./components/Status.vue"; import Authe from "./components/Authe.vue"; -import axios from "axios"; +// import axios from "axios"; // Инициализация темы при загрузке приложения onMounted(() => { @@ -24,31 +24,29 @@ onMounted(() => { // Состояния страницы и данные для входа const currentPage = ref("admin-panel"); -const items = ref([]); -const items_status = ref([]); +// const items = ref([]); +// const items_status = ref([]); // Универсальная функция для получения данных -const fetchData = async (url, targetRef) => { - try { - const { data } = await axios.get(url); - targetRef.value = data; - } catch (err) { - console.error(`Ошибка при получении данных с ${url}:`, err); - } -}; +// const fetchData = async (url, targetRef) => { +// try { +// const { data } = await axios.get(url); +// targetRef.value = data; +// } catch (err) { +// console.error(`Ошибка при получении данных с ${url}:`, err); +// } +// }; -// Обертки для вызова -const loadItems = () => - fetchData("http://45.129.78.228:8002/records_all", items); //http://127.0.0.1:8002/records_all http://45.129.78.228:8002/records_all -const loadItems_status = () => - fetchData("http://45.129.78.228:8002/records_all_status", items_status); +// const loadItems_status = () => +// fetchData("http://45.129.78.228:8002/records_all_status", items_status); -onMounted(() => { - (loadItems(), loadItems_status()); -}); +// onMounted(() => { +// (loadItems(), loadItems_status()); +// (loadItems_status()); +// }); -watch(items, loadItems); -watch(items_status, loadItems_status); +// watch(items, loadItems); +// watch(items_status, loadItems_status); function handleUpdate(newValue) { currentPage.value = newValue; // изменение значения в родителе @@ -60,7 +58,8 @@ function handleUpdate(newValue) {
-
+ +
@@ -74,7 +73,7 @@ function handleUpdate(newValue) {
- +
diff --git a/src/components/Section.vue b/src/components/Section.vue index a59fa71..584415f 100644 --- a/src/components/Section.vue +++ b/src/components/Section.vue @@ -2,7 +2,7 @@ diff --git a/src/components/Setings.vue b/src/components/Setings.vue index 14a5df3..de6fbc9 100644 --- a/src/components/Setings.vue +++ b/src/components/Setings.vue @@ -248,7 +248,7 @@ const saveSources = async () => { // Запуск парсинга 1 const start_parser_1 = async () => { try { - await axios.post("http://127.0.0.1:8001/parser_1", { + await axios.post("http://45.129.78.228:8001/parser_1", { time: time.value, }); } catch (error) { diff --git a/src/components/Stat.vue b/src/components/Stat.vue index c19f49c..4790c01 100644 --- a/src/components/Stat.vue +++ b/src/components/Stat.vue @@ -49,7 +49,7 @@ function handleClickOutside(event) { const viewed_b = async () => { try { - const response = await axios.post( + await axios.post( "http://45.129.78.228:8002/update_viewed_status", null, { @@ -66,7 +66,7 @@ const viewed_b = async () => { const status_b = async () => { try { - const response = await axios.post( + await axios.post( "http://45.129.78.228:8002/update_status_status", null, {