优化代客下单选择用户重复连接ws的问题
This commit is contained in:
@@ -841,8 +841,6 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
$initParams = initParams;
|
||||
}
|
||||
|
||||
|
||||
|
||||
concocatSocket($initParams);
|
||||
}
|
||||
|
||||
@@ -971,7 +969,12 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
|
||||
if (msg.operate_type === "bulk_edit") {
|
||||
msg.operate_type = 'manage_' + msg.operate_type;
|
||||
concocatSocket({ ...$initParams, table_code: table_code.value });
|
||||
console.log('WebSocketManager.connected===', WebSocketManager.connected);
|
||||
if (WebSocketManager.connected) {
|
||||
WebSocketManager.sendMessage({ ...$initParams, table_code: table_code.value })
|
||||
} else {
|
||||
concocatSocket({ ...$initParams, table_code: table_code.value });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user