优化代客下单选择用户重复连接ws的问题
This commit is contained in:
@@ -841,8 +841,6 @@ export const useCartsStore = defineStore("carts", () => {
|
|||||||
$initParams = initParams;
|
$initParams = initParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
concocatSocket($initParams);
|
concocatSocket($initParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -971,7 +969,12 @@ export const useCartsStore = defineStore("carts", () => {
|
|||||||
|
|
||||||
if (msg.operate_type === "bulk_edit") {
|
if (msg.operate_type === "bulk_edit") {
|
||||||
msg.operate_type = 'manage_' + msg.operate_type;
|
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>
|
</div>
|
||||||
<div class="btn-group" v-if="isXianFuKuan">
|
<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>
|
||||||
<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>
|
||||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('more-pay')">
|
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('more-pay')">
|
||||||
|
|||||||
Reference in New Issue
Block a user