bx-843-testing #3
|
@ -36,17 +36,17 @@ jobs:
|
||||||
NUXT_PUBLIC_API_BASE: 'https://mns.kustarshina.ru/kp'
|
NUXT_PUBLIC_API_BASE: 'https://mns.kustarshina.ru/kp'
|
||||||
NUXT_PUBLIC_IMG_BASE: 'https://mns.kustarshina.ru'
|
NUXT_PUBLIC_IMG_BASE: 'https://mns.kustarshina.ru'
|
||||||
NUXT_PUBLIC_BASE_URL: 'https://kupizabor.kustarshina.ru'
|
NUXT_PUBLIC_BASE_URL: 'https://kupizabor.kustarshina.ru'
|
||||||
|
NUXT_PUBLIC_YANDEX_METRIKA_ID: ${{ secrets.YANDEX_METRIKA_ID }}
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SSH_HOST }}
|
host: ${{ secrets.SSH_HOST }}
|
||||||
username: ${{ secrets.SSH_USERNAME }}
|
username: ${{ secrets.SSH_USERNAME }}
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
port: ${{ secrets.SSH_PORT }}
|
# port: ${{ secrets.SSH_PORT }}
|
||||||
envs: NUXT_PUBLIC_API_BASE, NUXT_PUBLIC_IMG_BASE, NUXT_PUBLIC_BASE_URL
|
envs: NUXT_PUBLIC_API_BASE, NUXT_PUBLIC_IMG_BASE, NUXT_PUBLIC_BASE_URL, NUXT_PUBLIC_YANDEX_METRIKA_ID
|
||||||
script: |
|
script: |
|
||||||
cd /home/svs-adm/mns-mini-zabor
|
cd /home/svs-adm/mns-mini-zabor
|
||||||
echo "restart container"
|
docker compose down
|
||||||
docker-compose down
|
|
||||||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} ci.svs-tech.pro
|
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} ci.svs-tech.pro
|
||||||
docker-compose pull
|
docker compose pull
|
||||||
docker logout ci.svs-tech.pro
|
docker logout ci.svs-tech.pro
|
||||||
docker-compose up -d
|
docker compose up -d
|
|
@ -15,4 +15,5 @@
|
||||||
|
|
||||||
* `NUXT_PUBLIC_API_BASE='https://mns.kustarshina.ru/kp'`
|
* `NUXT_PUBLIC_API_BASE='https://mns.kustarshina.ru/kp'`
|
||||||
* `NUXT_PUBLIC_IMG_BASE='https://mns.kustarshina.ru'`
|
* `NUXT_PUBLIC_IMG_BASE='https://mns.kustarshina.ru'`
|
||||||
* `NUXT_PUBLIC_BASE_URL='https://kupizabor.kustarshina.ru'`
|
* `NUXT_PUBLIC_BASE_URL='https://kupizabor.kustarshina.ru'`
|
||||||
|
* `NUXT_PUBLIC_YANDEX_METRIKA_ID=12345678`
|
|
@ -115,6 +115,8 @@ const changeParametres = () => {
|
||||||
section_count.value = form_state.full_sections
|
section_count.value = form_state.full_sections
|
||||||
extra_section.value = form_state.extra_section
|
extra_section.value = form_state.extra_section
|
||||||
remove_pillar.value = form_state.remove_pillar
|
remove_pillar.value = form_state.remove_pillar
|
||||||
|
|
||||||
|
goal('calc_fence', form_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
const setLamelleColor = (color: ralTypes) => {
|
const setLamelleColor = (color: ralTypes) => {
|
||||||
|
@ -134,6 +136,12 @@ const plurals = {
|
||||||
fence: { one: 'cтолб', few: 'столба', many: 'столбов' },
|
fence: { one: 'cтолб', few: 'столба', many: 'столбов' },
|
||||||
section: { one: 'секция', few: 'секции', many: 'секций' },
|
section: { one: 'секция', few: 'секции', many: 'секций' },
|
||||||
}
|
}
|
||||||
|
const goal = (target: string, params: object) => {
|
||||||
|
const nuxtApp = useNuxtApp()
|
||||||
|
if (nuxtApp.$metrika) {
|
||||||
|
nuxtApp.$metrika.reachGoal(target, params || {})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="container relative py-4">
|
<div class="container relative py-4">
|
||||||
|
|
|
@ -5,7 +5,6 @@ import type { ralTypes } from '@/components/ral'
|
||||||
const config = useRuntimeConfig()
|
const config = useRuntimeConfig()
|
||||||
const apiBase = config.public.apiBase
|
const apiBase = config.public.apiBase
|
||||||
const { data: calculatorData } = await useFetch<ApiCalcType>(`${apiBase}/calculator/5/`)
|
const { data: calculatorData } = await useFetch<ApiCalcType>(`${apiBase}/calculator/5/`)
|
||||||
|
|
||||||
const isModalOpen = useState('modal_open', () => false)
|
const isModalOpen = useState('modal_open', () => false)
|
||||||
|
|
||||||
const lamelle_height = useState<number>('lamelle_height')
|
const lamelle_height = useState<number>('lamelle_height')
|
||||||
|
@ -44,6 +43,7 @@ const modal_state = reactive({
|
||||||
})
|
})
|
||||||
const openForm = () => {
|
const openForm = () => {
|
||||||
modal_state.show_form = !modal_state.show_form
|
modal_state.show_form = !modal_state.show_form
|
||||||
|
goal('open_form', total_txt)
|
||||||
}
|
}
|
||||||
const validateInput = (evt: KeyboardEvent) => {
|
const validateInput = (evt: KeyboardEvent) => {
|
||||||
const valid_symbols = /[a-zA-Z0-9\+(\\)\ @\.]/
|
const valid_symbols = /[a-zA-Z0-9\+(\\)\ @\.]/
|
||||||
|
@ -67,6 +67,7 @@ const validate = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const submit = (e: any) => {
|
const submit = (e: any) => {
|
||||||
|
goal('submit_form', modal_data)
|
||||||
fetch(`${apiBase}/custom_request/`, {
|
fetch(`${apiBase}/custom_request/`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -160,6 +161,12 @@ const total_txt = computed(() => {
|
||||||
total: res_total
|
total: res_total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const goal = (target: string, params: object) => {
|
||||||
|
const nuxtApp = useNuxtApp()
|
||||||
|
if (nuxtApp.$metrika) {
|
||||||
|
nuxtApp.$metrika.reachGoal(target, params || {})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-if="isModalOpen" class="modal-backdrop" @click.self="toggleModal">
|
<div v-if="isModalOpen" class="modal-backdrop" @click.self="toggleModal">
|
||||||
|
|
|
@ -3,6 +3,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
# env_file: ".env"
|
||||||
container_name: mns-mini-zabor
|
container_name: mns-mini-zabor
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -51,13 +51,17 @@ export default defineNuxtConfig({
|
||||||
'@tresjs/nuxt',
|
'@tresjs/nuxt',
|
||||||
'nuxt-anchorscroll',
|
'nuxt-anchorscroll',
|
||||||
'@nuxtjs/robots',
|
'@nuxtjs/robots',
|
||||||
|
'@artmizu/yandex-metrika-nuxt',
|
||||||
],
|
],
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
apiBase: 'https://mns.kustarshina.ru/kp',
|
apiBase: 'https://mns.kustarshina.ru/kp',
|
||||||
imgBase: 'https://mns.kustarshina.ru',
|
imgBase: 'https://mns.kustarshina.ru',
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
},
|
yandexMetrika: {
|
||||||
|
id: 0
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
routeRules: {
|
routeRules: {
|
||||||
'/index.html': { redirect: '/' },
|
'/index.html': { redirect: '/' },
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"name": "nuxt-app",
|
"name": "nuxt-app",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@artmizu/yandex-metrika-nuxt": "^1.0.4",
|
||||||
"@monogrid/gainmap-js": "^3.0.5",
|
"@monogrid/gainmap-js": "^3.0.5",
|
||||||
"@nuxt/image": "^1.7.0",
|
"@nuxt/image": "^1.7.0",
|
||||||
"@nuxtjs/robots": "^3.0.0",
|
"@nuxtjs/robots": "^3.0.0",
|
||||||
|
@ -26,7 +27,8 @@
|
||||||
"tailwindcss": "^3.4.3",
|
"tailwindcss": "^3.4.3",
|
||||||
"three": "^0.165.0",
|
"three": "^0.165.0",
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.4.27",
|
||||||
"vue-router": "^4.3.2"
|
"vue-router": "^4.3.2",
|
||||||
|
"yandex-metrika-vue3": "^1.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/imagemin": "^9.0.0"
|
"@types/imagemin": "^9.0.0"
|
||||||
|
@ -162,6 +164,21 @@
|
||||||
"url": "https://github.com/sponsors/antfu"
|
"url": "https://github.com/sponsors/antfu"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@artmizu/yandex-metrika-nuxt": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@artmizu/yandex-metrika-nuxt/-/yandex-metrika-nuxt-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-Er10jaxk/r8EaL8ZrZMXWK+UifOw0gm1ArqV1mx0Z2PVly2v4zKUdFxwzUe3ew4TEeFhRit4wmJxgK4zeySc7g==",
|
||||||
|
"dependencies": {
|
||||||
|
"@nuxt/kit": "^3.3.1",
|
||||||
|
"consola": "^2.15.3",
|
||||||
|
"defu": "^6.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@artmizu/yandex-metrika-nuxt/node_modules/consola": {
|
||||||
|
"version": "2.15.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
|
||||||
|
"integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw=="
|
||||||
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
"version": "7.24.6",
|
"version": "7.24.6",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz",
|
||||||
|
@ -17183,6 +17200,14 @@
|
||||||
"node": ">= 14"
|
"node": ">= 14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/yandex-metrika-vue3": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yandex-metrika-vue3/-/yandex-metrika-vue3-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-aopwC9iruhKZY8E5BP/6c68FQ+L1pN65gJT5W7KUzEDHyWzBjgrNrsNMW/snDfADMJrPL1VmaaI3eaWj8Lmi2Q==",
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": ">=3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yargs": {
|
"node_modules/yargs": {
|
||||||
"version": "17.7.2",
|
"version": "17.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"postinstall": "nuxt prepare"
|
"postinstall": "nuxt prepare"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@artmizu/yandex-metrika-nuxt": "^1.0.4",
|
||||||
"@monogrid/gainmap-js": "^3.0.5",
|
"@monogrid/gainmap-js": "^3.0.5",
|
||||||
"@nuxt/image": "^1.7.0",
|
"@nuxt/image": "^1.7.0",
|
||||||
"@nuxtjs/robots": "^3.0.0",
|
"@nuxtjs/robots": "^3.0.0",
|
||||||
|
|
Loading…
Reference in New Issue