Explorar el Código

更新 路由

wzh hace 3 años
padre
commit
9ea9d2aca0
Se han modificado 1 ficheros con 5 adiciones y 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");
         }
       } else {
-        next();
+        if (to.path == "/") {
+          next("/index");
+        } else {
+          next();
+        }
       }
     } else {
       next();