Parcourir la source

优化进入login页面后依然可以回退到页面的问题1

zhangliang2 il y a 2 ans
Parent
commit
e2a2cd9b38
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/router/filter.js

+ 2 - 2
src/router/filter.js

@@ -37,8 +37,8 @@ router.beforeEach((to, from, next) => {
             if (localStorage.getItem('Authorization')) {
                 next();
             } else {
-                // next(false);
-                return false
+                next(false);
+                // return false
             }
         } else {
             next();