菜单布局等初步完成

This commit is contained in:
2025-10-08 14:11:54 +08:00
parent d9ea2e842b
commit 4bc587ecf5
29 changed files with 4472 additions and 11977 deletions

View File

@@ -141,12 +141,12 @@ const handleLogin = async () => {
loginLoading.value = true;
// 调用store中的登录action
await store.dispatch('auth/login', loginForm);
const result = await store.dispatch('auth/login', loginForm);
ElMessage.success('登录成功!');
// 获取重定向路径
const redirectPath = (route.query.redirect as string) || '/dashboard';
// 优先使用 query 中的 redirect其次使用返回的 redirectUrl最后使用默认首页
const redirectPath = (route.query.redirect as string) || result.redirectUrl || '/home';
router.push(redirectPath);
} catch (error: any) {