замена ip
This commit is contained in:
@@ -95,7 +95,7 @@ const fetchData = async (url) => {
|
||||
const fetchTotalCount = async (filterValue) => {
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
`http://127.0.0.1:8002/records_all/count?item=${filterValue}`,
|
||||
`http://45.129.78.228: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://127.0.0.1:8002/poisk/count?query=${query}&item=${filterValue}`,
|
||||
`http://45.129.78.228: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://127.0.0.1:8002/records_all?item=${filterValue}&offset=0&limit=${LIMIT}`,
|
||||
`http://45.129.78.228: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://127.0.0.1:8002/poisk?query=${poisk.value}&item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`http://45.129.78.228: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://127.0.0.1:8002/records_all?item=${currentFilter}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`http://45.129.78.228: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://127.0.0.1:8002/poisk?query=${query}&item=${filterValue}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
`http://45.129.78.228:8002/poisk?query=${query}&item=${filterValue}&offset=${currentOffset}&limit=${LIMIT}`,
|
||||
);
|
||||
|
||||
if (loadMoreFlag) {
|
||||
|
||||
Reference in New Issue
Block a user