From f0cd287f9ad2b6dd3b763973e97234bdf856c8dd 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, 23 Sep 2025 14:49:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9C=AA=E8=AE=80=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=8A=9F=E8=83=BD):=20=E5=B0=87=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E8=AE=80=E6=B6=88=E6=81=AF=E7=9A=84API?= =?UTF-8?q?=E5=87=BD=E6=95=B8=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=A6=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=AC=AC=E4=BA=8C=E5=80=8B=E6=B8=85=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E8=AE=80=E6=B6=88=E6=81=AF=E7=9A=84API=EF=BC=8C=E5=84=AA?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A2=BC=E7=B5=90=E6=A7=8B=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E5=8D=87=E5=8F=AF=E8=AE=80=E6=80=A7=E5=92=8C=E7=B6=AD=E8=AD=B7?= =?UTF-8?q?=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Touchkebao/src/pages/pc/ckbox/api.ts | 5 ++++- Touchkebao/src/store/module/weChat/weChat.ts | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Touchkebao/src/pages/pc/ckbox/api.ts b/Touchkebao/src/pages/pc/ckbox/api.ts index 37e77637b..e812f56e7 100644 --- a/Touchkebao/src/pages/pc/ckbox/api.ts +++ b/Touchkebao/src/pages/pc/ckbox/api.ts @@ -19,9 +19,12 @@ export function WechatGroup(params) { } //获取聊天记录-1 清除未读 -export function clearUnreadCount(params) { +export function clearUnreadCount1(params) { return request("/v1/kefu/message/readMessage", params, "GET"); } +export function clearUnreadCount2(params) { + return request2("/api/WechatFriend/clearUnreadCount", params, "PUT"); +} //更新配置 export function updateConfig(params) { diff --git a/Touchkebao/src/store/module/weChat/weChat.ts b/Touchkebao/src/store/module/weChat/weChat.ts index 49515aca8..49e4fc072 100644 --- a/Touchkebao/src/store/module/weChat/weChat.ts +++ b/Touchkebao/src/store/module/weChat/weChat.ts @@ -11,7 +11,11 @@ import { likeListItem, CommentItem, } from "@/pages/pc/ckbox/weChat/components/SidebarMenu/FriendsCicle/index.data"; -import { clearUnreadCount, updateConfig } from "@/pages/pc/ckbox/api"; +import { + clearUnreadCount1, + clearUnreadCount2, + updateConfig, +} from "@/pages/pc/ckbox/api"; import { ChatRecord, ContractData, weChatGroup } from "@/pages/pc/ckbox/data"; import { weChatGroupService, contractService } from "@/utils/db"; import { @@ -150,7 +154,8 @@ export const useWeChatStore = create()( params.wechatChatroomId = contract.id; } - clearUnreadCount(params); + clearUnreadCount1(params); + clearUnreadCount2([contract.id]); if (isExist) { updateChatSession({ ...contract,