import Vue from vue import plugins vuetify import axios from axios imp

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
import Vue from "vue"
import "./plugins/vuetify"
import axios from 'axios'
import App from "./App.vue"
import router from "./router"
import store from "./store"
import Vuetify from "vuetify"
import { Ripple } from 'vuetify/lib/directives'
import Datetime from 'vue-datetime'
import { Settings } from 'luxon'
Settings.defaultLocale = 'ru'
import 'vue-datetime/dist/vue-datetime.css'
// ГЛОБАЛЬНО ПЕРЕД КАЖДЫМ ЗАПРОСОМ ПРОВЕРЯЕТ И УСТАНАВЛИВАЕТ -HEADERS-
import interceptorsSetup from './config/helpers'
//LODASH
import _ from 'lodash'
// validation form
import validation from './config/validation'
// import Inputmask from "inputmask"
//Russian lang
import ru from 'vuetify/es5/locale/ru'
//Theme color config
import './layout/main.sass'
import theme from './theme'
import VueTimeago from 'vue-timeago'
import YmapPlugin from 'vue-yandex-maps'
const options = { // you may define your apiKey, lang and version or skip this.
apiKey: '', // '' by default
lang: 'ru_RU', // 'ru_RU' by default
version: '2.1' // '2.1' by default
}
// GLOBAL BEGIN
window.axios = axios
Vue.prototype.$http = axios
// GLOBAL END
// export const token = localStorage.getItem('user-token')
// DatetimePicker
Vue.use(Datetime)
// Yandex Map
Vue.use(YmapPlugin, options)
// Vuetify plugin
Vue.use(Vuetify, {
theme,
lang: {
locales: { ru },
current: 'ru'
},
directives: {
Ripple
}
}
)
Vue.use(VueTimeago, {
name: 'Timeago',
locale: 'ru',
locales: {
'ru': require('date-fns/locale/ru'),
}
})
Vue.use(require('vue-pusher'), {
api_key: 'ca0dfb0e9ae661662cb7',
options: {
cluster: 'eu',
encrypted: true,
}
}
)
// ГЛОБАЛЬНО ПЕРЕД КАЖДЫМ ЗАПРОСОМ ПРОВЕРЯЕТ И УСТАНАВЛИВАЕТ -HEADERS-
interceptorsSetup()
Vue.config.productionTip = false
Vue.prototype.$daDataToken = '439a7b87779b53e5b1d4de5fd040affb98fba1de'
// Vue.filter('phonemask', function (phone) {
// if(phone.test(/[^0-9]/g)) {
// return phone.replace(/[^0-9]/g)
// }
// })
// export const token = localStorage.getItem('user-token')
// if (token) {
// axios.defaults.headers.common['Authorization'] = token
// }
new Vue({
router,
store,
render: h => h(App),
}).$mount("#app")