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 @@