From 4d75f39fca8c6afbe8a120a329af8b2a59a1cd61 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期四, 24 七月 2025 17:28:41 +0800 Subject: [PATCH] ‘项目管理页面布局’ --- src/utils/auth.ts | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/utils/auth.ts b/src/utils/auth.ts index fd8a4cc..37cda2f 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -115,6 +115,18 @@ } } +export function setEnterpriseInfo(data: DataInfo<Date>) { + useUserStoreHook().SET_ENTERPRISEINFO(data); + useUserStoreHook().SET_USERNAME(data.enterpriseName); + storageLocal().setItem("enterpriseInfo", data); + const obj = storageLocal().getItem(userKey); + obj.username = data.enterpriseName; + storageLocal().setItem(userKey, obj); +} +export function removeEnterpriseInfo() { + storageLocal().removeItem("enterpriseInfo"); +} + /** 鍒犻櫎`token`浠ュ強key鍊间负`user-info`鐨刲ocalStorage淇℃伅 */ export function removeToken() { Cookies.remove(TokenKey); -- Gitblit v1.9.1