fix: 修复无消费权限闪屏

This commit is contained in:
hh
2026-07-15 15:13:21 +08:00
parent 92fa85ef8c
commit 4358f7809a
2 changed files with 16 additions and 4 deletions
+7
View File
@@ -61,6 +61,13 @@ export type NavigateFn = (page: Page, options?: NavigateOptions) => void;
export type Notice = { type: "success" | "error" | "info"; text: string } | null;
export type NavItem = { page: Page; label: string; icon: typeof Home; badge?: string };
// 仅团队主账号可访问的团队级页面。入口与路由守卫共用此规则,避免权限逻辑分散。
const OWNER_ONLY_PAGES = new Set<Page>(["team", "account"]);
export function isOwnerOnlyPage(page: Page) {
return OWNER_ONLY_PAGES.has(page);
}
export const mainNav: NavItem[] = [
{ page: "dashboard", label: "工作台", icon: Home },
{ page: "products", label: "商品库", icon: Package },