From d942877495ceea1575e64fb6d4e2972f6da10cac Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期三, 11 一月 2023 10:09:24 +0800 Subject: [PATCH] 2023/1/11 肖辉 修改UI样式 --- src/main.js | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index f253456..5c21072 100644 --- a/src/main.js +++ b/src/main.js @@ -2,11 +2,36 @@ import App from './App.vue' import router from './router' import store from './store' - Vue.config.productionTip = false - +// 寮曞叆鏍峰紡娓呴櫎 +import 'normalize.css/normalize.css' +// 寮曞叆elementUI +import ElementUI from 'element-ui'; +import "element-ui/lib/theme-chalk/index.css"; +// 寮曞叆icons +import './assets/icons' +// 寮曞叆鍏ㄥ眬鏍峰紡 +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