Explorar o código

更新 路由

wzh %!s(int64=3) %!d(string=hai) anos
pai
achega
9ea9d2aca0
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/main.js

+ 5 - 1
src/main.js

@@ -42,7 +42,11 @@ router.beforeEach(async (to, from, next) => {
           next("/index");
           next("/index");
         }
         }
       } else {
       } else {
-        next();
+        if (to.path == "/") {
+          next("/index");
+        } else {
+          next();
+        }
       }
       }
     } else {
     } else {
       next();
       next();