refactor(tenant): refine menu scope boundaries and document plan/tenant menu design

This commit is contained in:
Ray.Hao
2026-01-25 11:15:59 +08:00
parent 3879105e15
commit 3f8393813b
20 changed files with 959 additions and 158 deletions

16
src/utils/tenant.ts Normal file
View File

@@ -0,0 +1,16 @@
import { appConfig } from "@/settings";
import { PLATFORM_TENANT_ID } from "@/constants";
/**
* 是否启用多租户
*/
export const isTenantEnabled = () => appConfig.tenantEnabled;
/**
* 判断是否平台租户
*
* @description
* 平台租户不参与套餐与菜单配置
*/
export const isPlatformTenantId = (tenantId?: string | number) =>
Number(tenantId) === PLATFORM_TENANT_ID;