import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { longtap } from './utils/directive'
import './assets/reset.css'
import './assets/index.scss'
import './utils/vant.js'
import moment from 'moment'
import 'moment/locale/zh-cn'
import * as filters from '@/utils/filters' // 过滤器
import VueBMap from 'vue-bmap-gl'

Vue.use(VueBMap)
VueBMap.initBMapApiLoader({
  ak: 'Zvd6FzmertUwjhZih5Zfq0D8uTUhvqsH',
  v: '1.0'
})
Vue.prototype.$moment = moment

Vue.config.productionTip = false
Vue.use(longtap)

// 加载全局过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// 动画过度效果
/* window.addEventListener('popstate', function (e) {
  router.isBack = true
}, false) */

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
