main.js
1.54 KB
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
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from './util/http'
import store from './store/index.js'
import * as API from './util/api'
import { faceapi } from './util/initApi'
import './util/vproto'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'babel-polyfill'
import './util/permission'
import '../src/assets/css/public.css'
import selecttree from './views/public/selecttree'
import './assets/icon/iconfont.css'
//---图片放大
import VuePhotoZoomPro from 'vue-photo-zoom-pro'
//---视频播放
import VideoPlayer from 'vue-video-player'
import { Loading } from 'element-ui'
import echarts from 'echarts'
import common from './util/common.js'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)
//---视频播放end
Vue.config.productionTip = false
Vue.prototype.axios = axios;
Vue.prototype.API = API;
Vue.prototype.common = common;
Vue.use(ElementUI);
Vue.use(selecttree);
//--图片放大
Vue.use(VuePhotoZoomPro)
Vue.use(Loading)
Vue.prototype.loading = Loading;
Vue.prototype.$echarts = echarts;
Vue.prototype.faceapi = faceapi;
let localRoutes = localStorage.getItem('menuArr');
if(localRoutes){
store.dispatch("GetMenuRole", JSON.parse(localRoutes))
.then(res => {});
}
let vue = new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
})