feat:增加切换租户的功能

This commit is contained in:
YunaiV
2025-05-05 17:02:48 +08:00
parent 2765c4adde
commit c6898c0a99
6 changed files with 83 additions and 4 deletions

View File

@ -67,6 +67,14 @@ export const getTenantId = () => {
return wsCache.get(CACHE_KEY.TenantId)
}
export const setTenantId = (username: string) => {
wsCache.set(CACHE_KEY.TenantId, username)
export const setTenantId = (tenantId: number) => {
wsCache.set(CACHE_KEY.TenantId, tenantId)
}
export const getVisitTenantId = () => {
return wsCache.get(CACHE_KEY.VisitTenantId)
}
export const setVisitTenantId = (visitTenantId: number) => {
wsCache.set(CACHE_KEY.VisitTenantId, visitTenantId)
}