diff --git a/src/permission.js b/src/permission.js index 9392fc4..9610584 100644 --- a/src/permission.js +++ b/src/permission.js @@ -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 {