dev #90

Merged
ksenia_mikhailova merged 20 commits from dev into main 2025-03-20 14:15:19 +03:00
3 changed files with 3 additions and 1 deletions
Showing only changes of commit 04fa4e6ba8 - Show all commits

View File

@ -27,6 +27,7 @@ export default defineNuxtConfig({
public: { public: {
// apiBase: process.env.mode == 'DEVELOPMENT' ? "http://localhost:8000" : "https://mns.kustarshina.ru/kp", // apiBase: process.env.mode == 'DEVELOPMENT' ? "http://localhost:8000" : "https://mns.kustarshina.ru/kp",
apiBase: process.env.mode == 'DEVELOPMENT' ? "http://mns.dev.kustarshina.ru/kp" : "https://mns.kustarshina.ru/kp", apiBase: process.env.mode == 'DEVELOPMENT' ? "http://mns.dev.kustarshina.ru/kp" : "https://mns.kustarshina.ru/kp",
// apiBase: 'http://localhost:8000',
imgBase: 'https://mns.kustarshina.ru', imgBase: 'https://mns.kustarshina.ru',
baseUrl: '', baseUrl: '',
yandexMetrika: { yandexMetrika: {

View File

@ -24,7 +24,7 @@ const pagesData = menuData.value ? menuData.value.pages : []
const { data: reviewsData } = await apiFetch<ApiReviewsType[]>(`review/`) const { data: reviewsData } = await apiFetch<ApiReviewsType[]>(`review/`)
const { data: calculators } = await apiFetch<ApiCalcType[]>('calculator') const { data: calculators } = await apiFetch<ApiCalcType[]>('calculator/')
const openTab = ref<number>() const openTab = ref<number>()
if (calculators.value?.length) openTab.value = calculators.value[0].id if (calculators.value?.length) openTab.value = calculators.value[0].id

View File

@ -3,6 +3,7 @@ export async function apiFetch<T>(path: string) {
const apiBase = config.public.apiBase const apiBase = config.public.apiBase
const headers = new Headers() const headers = new Headers()
headers.set('Referer', config.public.baseUrl) headers.set('Referer', config.public.baseUrl)
return useFetch<T>(`${apiBase}/${path}`, { return useFetch<T>(`${apiBase}/${path}`, {
baseURL: config.public.baseUrl, baseURL: config.public.baseUrl,
headers, headers,