import 'uno.css'
import Vue from 'vue'
import http from '@/http/index.js'
import App from './App.vue'
import router from './router'
import store from './store'
import vueParticles from 'vue-particles'
import Vcomp from './components/index'
import Toast from './components/toast'
import util from '@/util/index.js'

import '@/assets/styles/base.less'
import '@/assets/styles/common.less'
import '@/assets/iconfont/iconfont.css'
import '@/assets/icon2/font/iconfont.css'

Vue.use(http)
Vue.use(vueParticles)
Vue.use(Vcomp)

Vue.config.productionTip = false

Vue.prototype.$Toast = Toast
Vue.prototype.$util = util

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

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