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,