fix(websocket): 移除重复的seq字段并统一在命令中添加
在websocket命令构造中统一添加seq字段,避免在调用处重复设置。移除ckbox页面中重复的seq设置,保持代码一致性。
This commit is contained in:
@@ -37,7 +37,6 @@ const CkboxPage: React.FC = () => {
|
|||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
sendCommand("CmdRequestWechatAccountsAliveStatus", {
|
sendCommand("CmdRequestWechatAccountsAliveStatus", {
|
||||||
wechatAccountIds: kfUserList.map(v => v.id),
|
wechatAccountIds: kfUserList.map(v => v.id),
|
||||||
seq: +new Date(),
|
|
||||||
});
|
});
|
||||||
}, 10 * 1000);
|
}, 10 * 1000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ export const useWebSocketStore = createPersistStore<WebSocketState>(
|
|||||||
const command = {
|
const command = {
|
||||||
cmdType,
|
cmdType,
|
||||||
...data,
|
...data,
|
||||||
|
seq: +new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user