('fence-global-type', () => null)
+
diff --git a/error.vue b/error.vue
index 2ba9369..fa12618 100644
--- a/error.vue
+++ b/error.vue
@@ -32,7 +32,7 @@ if(route.path !== '/404') {
Вы ищете страницу, которой не существует. Вернитесь на главную страницу сайта
Извините, но мы не можем найти запрашиваемую страницу. К сожалению, мы не можем помочь вам с
покупкой забора здесь.
-
+
{{ error?.message }}
diff --git a/nuxt.config.ts b/nuxt.config.ts
index e6328bf..888f306 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -10,6 +10,9 @@ export default defineNuxtConfig({
htmlAttrs: {
lang: 'ru',
},
+ link: [
+ { rel: 'icon', type: 'image/svg+xml', href: '/tabler--fence-filled.svg' },
+ ]
},
},
ssr: true,
@@ -25,7 +28,9 @@ export default defineNuxtConfig({
],
runtimeConfig: {
public: {
- apiBase: '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" : "https://mns.kustarshina.ru/kp",
+ // apiBase: 'http://localhost:8000',
imgBase: 'https://mns.kustarshina.ru',
baseUrl: '',
yandexMetrika: {
diff --git a/pages/index.vue b/pages/index.vue
index 372cf5e..f1683a2 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -7,6 +7,8 @@ import { marked } from 'marked';
import og_img from '/og_img.png'
+const globalFenceType = useGlobalFenceType()
+
const { data: seoData } = await apiFetch(`kp/1/`)
useSeoMeta({
title: seoData.value?.title,
@@ -21,7 +23,10 @@ const { data: menuData } = await apiFetch(`menu/1/?ordering=order`)
const pagesData = menuData.value ? menuData.value.pages : []
const { data: reviewsData } = await apiFetch(`review/`)
-const { data: calculatorData } = await apiFetch(`calculator/5/`)
+
+const { data: calculators } = await apiFetch('calculator/')
+const openTab = ref()
+if (calculators.value?.length) openTab.value = calculators.value[0].id
const about = pagesData.find(el => el.slug == 'about')
const reviews = pagesData.find(el => el.slug == 'clients')
@@ -37,16 +42,32 @@ const aboutText = computed(() => marked.parse(about?.content || ''))
const deliveryText = computed(() => delivery?.content.split('[col]').map(el => marked.parse(el || '')))
const advantagesText = computed(() => {
let c = advantages?.content || ''
- Object.entries(calculatorData.value || {}).map(item => {
- c = c.replaceAll(`[${item[0]}]`, roubleSign.format(item[1]))
+ Object.entries(calculators.value?.find(el => el.id == openTab.value) || {}).map(item => {
+ c = c.replaceAll(`[${item[0]}]`, roubleSign.format(item[1] as number))
})
return marked.parse(c)
})
const { data: advData } = await apiFetch(`advantage/`)
+
+watch(openTab, () => {
+ if (!openTab.value) return
+ if (!calculators.value) return
+ let type = 'standart'
+ if (openTab.value == 6) {
+ type = 'aristo'
+ }
+ const v = {
+ id: openTab.value as number,
+ type: type as "standart" | "aristo",
+ calc: calculators.value.find(el => el.id == openTab.value) as ApiCalcType,
+ }
+ globalFenceType.value = v
+})
+
{{ about?.title }}
@@ -92,6 +113,24 @@ const { data: advData } = await apiFetch
(`advantage/`)
+
+
+
+
+
+
+
@@ -101,7 +140,7 @@ const { data: advData } = await apiFetch
(`advantage/`)
-
diff --git a/public/models_aristo_exp/kosynka.glb b/public/models_aristo_exp/kosynka.glb
new file mode 100644
index 0000000..66ee1ab
Binary files /dev/null and b/public/models_aristo_exp/kosynka.glb differ
diff --git a/public/models_aristo_exp/krepleniye_planok.glb b/public/models_aristo_exp/krepleniye_planok.glb
new file mode 100644
index 0000000..181c5ad
Binary files /dev/null and b/public/models_aristo_exp/krepleniye_planok.glb differ
diff --git a/public/models_aristo_exp/osnova_stolba.glb b/public/models_aristo_exp/osnova_stolba.glb
new file mode 100644
index 0000000..91443e7
Binary files /dev/null and b/public/models_aristo_exp/osnova_stolba.glb differ
diff --git a/public/models_aristo_exp/planki.glb b/public/models_aristo_exp/planki.glb
new file mode 100644
index 0000000..595d6c8
Binary files /dev/null and b/public/models_aristo_exp/planki.glb differ
diff --git a/public/models_aristo_exp/stolb.glb b/public/models_aristo_exp/stolb.glb
new file mode 100644
index 0000000..0b28cd4
Binary files /dev/null and b/public/models_aristo_exp/stolb.glb differ
diff --git a/public/models_aristo_exp/verh.glb b/public/models_aristo_exp/verh.glb
new file mode 100644
index 0000000..e87e3e5
Binary files /dev/null and b/public/models_aristo_exp/verh.glb differ
diff --git a/public/models_exp.zip b/public/models_exp.zip
new file mode 100644
index 0000000..f5b4655
Binary files /dev/null and b/public/models_exp.zip differ
diff --git a/public/models_one/lamel_100_aristo.glb b/public/models_one/lamel_100_aristo.glb
new file mode 100644
index 0000000..31855d2
Binary files /dev/null and b/public/models_one/lamel_100_aristo.glb differ
diff --git a/public/models_one/pillar/bottom.glb b/public/models_one/pillar/bottom.glb
index d8253c4..a5b5e24 100644
Binary files a/public/models_one/pillar/bottom.glb and b/public/models_one/pillar/bottom.glb differ
diff --git a/public/models_one/pillar/topper/aristo1.glb b/public/models_one/pillar/topper/aristo1.glb
new file mode 100644
index 0000000..c7b8dd8
Binary files /dev/null and b/public/models_one/pillar/topper/aristo1.glb differ
diff --git a/public/tabler--fence-filled.svg b/public/tabler--fence-filled.svg
new file mode 100644
index 0000000..27c0b38
--- /dev/null
+++ b/public/tabler--fence-filled.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/utils/apiFetch.ts b/utils/apiFetch.ts
index e42ca76..89927dc 100644
--- a/utils/apiFetch.ts
+++ b/utils/apiFetch.ts
@@ -3,6 +3,7 @@ export async function apiFetch
(path: string) {
const apiBase = config.public.apiBase
const headers = new Headers()
headers.set('Referer', config.public.baseUrl)
+
return useFetch(`${apiBase}/${path}`, {
baseURL: config.public.baseUrl,
headers,