Explorar el Código

优化关闭浏览器时重新打开未跳转登陆问题

xiaoshushu hace 4 años
padre
commit
d294ee8bd1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/router/index.js

+ 1 - 1
src/router/index.js

@@ -73,7 +73,7 @@ const router =  new Router({
 
 // vue  路由全局拦截器
 router.beforeEach(function (to, from, next) {
-  let token = localStorage.getItem('front-token')
+  let token = sessionStorage.getItem('entranceExamFlag')
   if (to.path === '/login') {
     if (token) {
       location.href = '/'