优化代客下单选择用户重复连接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 });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -81,10 +81,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group" v-if="isXianFuKuan">
|
||||
<el-button type="primary" size="large" :disabled="!carts.isLinkFinshed" @click="createOrder('wx-aiplay')">
|
||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('wx-aiplay')">
|
||||
微信/支付宝
|
||||
</el-button>
|
||||
<el-button type="primary" size="large" :disabled="!carts.isLinkFinshed" @click="createOrder('cash')">
|
||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('cash')">
|
||||
现金
|
||||
</el-button>
|
||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('more-pay')">
|
||||
|
||||
Reference in New Issue
Block a user