|
|
|
@ -11,10 +11,10 @@ import NProgress from "nprogress"
|
|
|
|
|
import "nprogress/nprogress.css"
|
|
|
|
|
|
|
|
|
|
const whitePath = ['/', '/login', '/industryDataExport','/index']
|
|
|
|
|
const token = sessionStorage.getItem('token');
|
|
|
|
|
// console.log(token)
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
|
|
NProgress.start()
|
|
|
|
|
const token = sessionStorage.getItem('token');
|
|
|
|
|
if(!token && !whitePath.includes(to.path)) {
|
|
|
|
|
next('/login');
|
|
|
|
|
} else {
|
|
|
|
|