diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 40d852026..9b65d9ec2 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -13,6 +13,14 @@ router.beforeEach((to, from, next) => { axiosCanceler.removeAllPending(); const globalStore = GlobalStore(); + if (to.name === 'home' && !globalStore.isLogin) { + next({ + name: 'entrance', + params: { code: globalStore.entrance }, + }); + NProgress.done(); + return; + } if (to.name === 'entrance' && globalStore.isLogin) { if (to.params.code === globalStore.entrance) { next({