Browse Source

更新 路由

wzh 3 năm trước cách đây
mục cha
commit
9ea9d2aca0
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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();