From 0863323c8d89742f90c10fc6ea0c1435fd69f58f Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期三, 11 一月 2023 15:12:52 +0800 Subject: [PATCH] 2023/1/11 肖辉 首页图标修改 UI样式修改 --- src/main.js | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/main.js b/src/main.js index 44c454e..5c21072 100644 --- a/src/main.js +++ b/src/main.js @@ -9,15 +9,29 @@ 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 axios from "axios" -Vue.prototype.$axios=axios -console.log(process.env.VUE_APP_BASE_API); -Vue.use(ElementUI) +import '@/styles/index.scss' +import api from "./utils/request" +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