From 811ebff52f3cbc87fa0f5048416e08ec02e3fd04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Tue, 14 Oct 2025 18:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AF=BC=E8=88=AA=E7=BB=84=E4=BB=B6=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=92=8C=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=BE=AE=E4=BF=A1=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A7=BB=E9=99=A4ProfileCard?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84=E8=B0=83=E8=AF=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pc/ckbox/components/NavCommon/index.tsx | 28 ++++++++++------- Touchkebao/src/pages/pc/ckbox/data.ts | 2 ++ .../powerCenter/content-management/index.tsx | 31 +------------------ .../components/ProfileCard/index.tsx | 1 - .../src/pages/pc/ckbox/weChat/index.tsx | 6 ++-- 5 files changed, 23 insertions(+), 45 deletions(-) diff --git a/Touchkebao/src/pages/pc/ckbox/components/NavCommon/index.tsx b/Touchkebao/src/pages/pc/ckbox/components/NavCommon/index.tsx index 8c7f13ad..dedc91e3 100644 --- a/Touchkebao/src/pages/pc/ckbox/components/NavCommon/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/components/NavCommon/index.tsx @@ -16,7 +16,8 @@ import { LogoutOutlined, ThunderboltOutlined, SettingOutlined, - WechatOutlined, + CalendarOutlined, + RetweetOutlined, } from "@ant-design/icons"; import { noticeList, readMessage, readAll } from "./api"; import { useUserStore } from "@/store/module/user"; @@ -64,8 +65,8 @@ const NavCommon: React.FC = ({ title = "触客宝" }) => { }, []); // 处理菜单图标点击:在两个路由之间切换 - const handleMenuClick = (index: number) => { - if (index === 0) { + const handleMenuClick = () => { + if (!location.pathname.startsWith("/pc/powerCenter")) { navigate("/pc/powerCenter"); } else { navigate("/pc/weChat"); @@ -205,24 +206,27 @@ const NavCommon: React.FC = ({ title = "触客宝" }) => { onClick: handleLogout, }, ]; - + const handleContentManagementClick = () => { + navigate("/pc/powerCenter/content-management"); + }; return ( <>
+ {title}
diff --git a/Touchkebao/src/pages/pc/ckbox/data.ts b/Touchkebao/src/pages/pc/ckbox/data.ts index 13403280..b0861eeb 100644 --- a/Touchkebao/src/pages/pc/ckbox/data.ts +++ b/Touchkebao/src/pages/pc/ckbox/data.ts @@ -82,6 +82,8 @@ export interface KfUserListData { labels: string[]; lastUpdateTime: string; isOnline?: boolean; + momentsMax: number; + momentsNum: number; [key: string]: any; } diff --git a/Touchkebao/src/pages/pc/ckbox/powerCenter/content-management/index.tsx b/Touchkebao/src/pages/pc/ckbox/powerCenter/content-management/index.tsx index ead8b0bc..144c04ae 100644 --- a/Touchkebao/src/pages/pc/ckbox/powerCenter/content-management/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/powerCenter/content-management/index.tsx @@ -30,19 +30,6 @@ const ContentManagement: React.FC = () => { { key: "keyword", label: "关键词回复" }, ]; - // 按钮点击处理函数 - const handleAddMaterial = () => { - setMaterialModalVisible(true); - }; - - const handleAddSensitiveWord = () => { - setSensitiveWordModalVisible(true); - }; - - const handleAddKeyword = () => { - setKeywordModalVisible(true); - }; - // 弹窗成功回调 const handleModalSuccess = () => { console.log("handleModalSuccess"); @@ -94,23 +81,7 @@ const ContentManagement: React.FC = () => { subtitle="可以讲聊天过程的信息收录到素材库中,也调用。" showBackButton={true} backButtonText="返回功能中心" - rightContent={ -
- - - -
- } + rightContent={
} />
diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx index e52479a3..d738db4b 100644 --- a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/ProfileCard/index.tsx @@ -16,7 +16,6 @@ interface PersonProps { const Person: React.FC = ({ contract }) => { const [activeKey, setActiveKey] = useState("profile"); const isGroup = "chatroomId" in contract; - console.log(contract); return ( { // 不要在组件初始化时获取sendCommand,而是在需要时动态获取 const [loading, setLoading] = useState(false); const currentContract = useWeChatStore(state => state.currentContract); useEffect(() => { // 方法一:使用 Promise 链式调用处理异步函数 - setLoading(true); + if (!getIsLoadWeChat()) { + setLoading(true); + } chatInitAPIdata() .then(() => { // 数据加载完成后初始化WebSocket连接