From e9129667edbee8c03880246a1a530b6de3facdcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=91=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=83=D1=80=D0=B8=D1=81=D1=82?= Date: Sun, 3 May 2026 14:00:16 +1000 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=B8=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Istochnik_section/Istochnik.vue | 10 ++++++---- .../Istochnik_section/Istochnik_one_kard.vue | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Istochnik_section/Istochnik.vue b/src/components/Istochnik_section/Istochnik.vue index 6f8786c..b55de82 100644 --- a/src/components/Istochnik_section/Istochnik.vue +++ b/src/components/Istochnik_section/Istochnik.vue @@ -108,9 +108,11 @@ const fetchCategories = async () => { } }; -const fetchSources = async () => { +const fetchSources = async (category) => { try { - const data = await axios.get("https://allowlgroup.ru/api/8001/all_sources"); + const data = await axios.get(`https://allowlgroup.ru/api/8001/all_sources`, { + params: { category } + }); sources.value = data.data.sources || []; } catch (err) { console.error("Ошибка загрузки источников:", err); @@ -147,7 +149,7 @@ const addSource = async () => { }; const onfilterItems = (filterValue) => { - console.log("Фильтр:", filterValue); + fetchSources(filterValue); }; const handleSourceStarted = (url) => { @@ -169,6 +171,6 @@ onMounted(() => { }); fetchCategories(); - fetchSources(); + fetchSources("all"); }); diff --git a/src/components/Istochnik_section/Istochnik_one_kard.vue b/src/components/Istochnik_section/Istochnik_one_kard.vue index 6d0459c..95f3afd 100644 --- a/src/components/Istochnik_section/Istochnik_one_kard.vue +++ b/src/components/Istochnik_section/Istochnik_one_kard.vue @@ -2,7 +2,7 @@
- +
- +