From d24c9dde20cba23b96082b4db81b5223c75e4ea9 Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期三, 08 三月 2023 09:06:28 +0800 Subject: [PATCH] 身份证正反面调整 --- src/main.js | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main.js b/src/main.js index 9a5d68f..ed23992 100644 --- a/src/main.js +++ b/src/main.js @@ -9,15 +9,35 @@ import ElementUI from 'element-ui'; import "element-ui/lib/theme-chalk/index.css"; // 寮曞叆icons -import './assets/icons' +import './assets/icons' // 寮曞叆鍏ㄥ眬鏍峰紡 -import '@/styles/index.scss' +import '@/styles/index.scss' import api from "./utils/request" -Vue.prototype.$axios=api -console.log(process.env.VUE_APP_BASE_API); -Vue.use(ElementUI) + +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) { + const token = sessionStorage.getItem('token'); + const tokenHead = sessionStorage.getItem('tokenHead'); + if (token && tokenHead) { + next(); + } else { + router.push("/login"); + next(); + } + } else { + next(); + } +}) +Vue.use(ElementUI); new Vue({ router, store, render: h => h(App) }).$mount('#app') +// Vue.config.devtools=true \ No newline at end of file -- Gitblit v1.8.0