/* eslint-disable import/no-duplicates */
// 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 store from '@/store'
import VueCookie from 'vue-cookie'
import ElementUI from 'element-ui'
import '@/icons'
import '@/element-ui-theme'
import '@/assets/scss/index.scss'
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
import { isAuth } from '@/utils'
import { getSysParam } from '@/utils'
import { getSysParamArr } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
import BaiduMap from 'vue-baidu-map'

Vue.use(ElementUI)
Vue.use(VueCookie)
Vue.config.productionTip = false
// 挂载全局
Vue.prototype.$http = httpRequest // Ajax 请求方法
Vue.prototype.isAuth = isAuth // 权限方法chromechrome
Vue.prototype.getSysParam = getSysParam // 获取参数
Vue.prototype.getSysParamArr = getSysParamArr // 获取参数列表

Vue.use(BaiduMap, {
  ak: 'If7QqndLdjnAYkFrF98Ux4ozwDZWNNCv'
})

// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
