diff --git a/src/pages/InterestGroup/GroupItem.jsx b/src/pages/InterestGroup/GroupItem.jsx
index 736f88d..ea2253f 100644
--- a/src/pages/InterestGroup/GroupItem.jsx
+++ b/src/pages/InterestGroup/GroupItem.jsx
@@ -1,97 +1,3 @@
-// import React, { useState, useEffect } from 'react';
-// import { useGroupStore } from '../../context/useGroupStore';
-// import { useUser } from '../../context/UserContext';
-// import CreatePostForm from './CreatePostForm';
-// import axios from 'axios'; // 新增
-
-// const GroupItem = ({ group }) => {
-//   const { handleJoinGroup, joinStatus, setJoinStatus } = useGroupStore(); // 假设你有 setJoinStatus 方法
-//   const { user } = useUser();
-
-//   const userId = user?.userId;
-//   const groupId = group.groupId;
-
-//   const [isMember, setIsMember] = useState(false);
-
-//   useEffect(() => {
-//     setIsMember(joinStatus[groupId] === '加入成功');
-//   }, [joinStatus, groupId]);
-
-//   const [showCreatePost, setShowCreatePost] = useState(false);
-
-//   // 退出小组函数（新增）
-//   const handleLeaveGroup = async () => {
-//     try {
-//       const res = await axios.post(`/echo/groups/${groupId}/leave`, {
-//         user_id: userId,
-//       });
-//       if (res.data.status === 'success') {
-//         setJoinStatus(groupId, '未加入'); // 更新全局状态（需确保 useGroupStore 中有此方法）
-//         setIsMember(false); // 本地状态也更新
-//       } else {
-//         alert(res.data.message || '退出失败');
-//       }
-//     } catch (error) {
-//       console.error('退出小组失败:', error);
-//       alert('退出小组失败');
-//     }
-//   };
-
-//   return (
-//     <div className="group-item">
-//       <div className="group-content">
-//         <img
-//           style={{ width: '40%', height: '40%' }}
-//           src={group.coverImage || 'https://picsum.photos/200/200'}
-//           alt={group.groupName}
-//           className="group-cover"
-//         />
-//         <div className="group-info-right">
-//           <h3>{group.groupName}</h3>
-//           <p style={{ color: '#BA929A' }}>{group.memberCount || 0}人加入了小组</p>
-
-//           {/* 加入/退出按钮逻辑 */}
-//           {userId && (
-//             <button
-//               onClick={() => {
-//                 if (isMember) {
-//                   handleLeaveGroup(); // 已加入 -> 退出
-//                 } else {
-//                   handleJoinGroup(groupId, userId); // 未加入 -> 加入
-//                 }
-//               }}
-//             >
-//               {isMember ? '退出小组' : '+加入小组'}
-//             </button>
-//           )}
-//           {!userId && <button disabled>请登录</button>}
-
-//           {/* 发布帖子按钮 */}
-//           {userId && isMember && (
-//             <button onClick={() => setShowCreatePost(!showCreatePost)}>
-//               +发布帖子
-//             </button>
-//           )}
-//         </div>
-//       </div>
-
-//       <div className="group-description">
-//         <p>{group.description}</p>
-//       </div>
-//       <p>分类：{group.category}</p>
-
-//       {showCreatePost && (
-//         <CreatePostForm 
-//           groupId={groupId}
-//           onClose={() => setShowCreatePost(false)}
-//         />
-//       )}
-//     </div>
-//   );
-// };
-
-// export default GroupItem;
-
 import React, { useState, useEffect } from 'react';
 import { useGroupStore } from '../../context/useGroupStore';
 import { useUser } from '../../context/UserContext';
@@ -99,7 +5,7 @@
 import axios from 'axios';
 
 const GroupItem = ({ group }) => {
-  const { handleJoinGroup, joinStatus, setJoinStatus } = useGroupStore();
+  const { handleJoinGroup, joinStatus, setJoinStatus,fetchGroupList } = useGroupStore();
   const { user } = useUser();
 
   const userId = user?.userId;
@@ -126,7 +32,8 @@
     try {
       const res = await axios.get(`/echo/groups/${groupId}/members`);
       const isMember = res.data.members.some(member => member.user_id === userId);
-      setJoinStatus(groupId, isMember ? '加入成功' : '未加入');
+      setIsMember(isMember);
+      // setJoinStatus(groupId, isMember ? '加入成功' : '未加入');
     } catch (error) {
       console.error('检查成员状态失败:', error);
     }
@@ -141,7 +48,8 @@
         user_id: userId,
       });
       if (res.data.status === 'success') {
-        setJoinStatus(groupId, '未加入');
+          fetchGroupList(); // 刷新小组列表
+        // setJoinStatus(groupId, '未加入');
         setIsMember(false);
         // 可选：刷新小组成员计数
         group.memberCount = (group.memberCount || 0) - 1;
