feat: 修改登录页加入企业逻辑

This commit is contained in:
rd
2025-07-23 17:02:24 +08:00
parent 45e4da004d
commit 5525d28f2d
4 changed files with 29 additions and 8 deletions

View File

@ -18,9 +18,10 @@ export default function setupUserLoginInfoGuard(router: Router) {
const routeName = to?.name as string;
const requiresAuth = to?.meta?.requiresAuth || false;
const requireLogin = to?.meta?.requireLogin || false;
const query = to?.query ?? {};
if (requireLogin && !userStore.isLogin) {
goUserLogin();
goUserLogin(query);
next();
return;
}