| | |
| | | // 引入全局样式 |
| | | 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) { |
| | |
| | | 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 |