123456789101112131415161718192021222324252627282930313233343536373839
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import App from './App'
  5. import 'regenerator-runtime/runtime'
  6. import 'swiper/swiper-bundle.css'
  7. import { Login, redirect } from './utils/initial'
  8. import store from './store';//状态管理
  9. import router from './router'
  10. import Swiper from './components/Swiper'
  11. import SwiperSlide from './components/SwiperSlide'
  12. import { Popup, Picker, Area } from 'vant';
  13. Vue.use(Popup);
  14. Vue.use(Picker);
  15. Vue.use(Area);
  16. Vue.config.productionTip = false
  17. Vue.component('swiper', Swiper)
  18. Vue.component('swiper-slide', SwiperSlide)
  19. /* eslint-disable no-new */
  20. redirect()
  21. Login().then(e => {
  22. new Vue({
  23. router,
  24. store,
  25. render: h => h(App),
  26. }).$mount('#app')
  27. }).catch(e => {
  28. console.error(e)
  29. // alert('系统错误, 请刷新重试')
  30. // 重试一次
  31. redirect(true)
  32. })