From af4f45eaa2703ecf991bd10f07f6df179f2677d9 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 十一月 2025 10:04:45 +0800
Subject: [PATCH] Merge branch 'refs/heads/yyb'

---
 src/utils/cache.ts |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/utils/cache.ts b/src/utils/cache.ts
index 93b1a42..ed9ab16 100644
--- a/src/utils/cache.ts
+++ b/src/utils/cache.ts
@@ -1,6 +1,7 @@
 const TOKEN_KEY = "app-token";
 const USER_INFO_KEY = "user-info";
 const DICT_KEY = "dict";
+const TEAM_ID_KEY = "team-id";
 import { type DictData } from "@/api/system/dict";
 
 // 璁剧疆 token
@@ -48,9 +49,25 @@
   uni.removeStorageSync(DICT_KEY);
 }
 
+// 璁剧疆鐝粍ID
+export function setTeamId(teamId: string | number) {
+  uni.setStorageSync(TEAM_ID_KEY, teamId);
+}
+
+// 鑾峰彇鐝粍ID
+export function getTeamId(): string | number | null {
+  return uni.getStorageSync(TEAM_ID_KEY) || null;
+}
+
+// 娓呴櫎鐝粍ID
+export function clearTeamId() {
+  uni.removeStorageSync(TEAM_ID_KEY);
+}
+
 // 娓呴櫎鎵�鏈夌紦瀛樹俊鎭�
 export function clearAll() {
   clearToken();
   clearUserInfo();
   clearDictCache();
+  clearTeamId();
 }

--
Gitblit v1.9.3