работает
This commit is contained in:
@@ -95,7 +95,7 @@ const fetchData = async (url) => {
|
||||
const fetchTotalCount = async (filterValue) => {
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
`http://allowlgroup.ru/api/8002/records_all/count?item=${filterValue}`,
|
||||
`https://allowlgroup.ru/api/8002/records_all/count?item=${filterValue}`,
|
||||
);
|
||||
return data.count;
|
||||
} catch (err) {
|
||||
@@ -107,7 +107,7 @@ const fetchTotalCount = async (filterValue) => {
|
||||
const fetchSearchCount = async (query, filterValue) => {
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
`http://allowlgroup.ru/api/8002/poisk/count?query=${query}&item=${filterValue}`,
|
||||
`https://allowlgroup.ru/api/8002/poisk/count?query=${query}&item=${filterValue}`,
|
||||
);
|
||||
return data.count;
|
||||
} catch (err) {
|
||||
@@ -129,7 +129,7 @@ const loadItems = async (filterValue) => {
|
||||
try {
|
||||
const totalCount = await fetchTotalCount(filterValue);
|
||||
const data = await fetchData(
|
||||
`http://allowlgroup.ru/api/8002/records_all?item=${filterValue}&offset=0&limit=${LIMIT}`,
|
||||
`https://allowlgroup.ru/api/8002/records_all?item=${filterValue}&offset=0&limit=${LIMIT}`,
|
||||
);
|
||||
items.value = data;
|
||||
currentOffset = LIMIT;
|
||||
@@ -150,7 +150,7 @@ const loadMore = async () => {
|
||||
if (poisk.value.trim()) {
|
||||
const totalCount = await fetchSearchCount(poisk.value, currentFilter);
|
||||
const data = await fetchData(
|
||||
`http://allowlgroup.ru/api/8002/poisk?query=${poisk.value}&item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`https://allowlgroup.ru/api/8002/poisk?query=${poisk.value}&item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
);
|
||||
items.value = [...items.value, ...data];
|
||||
currentOffset += LIMIT;
|
||||
@@ -159,7 +159,7 @@ const loadMore = async () => {
|
||||
// Иначе обычная загрузка с фильтром
|
||||
const totalCount = await fetchTotalCount(currentFilter);
|
||||
const data = await fetchData(
|
||||
`http://allowlgroup.ru/api/8002/records_all?item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`https://allowlgroup.ru/api/8002/records_all?item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
);
|
||||
items.value = [...items.value, ...data];
|
||||
currentOffset += LIMIT;
|
||||
@@ -185,7 +185,7 @@ const searchItems = async (query, filterValue, loadMoreFlag = false) => {
|
||||
try {
|
||||
const totalCount = await fetchSearchCount(query, filterValue);
|
||||
const data = await fetchData(
|
||||
`http://allowlgroup.ru/api/8002/poisk?query=${query}&item=${filterValue}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`https://allowlgroup.ru/api/8002/poisk?query=${query}&item=${filterValue}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
);
|
||||
|
||||
if (loadMoreFlag) {
|
||||
|
||||
@@ -168,7 +168,7 @@ function toggleLogs() {
|
||||
|
||||
const load_log = async () => {
|
||||
try {
|
||||
const response = await axios.get("http://allowlgroup.ru/api/8001/logs");
|
||||
const response = await axios.get("https://allowlgroup.ru/api/8001/logs");
|
||||
logs.value = response.data.logs;
|
||||
} catch (error) {
|
||||
console.error("Ошибка при загрузке настроек:", error);
|
||||
@@ -186,7 +186,7 @@ function toggletask() {
|
||||
const loadTasks = async () => {
|
||||
try {
|
||||
const response = await axios.get(
|
||||
"http://allowlgroup.ru/api/8001/get_tasks_offset",
|
||||
"https://allowlgroup.ru/api/8001/get_tasks_offset",
|
||||
);
|
||||
// Предположим, что ответ уже массив задач
|
||||
tasks.value = response.data; // или response.data если это массив
|
||||
@@ -198,7 +198,7 @@ const loadTasks = async () => {
|
||||
const delete_row = async (id) => {
|
||||
try{
|
||||
const response = await axios.delete(
|
||||
`http://allowlgroup.ru/api/8001/delete_task/${id}`,
|
||||
`https://allowlgroup.ru/api/8001/delete_task/${id}`,
|
||||
);
|
||||
console.log(response.data);
|
||||
loadTasks();
|
||||
@@ -215,7 +215,7 @@ onMounted(() => {
|
||||
// Получение настроек с сервера
|
||||
const loadSettings = async () => {
|
||||
try {
|
||||
const response = await axios.get("http://allowlgroup.ru/api/8001/settings");
|
||||
const response = await axios.get("https://allowlgroup.ru/api/8001/settings");
|
||||
sources.value = response.data.sources;
|
||||
currentSource.value = sources.value[0];
|
||||
promt.value = currentSource.value.prompt;
|
||||
@@ -233,7 +233,7 @@ const selectSource = (index) => {
|
||||
// Сохранение источников
|
||||
const saveSources = async () => {
|
||||
try {
|
||||
await axios.post("http://allowlgroup.ru/api/8001/settings", {
|
||||
await axios.post("https://allowlgroup.ru/api/8001/settings", {
|
||||
name: currentSource.value.name,
|
||||
url: "",
|
||||
prompt: promt.value,
|
||||
@@ -248,7 +248,7 @@ const saveSources = async () => {
|
||||
// Запуск парсинга 1
|
||||
const start_parser_1 = async () => {
|
||||
try {
|
||||
await axios.post("http://allowlgroup.ru/api/8001/parser_1", {
|
||||
await axios.post("https://allowlgroup.ru/api/8001/parser_1", {
|
||||
time: time.value,
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -259,7 +259,7 @@ const start_parser_1 = async () => {
|
||||
// Запуск парсинга 2
|
||||
const start_parser_2 = async () => {
|
||||
try {
|
||||
await axios.post("http://allowlgroup.ru/api/8001/parser_2");
|
||||
await axios.post("https://allowlgroup.ru/api/8001/parser_2");
|
||||
} catch (error) {
|
||||
console.error("Ошибка запроса parser_2:", error);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function handleClickOutside(event) {
|
||||
const viewed_b = async () => {
|
||||
try {
|
||||
await axios.post(
|
||||
"http://allowlgroup.ru/api/8002/update_viewed_status",
|
||||
"https://allowlgroup.ru/api/8002/update_viewed_status",
|
||||
null,
|
||||
{
|
||||
params: {
|
||||
@@ -67,7 +67,7 @@ const viewed_b = async () => {
|
||||
const status_b = async () => {
|
||||
try {
|
||||
await axios.post(
|
||||
"http://allowlgroup.ru/api/8002/update_status_status",
|
||||
"https://allowlgroup.ru/api/8002/update_status_status",
|
||||
null,
|
||||
{
|
||||
params: {
|
||||
@@ -82,7 +82,7 @@ const status_b = async () => {
|
||||
};
|
||||
const download = async () => {
|
||||
try {
|
||||
const rez = await axios.get("http://allowlgroup.ru/api/8001/file_download", {
|
||||
const rez = await axios.get("https://allowlgroup.ru/api/8001/file_download", {
|
||||
params: {
|
||||
path: props.article_date.split(" ")[0],
|
||||
title: props.title,
|
||||
|
||||
Reference in New Issue
Block a user