From 4c2c3db0522b5aa05fef54f4d78870cbf9966e45 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:40:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=81=8A=E5=A4=A9=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0):=20=E4=BC=98=E5=8C=96=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E6=9C=AA=E8=AF=BB=E6=B6=88=E6=81=AF=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=92=8C=E4=BC=9A=E8=AF=9D=E6=9B=B4=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84=EF=BC=8C=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7=E5=92=8C=E7=BB=B4=E6=8A=A4=E6=80=A7?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Touchkebao/src/store/module/weChat/weChat.ts | 27 ++++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Touchkebao/src/store/module/weChat/weChat.ts b/Touchkebao/src/store/module/weChat/weChat.ts index 91bc8a062..49515aca8 100644 --- a/Touchkebao/src/store/module/weChat/weChat.ts +++ b/Touchkebao/src/store/module/weChat/weChat.ts @@ -150,22 +150,21 @@ export const useWeChatStore = create()( params.wechatChatroomId = contract.id; } - clearUnreadCount(params).then(() => { - if (isExist) { - updateChatSession({ - ...contract, - config: { unreadCount: 0 }, - }); - } else { - addChatSession(contract); - } - set({ currentContract: contract }); - updateConfig({ - id: contract.id, - config: { chat: true }, + clearUnreadCount(params); + if (isExist) { + updateChatSession({ + ...contract, + config: { unreadCount: 0 }, }); - state.loadChatMessages(true, 4704624000000); + } else { + addChatSession(contract); + } + set({ currentContract: contract }); + updateConfig({ + id: contract.id, + config: { chat: true }, }); + state.loadChatMessages(true, 4704624000000); }, // ==================== 消息加载方法 ====================