Skip to content

Commit

Permalink
edit links
Browse files Browse the repository at this point in the history
  • Loading branch information
frylock34 committed Jan 11, 2023
1 parent c6221ae commit 626dc4b
Show file tree
Hide file tree
Showing 29 changed files with 13,304 additions and 27,232 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
repository_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
MEGAPLAN_LOGIN: ${{ secrets.MEGAPLAN_LOGIN }}
MEGAPLAN_PASS: ${{ secrets.MEGAPLAN_PASS }}
VIDEO_KEY: ${{ secrets.VIDEO_KEY }}
SECURE_TOKEN: ${{ secrets.SECURE_TOKEN }}
YANDEX_VER: ${{ secrets.YANDEX_VER }}
API_KEY: ${{ secrets.API_KEY }}
SITE_KEY: ${{ secrets.SITE_KEY }}
BITRIX_SEC: ${{ secrets.BITRIX_SEC }}
MATERIAL_TABLE_ID: ${{ secrets.MATERIAL_TABLE_ID }}
MATERIAL_TABLE_KEY: ${{ secrets.MATERIAL_TABLE_KEY }}
REPLAIN_CHAT_ID: ${{ secrets.REPLAIN_CHAT_ID }}
COCKPIT_TOKEN: ${{ secrets.COCKPIT_TOKEN }}
TOKEN: ${{ secrets.PAT_TOKEN }}
NPM_CONFIG_USERCONFIG: ./npmrc
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Run npm preparation script
run: npm install

- name: Generate job
run: npm run generate

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: public
path: public

deploy:
runs-on: ubuntu-latest
needs: [build]
if: contains( github.ref, 'master')
steps:
- uses: actions/[email protected]
with:
name: public

- uses: kevinpainchaud/[email protected]
with:
ftp_host: ${{ secrets.FTP_SERVER }}
ftp_username: ${{ secrets.FTP_USERNAME }}
ftp_password: ${{ secrets.FTP_PASSWORD }}
local_source_dir: "./"
dist_target_dir: "./"
delete: "true"
other_flags: "--parallel=10"

deployNext:
runs-on: ubuntu-latest
needs: [build]
if: contains( github.ref, 'develop')
steps:
- uses: actions/[email protected]
with:
name: public

