diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index f7828da..8afd4bf 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -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 }); + } } }); } diff --git a/src/views/tool/Instead/components/carts/list.vue b/src/views/tool/Instead/components/carts/list.vue index 94e4941..344df35 100644 --- a/src/views/tool/Instead/components/carts/list.vue +++ b/src/views/tool/Instead/components/carts/list.vue @@ -81,10 +81,10 @@
- + 微信/支付宝 - + 现金