From a17257382b733190906c8d485e9f6d176ffd60a3 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 14 八月 2026 11:48:31 +0800
Subject: [PATCH] Merge branch 'dev_pro2.0' of http://114.132.189.42:9002/r/mom-pro2-before into dev_pro2.0
---
src/views/im/utils/auth.ts | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/views/im/utils/auth.ts b/src/views/im/utils/auth.ts
new file mode 100644
index 0000000..188af5d
--- /dev/null
+++ b/src/views/im/utils/auth.ts
@@ -0,0 +1,14 @@
+import { useAccessStore, useUserStore } from '#/packages/stores/src'
+
+// TODO DONE @AI锛氬凡浣跨敤 Vben 鐨� useUserStore / useAccessStore 鑾峰彇鐧诲綍淇℃伅锛�
+
+/** 鑾峰彇褰撳墠鐢ㄦ埛缂栧彿 */
+export function getCurrentUserId(): number {
+ const userInfo = useUserStore().userInfo
+ return Number(userInfo?.id ?? userInfo?.userId ?? 0)
+}
+
+/** 鑾峰彇鍒锋柊浠ょ墝 */
+export function getRefreshToken(): null | string {
+ return useAccessStore().refreshToken
+}
--
Gitblit v1.9.3