From d0f4c2d4bb7a72b32fb9945de8908e1d4ab6509c Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期五, 06 六月 2025 14:13:58 +0800
Subject: [PATCH] 提交

---
 management/src/components/RightContent/AvatarDropdown.tsx |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/management/src/components/RightContent/AvatarDropdown.tsx b/management/src/components/RightContent/AvatarDropdown.tsx
index f552bf0..5992bda 100644
--- a/management/src/components/RightContent/AvatarDropdown.tsx
+++ b/management/src/components/RightContent/AvatarDropdown.tsx
@@ -16,6 +16,7 @@
   // 
 
   const { currentUser } = initialState || {};
+  console.log('currentUser currentUser currentUser currentUser',currentUser)
   return <span className="anticon">{currentUser?.userName || '超级管理员'}</span>;
 };
 
@@ -24,6 +25,7 @@
   const { initialState, setInitialState } = useModel('@@initialState');
 
   const [unreadCount, setUnreadCount] = useState(0);
+  const { currentUser } = initialState || {};
   useEffect(() => {
     // const timer = setInterval(() => {
     //   getUnreadCount().then((res: any) => {
@@ -53,6 +55,7 @@
         <div style={{ border: '1px solid red', borderRadius: '50%', width: '18px', lineHeight: '16px', marginLeft: '5px', textAlign: 'center', color: 'red', flexShrink: 0 }}>{unreadCount}</div>
       </div>
     }
+    <div style={{ marginRight: '25px' }} >{currentUser?.userName || '超级管理员'}</div>
     <div className="logoOut" onClick={onMenuClick}>退出登录<LogoutOutlined style={{ marginLeft: '5px' }} /></div>
   </div>
 };

--
Gitblit v1.7.1