修复登录后首页入口跳转问题

This commit is contained in:
andy
2026-07-10 10:28:04 +08:00
parent 25efcccf72
commit 9de4f0e7b6
8 changed files with 132 additions and 20 deletions

View File

@@ -155,6 +155,7 @@ import type { AuthMenuResult } from '@/types/auth'
import { fetchBackendHealth } from '@/services/healthService'
import { useAppPreferencesStore, type SupportedLocale } from '@/stores/appPreferences'
import { useAuthStore } from '@/stores/authStore'
import { resolveAuthenticatedEntryPath } from '@/utils/authNavigation'
const route = useRoute()
const router = useRouter()
@@ -176,7 +177,7 @@ const menuLabelKeys: Record<string, string> = {
}
const navItems = computed(() => authStore.visibleMenus)
const brandTarget = computed(() => authStore.firstMenuPath ?? '/reservation/orders')
const brandTarget = computed(() => resolveAuthenticatedEntryPath(authStore.firstMenuPath))
const currentUserLabel = computed(() => authStore.user?.display_name || authStore.user?.username || '-')
const currentHotelLabel = computed(() => {
const hotel = authStore.selectedHotel