|
@@ -1,19 +1,19 @@
|
|
|
-/**
|
|
|
- * 获取用户信息的方法
|
|
|
- */
|
|
|
-export const getUserInfo = () => {
|
|
|
- // const { wsCache } = useCache()
|
|
|
- // const userInfo = wsCache.get(CACHE_KEY.USER)
|
|
|
- // 先模拟数据
|
|
|
- const userInfo = {
|
|
|
- id: "ea81aaf2-74fe-429f-acaa-25a9a898abcf",
|
|
|
- nickname: "管理源",
|
|
|
- avatar:
|
|
|
- "https://static-legacy.dingtalk.com/media/lQLPM44eP2eGrFfNAxjNAxiwthCI7LPuiz0FRw-0RwC5AA_792_792.png",
|
|
|
- deptId: "264",
|
|
|
- deptName: "数智产业研发部",
|
|
|
- };
|
|
|
- // 从localStorage中获取用户信息并返回
|
|
|
- return userInfo;
|
|
|
- return JSON.parse(localStorage.getItem("_userInfo") as string);
|
|
|
-};
|
|
|
+/**
|
|
|
+ * 获取用户信息的方法
|
|
|
+ */
|
|
|
+export const getUserInfo = () => {
|
|
|
+ // const { wsCache } = useCache()
|
|
|
+ // const userInfo = wsCache.get(CACHE_KEY.USER)
|
|
|
+ // 先模拟数据
|
|
|
+ const userInfo = {
|
|
|
+ id: "ea81aaf2-74fe-429f-acaa-25a9a898abcf",
|
|
|
+ nickname: "管理源",
|
|
|
+ avatar:
|
|
|
+ "https://static-legacy.dingtalk.com/media/lQLPM44eP2eGrFfNAxjNAxiwthCI7LPuiz0FRw-0RwC5AA_792_792.png",
|
|
|
+ deptId: "264",
|
|
|
+ deptName: "数智产业研发部",
|
|
|
+ };
|
|
|
+ // 从localStorage中获取用户信息并返回
|
|
|
+ // return userInfo;
|
|
|
+ return JSON.parse(localStorage.getItem("_userInfo") as string);
|
|
|
+};
|