odc.xiaohui
2023-03-08 d24c9dde20cba23b96082b4db81b5223c75e4ea9
src/main.js
@@ -13,6 +13,12 @@
// 引入全局样式
import '@/styles/index.scss'
import api from "./utils/request"
import 'leaflet.pm'
import 'leaflet.pm/dist/leaflet.pm.css'
import map from '@/utils/map'
Vue.prototype.$map = map
Vue.prototype.$axios = api
router.beforeEach((to, from, next) => {
  if (to.meta.needLogin) {
@@ -22,15 +28,16 @@
      next();
    } else {
      router.push("/login");
      next();
    }
  } else {
    next();
  }
})
// console.log(process.env.VUE_APP_BASE_API);
Vue.use(ElementUI);
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
// Vue.config.devtools=true