fanghuisheng пре 3 година
родитељ
комит
68fe4bc5bc
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/main.js

+ 1 - 1
src/main.js

@@ -75,7 +75,7 @@ router.beforeEach((to, from, next) => {
     } else {
         document.getElementById('routers').style.display = "block"
         //路由的next必须存在,否则无法进入下一页
-        if (localStorage.getItem('accessToken') === null) {
+        if (localStorage.getItem('accessToken') != null) {
             next({ path: '/home' })
         } else {
             next()