- uses: kevinpainchaud/[email protected]
with:
ftp_host: ${{ secrets.FTP_NEXT_SERVER }}
ftp_username: ${{ secrets.FTP_NEXT_USERNAME }}
ftp_password: ${{ secrets.FTP_NEXT_PASSWORD }}
local_source_dir: "./"
dist_target_dir: "./"
delete: "true"
other_flags: "--parallel=10"
2 changes: 1 addition & 1 deletion components/TrustCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class TrustCard extends Vue{
private async getHomeData () {
let response = await fetch(`https://api.stereotech.org/api/collections/page/entries/a2701ab7-b60d-461f-bc13-3bb0422393d3`, {
let response = await fetch(`${process.env.API_STATAMIC}/collections/page/entries/a2701ab7-b60d-461f-bc13-3bb0422393d3`, {
method: 'get',
headers: { 'Content-Type': 'application/json' }
})
Expand Down
2 changes: 1 addition & 1 deletion components/printers/ServiceBenefits.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class ServiceBenefits extends Vue{
title: string = ''
private async getServiceBenefits(){
let response = await fetch(`https://api.stereotech.org/api/collections/serviceBenefits/entries`,{
let response = await fetch(`${process.env.API_STATAMIC}/collections/serviceBenefits/entries`,{
method: 'get',
headers: { 'Content-Type': 'application/json' }
})
Expand Down
67 changes: 0 additions & 67 deletions components/reselling/QuoteForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
:rules="nameRules"
></v-text-field>
</v-col>
<!-- <v-autocomplete
outlined
v-model="country"
:items="countries"
item-text="country"
:label="this.$tc('Страна')"
></v-autocomplete> -->
<v-col cols="12">
<v-text-field
outlined
Expand Down Expand Up @@ -93,8 +86,6 @@
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'
import DialogForm from '~/components/DialogForm.vue'
import gql from 'graphql-tag'
import { MegaplanApi } from '~/types/megaplan/base'
@Component({
components: {
Expand Down Expand Up @@ -124,7 +115,6 @@ export default class QuoteForm extends Vue {
subscribe: boolean = true
subscribeStr: string = ''
//countries: any[] = require('country-json/src/country-by-name.json')
get interests (): string[] {
return [
this.$tc('Серия Hybrid'),
Expand Down Expand Up @@ -198,63 +188,6 @@ export default class QuoteForm extends Vue {
}
}
private async submit () {
let name = this.dealers ? 'Запрос дилерства' : 'Запрос предложения'
name += ': ' + new Date().toString() + ' Обращение от ' + this.name
const email = this.email
const description = this.joinFormData
await this.$apollo.mutate({
mutation: gql`mutation ($name: String!, $email: String!, $description: String!)
{
contactus(name: $name, email: $email, enquiry: $description)
}`,
variables: {
name: name,
email: email,
description: description
}
})
try {
//@ts-ignore
let megaplan = new MegaplanApi()
await megaplan.authenticate()
let company: any = null
let isCompany = false
let clientId = ''
if (this.companyName && this.companyName !== '') {
company = await megaplan.createCompany(this.companyName, this.description)
}
let contact = await megaplan.createClient(this.name, this.phone, this.email, company ? company.id : '', this.description)
if (company) {
isCompany = true
clientId = company.id
} else {
clientId = contact.id
}
let callToDo = await megaplan.createCallToDo(isCompany, clientId)
let emailToDo = await megaplan.createEmailToDo(isCompany, clientId)
this.snackbarText = this.$tc('Ваш запрос успешно отправлен!')
this.snackbarError = false
this.snackbar = true
this.name = ""
this.phone = ""
this.email = ""
this.companyName = ""
this.interestIn = []
this.subscribe = true
this.dialog = false
} catch (error) {
this.snackbarText = this.$tc('Произошла ошибка при отправке формы, ') + error
this.snackbarError = true
this.snackbar = true
}
}
}
</script>
Expand Down
6 changes: 3 additions & 3 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export default class Layout extends Vue {
private async getLayoutData() {
let response = await fetch(`https://api.stereotech.org/api/collections/page/entries/78f5a59a-e1d5-4f36-9c92-270401431a64`, {
let response = await fetch(`${process.env.API_STATAMIC}/collections/page/entries/78f5a59a-e1d5-4f36-9c92-270401431a64`, {
method: 'get',
headers: { 'Content-Type': 'application/json' }
})
Expand Down Expand Up @@ -518,7 +518,7 @@ export default class Layout extends Vue {
return item
}
let response = await fetch(`https://api.stereotech.org/api/navs/main_nav/tree`, {
let response = await fetch(`${process.env.API_STATAMIC}/navs/main_nav/tree`, {
method: 'get',
headers: { 'Content-Type': 'application/json' }
})
Expand All @@ -532,7 +532,7 @@ export default class Layout extends Vue {
return navDelUndef(item)
})
response = await fetch(`https://api.stereotech.org/api/collections/page/entries/a2701ab7-b60d-461f-bc13-3bb0422393d3`, {
response = await fetch(`${process.env.API_STATAMIC}/collections/page/entries/a2701ab7-b60d-461f-bc13-3bb0422393d3`, {
method: 'get',
headers: { 'Content-Type': 'application/json' }
})
Expand Down
35 changes: 13 additions & 22 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ru from 'vuetify/src/locale/ru'
const locale = process.env.NUXT_ENV_LOCALE || 'ru'
const domain = process.env.NUXT_ENV_DOMAIN || 'https://5dtech.pro'
const rootPath = process.env.NUXT_ENV_ROOT || '/'
const apolloUri = 'https://api.ste3d.ru/index.php?route=api/graphql/usage'

const config: NuxtConfig = {
target: 'static',
Expand Down Expand Up @@ -62,25 +61,23 @@ const config: NuxtConfig = {
** Nuxt.js modules
*/
modules: [
//'@nuxtjs/pwa',
//'@nuxtjs/google-analytics',
// [
// '@nuxtjs/yandex-metrika',
// {
// id: '54147616',
// webvisor: true
// }
// ],
'@nuxtjs/pwa',
'@nuxtjs/google-analytics',
[
'@nuxtjs/yandex-metrika',
{
id: '54147616',
webvisor: true
}
],
['vue-yandex-maps/nuxt', {
apiKey: process.env.API_KEY,
lang: 'ru_RU',
version: '2.1'
}],
// '@nuxtjs/sitemap',
// '@nuxtjs/robots',
'@nuxtjs/apollo',
// '@nuxtjs/recaptcha',
//'@nuxt/content',
'@nuxtjs/sitemap',
'@nuxtjs/robots',
'@nuxtjs/recaptcha',
'@nuxtjs/i18n'
],
content: {
Expand Down Expand Up @@ -112,13 +109,6 @@ const config: NuxtConfig = {
langDir: 'locales/',
defaultLocale: locale,
},
apollo: {
clientConfigs: {
default: {
httpEndpoint: apolloUri
},
}
},
env: {
LOCALE: locale,
DOMAIN: domain,
Expand All @@ -129,6 +119,7 @@ const config: NuxtConfig = {
SECURE_TOKEN: process.env.SECURE_TOKEN || '',
YANDEX_VER: process.env.YANDEX_VER || '',
API_KEY: process.env.API_KEY || '',
API_STATAMIC: process.env.API_STATAMIC || '',
SITE_KEY: process.env.SITE_KEY || '',
BITRIX_SEC: process.env.BITRIX_SEC || '',
MATERIAL_TABLE_ID: process.env.MATERIAL_TABLE_ID || '',
Expand Down
Loading

0 comments on commit 626dc4b

Please sign in to comment.