From 3d98c2cf38b4966f3532887188ff6c43d704702b Mon Sep 17 00:00:00 2001 From: zhengw <247276359@qq.com> Date: Mon, 24 Apr 2023 15:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91:=20=E7=BE=A4=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=94=B9=E4=B8=BA=E9=9A=90=E8=97=8F=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ChatLogs/components/ChatVote.tsx | 4 +- src/pages/ChatLogs/index.tsx | 204 +++++++++++---------- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/src/pages/ChatLogs/components/ChatVote.tsx b/src/pages/ChatLogs/components/ChatVote.tsx index bfb98e6..53408c4 100644 --- a/src/pages/ChatLogs/components/ChatVote.tsx +++ b/src/pages/ChatLogs/components/ChatVote.tsx @@ -36,9 +36,7 @@ export const ChatVote: React.FC = (props) => {
{msg?.voteitem[item]}
- ) : ( - <> - ); + ) : null; }) : null} diff --git a/src/pages/ChatLogs/index.tsx b/src/pages/ChatLogs/index.tsx index bb813b2..8a5c07a 100644 --- a/src/pages/ChatLogs/index.tsx +++ b/src/pages/ChatLogs/index.tsx @@ -343,105 +343,6 @@ const ChatLogs: React.FC = () => { return 0; }; - // const { notification } = App.useApp(); - const tabContent = () => { - if (tabKey == '0') { - // 内部联系人 - return ( - - {innerStaffsList.length - ? innerStaffsList.map((item) => { - if (item.user_id == selectStaff?.user_id) { - return null; - } - return ( -
{ - tabKeyRef.current = tabKey; - - setSelectCustFollow(undefined); - selectCustFollowRef.current = undefined; - setSelectGroup(undefined); - selectGroupRef.current = undefined; - - setSelectInnerStaff(item); - selectInnerStaffRef.current = item; - page(1); - }} - style={{ display: item.name.includes(searchWord['0']) ? '' : 'none' }} - > -
- {item.avatar ? ( - - ) : ( - <>{item.name[0]} - )} -
-
-
- {item.name} -
-
-
- ); - }) - : null} -
- {checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''} -
-
- ); - } else if (tabKey == '1') { - return ( - - {custFollowsList.length - ? custFollowsList.map((item, i) => { - return item.state == 0 ? null : custFollowsListItem(item, i); - }) - : null} -
- {checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''} -
-
- ); - } else { - return ( - - { - tabKeyRef.current = tabKey; - setSelectCustFollow(undefined); - selectCustFollowRef.current = undefined; - setSelectInnerStaff(undefined); - selectInnerStaffRef.current = undefined; - setSelectGroup(item); - selectGroupRef.current = item; - selectGroupRef.current.adminUserIDs = getAdminList(item.admin_list); - getGroupMembersList(); - }} - selectGroup={selectGroup} - /> - - ); - } - }; - // 删除的联系人/群 const tabContentDel = () => { if (tabKey == '0') { @@ -479,6 +380,108 @@ const ChatLogs: React.FC = () => { } }; + // const { notification } = App.useApp(); + const tabContent = () => { + //
{tabContent()}
+ + return ( + <> + {/* 内部联系人 */} +
+ + {innerStaffsList.length + ? innerStaffsList.map((item) => { + if (item.user_id == selectStaff?.user_id) { + return null; + } + return ( +
{ + tabKeyRef.current = tabKey; + + setSelectCustFollow(undefined); + selectCustFollowRef.current = undefined; + setSelectGroup(undefined); + selectGroupRef.current = undefined; + + setSelectInnerStaff(item); + selectInnerStaffRef.current = item; + page(1); + }} + style={{ display: item.name.includes(searchWord['0']) ? '' : 'none' }} + > +
+ {item.avatar ? ( + + ) : ( + <>{item.name[0]} + )} +
+
+
+ {item.name} +
+
+
+ ); + }) + : null} +
+ {checkInnerIsEmpty() == 0 ? '暂无内部联系人' : ''} +
+
+
+
+ + {custFollowsList.length + ? custFollowsList.map((item, i) => { + return item.state == 0 ? null : custFollowsListItem(item, i); + }) + : null} +
+ {checkCustFollowsIsEmpty(1) == 0 ? '暂无外部联系人' : ''} +
+
+
+ {tabContentDel()} +
+ + { + tabKeyRef.current = tabKey; + setSelectCustFollow(undefined); + selectCustFollowRef.current = undefined; + setSelectInnerStaff(undefined); + selectInnerStaffRef.current = undefined; + setSelectGroup(item); + selectGroupRef.current = item; + selectGroupRef.current.adminUserIDs = getAdminList(item.admin_list); + getGroupMembersList(); + }} + selectGroup={selectGroup} + /> + +
+ + ); + }; + return (
@@ -610,8 +613,7 @@ const ChatLogs: React.FC = () => { // } }} /> -
{tabContent()}
- {tabContentDel()} + {tabContent()}