mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-12 07:33:17 +03:30
fix
This commit is contained in:
+58
-2
@@ -1,8 +1,64 @@
|
||||
import Vue from 'vue'
|
||||
import 'font-awesome/css/font-awesome.min.css'
|
||||
import Vue from 'vue';
|
||||
// import vuetify from '@/plugins/vuetify'
|
||||
|
||||
// Components
|
||||
import './components'
|
||||
|
||||
// Plugins
|
||||
import './plugins';
|
||||
|
||||
// Config
|
||||
import { baseUrl } from './config';
|
||||
|
||||
// Material FontIcon
|
||||
import 'material-design-icons-iconfont/dist/material-design-icons.css'
|
||||
// Fortawesome
|
||||
import '@fortawesome/fontawesome-free/css/all.css'
|
||||
// Styles
|
||||
import '@/styles/css/Assets/Main.scss';
|
||||
|
||||
// Sync router with store
|
||||
import { sync } from 'vuex-router-sync'
|
||||
// Application imports
|
||||
import App from './App.vue'
|
||||
import i18n from '@/i18n'
|
||||
import router from '@/router'
|
||||
import store from '@/store'
|
||||
import VueLazyLoad from 'vue-lazyload';
|
||||
Vue.use(VueLazyLoad)
|
||||
import { ApiService, TokenService } from '@/services'
|
||||
// Sync store with router
|
||||
sync(store, router)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
ApiService.setHeader();
|
||||
// Set the base URL of the API
|
||||
ApiService.init(baseUrl())
|
||||
|
||||
require('./services/global/errorHandler.service');
|
||||
// If token exists set Authorizion header
|
||||
if (TokenService.getToken()) {
|
||||
ApiService.setAuthHeader();
|
||||
|
||||
// If info exists set info in Store
|
||||
if (TokenService.getInfo()) {
|
||||
let info = TokenService.getInfo();
|
||||
store.commit('setInfo', info);
|
||||
} else {
|
||||
store.dispatch('info');
|
||||
}
|
||||
}
|
||||
|
||||
import hasRole from '@/services/mixin/hasRole'
|
||||
Vue.mixin(hasRole)
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
// vuetify,
|
||||
i18n,
|
||||
router,
|
||||
store,
|
||||
render: h => h(App),
|
||||
}).$mount('#app')
|
||||
iconfont: 'fa4'
|
||||
}).$mount('#app');
|
||||
|
||||
Reference in New Issue
Block a user