From b3f6d4f6e7e42bc30dc5e9a15424f40ecf06ce3f 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, 2 Sep 2025 14:26:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(websocket):=20=E7=A7=BB=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84seq=E5=AD=97=E6=AE=B5=E5=B9=B6=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=9C=A8=E5=91=BD=E4=BB=A4=E4=B8=AD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在websocket命令构造中统一添加seq字段,避免在调用处重复设置。移除ckbox页面中重复的seq设置,保持代码一致性。 --- Cunkebao/src/pages/pc/ckbox/index.tsx | 1 - Cunkebao/src/store/module/websocket/websocket.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Cunkebao/src/pages/pc/ckbox/index.tsx b/Cunkebao/src/pages/pc/ckbox/index.tsx index 69a69ee8..b0112675 100644 --- a/Cunkebao/src/pages/pc/ckbox/index.tsx +++ b/Cunkebao/src/pages/pc/ckbox/index.tsx @@ -37,7 +37,6 @@ const CkboxPage: React.FC = () => { setInterval(() => { sendCommand("CmdRequestWechatAccountsAliveStatus", { wechatAccountIds: kfUserList.map(v => v.id), - seq: +new Date(), }); }, 10 * 1000); } diff --git a/Cunkebao/src/store/module/websocket/websocket.ts b/Cunkebao/src/store/module/websocket/websocket.ts index 34e39846..ebfe53a2 100644 --- a/Cunkebao/src/store/module/websocket/websocket.ts +++ b/Cunkebao/src/store/module/websocket/websocket.ts @@ -233,6 +233,7 @@ export const useWebSocketStore = createPersistStore( const command = { cmdType, ...data, + seq: +new Date(), }; try {