Blame view

src/main.js 1.25 KB
a72ae217   王富生   第一次提交
1
2
3
4
5
6
  import Vue from 'vue'
  
  import 'normalize.css/normalize.css' // A modern alternative to CSS resets
  
  import ElementUI from 'element-ui'
  import 'element-ui/lib/theme-chalk/index.css'
9287779a   Andy   add 官网嵌入车主平台 架构
7
  // import locale from 'element-ui/lib/locale/lang/en' // lang i18n
a72ae217   王富生   第一次提交
8
9
10
11
12
13
  
  import '@/styles/index.scss' // global css
  
  import App from './App'
  import store from './store'
  import router from './router'
ea291b39   王富生   提交登陆
14
  import * as filters from './filters' // global filters
a72ae217   王富生   第一次提交
15
16
17
18
19
20
21
22
23
24
25
26
  
  import '@/icons' // icon
  import '@/permission' // permission control
  
  /**
   * If you don't want to use mock-server
   * you want to use MockJs for mock api
   * you can execute: mockXHR()
   *
   * Currently MockJs will be used in the production environment,
   * please remove it before going online! ! !
   */
9804b54b   王富生   提交登陆
27
28
29
30
  // import { mockXHR } from '../mock'
  // if (process.env.NODE_ENV === 'production') {
  //   mockXHR()
  // }
a72ae217   王富生   第一次提交
31
  
ea291b39   王富生   提交登陆
32
33
34
35
  // register global utility filters
  Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
  })
a72ae217   王富生   第一次提交
36
  // set ElementUI lang to EN
9287779a   Andy   add 官网嵌入车主平台 架构
37
  Vue.use(ElementUI)
a72ae217   王富生   第一次提交
38
39
40
41
42
43
44
45
  
  Vue.config.productionTip = false
  
  new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
632e7d4d   Andy   add 官网浏览网站统计
46
47
48
49
50
51
52
53
54
55
56
  });
  
  // 加入百度统计
  router.beforeEach((to, from, next) => {
    if (to.path) {
      if (window._hmt) {
        window._hmt.push(['_trackPageview', '/#' + to.fullPath])
      }
    }
    next()
  });