Browse Source

修复编程课注册页路由始终允许访问

liyanbo 4 tuần trước cách đây
mục cha
commit
c0315e869d
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/router/index.js

+ 5 - 1
src/router/index.js

@@ -247,7 +247,11 @@ const router = createRouter({
 // 导航守卫
 router.beforeEach(async (to, from, next) => {
   // 注册页面始终允许访问,不需要登录状态
-  if ( ['/register-login', '/register', '/quick-login', '/promotion-login'].includes(to.path)) {
+  if ( ['/register-login',
+    '/register',
+    '/blockly-register',
+    '/quick-login',
+    '/promotion-login'].includes(to.path)) {
     next()
     return
   }