From 4157b22112dd8d87e907d9cb6d14f74b5d454b7a Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期三, 23 七月 2025 16:59:09 +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