| | |
| | | import App from "./App.vue"; |
| | | import router from "./router/page"; |
| | | import store from "./store"; |
| | | import * as echarts from "echarts"; |
| | | // import ElementUI from "element-ui"; |
| | | // import "element-ui/lib/theme-chalk/index.css"; |
| | | import "./styles/index.scss"; |
| | | import "font-awesome/css/font-awesome.min.css"; |
| | | import axios from "./router/axios"; |
| | |
| | | import "vant/lib/index.css"; |
| | | import { Picker } from 'vant'; |
| | | |
| | | |
| | | router.beforeEach((to, from, next) => { |
| | | if (to.meta.title) { |
| | | document.title = to.meta.title; |
| | |
| | | } |
| | | next(); |
| | | }); |
| | | |
| | | // import DC from "@dvgis/dc-sdk/dist/dc.base.min"; //基础包 |
| | | // import DcCore from "@dvgis/dc-sdk/dist/dc.core.min"; //核心包 |
| | | // import DcChart from "@dvgis/dc-sdk/dist/dc.chart.min"; //chart包 |
| | | // import DcMapv from "@dvgis/dc-sdk/dist/dc.mapv.min"; //mapv包 |
| | | // import DcS3M from "@dvgis/dc-sdk/dist/dc.s3m.min"; //s3m包 |
| | | // import "@dvgis/dc-sdk/dist/dc.core.min.css"; // 主要样式 |
| | | |
| | | // import * as turf from "@turf/turf"; |
| | | |
| | | // Vue.prototype.$echarts = echarts; |
| | | // Vue.prototype.$turf = turf; |
| | | |
| | | // global.DC = DC; |
| | | // global.DC; |
| | | // global.echarts = echarts; |
| | | // global.viewer = null; |
| | | // DC.use(DcCore); //安装DC核心库 |
| | | // DC.use(DcChart); //安装DC图标库,使用前确保echarts为全局函数 |
| | | // DC.use(DcMapv); //安装Mapv库 |
| | | // DC.use(DcS3M); //安装DcS3M库 |
| | | Vue.config.productionTip = false; |
| | | // Vue.use(ElementUI); |
| | | Vue.use(Vant); |
| | | Vue.use(Picker); |
| | | |
| | |
| | | store, |
| | | render: (h) => h(App), |
| | | }).$mount("#app"); |
| | | |
| | | // router.beforeEach((to, from, next) => { |
| | | // setInterval(() => { |
| | | // console.log('111') |
| | | // }, 1000); |
| | | // if (!localStorage.getItem('token')) { |
| | | // // Token不存在则重定向到登录页 |
| | | // next('/login'); |
| | | // } else { |
| | | // // Token存在则放行 |
| | | // next(); |
| | | // setInterval(() => { |
| | | // refreshToken(); |
| | | // }, 60 * 60 * 1000); // 每小时更新一次Token |
| | | // } |
| | | // }) |