feat: 代客下单更新

This commit is contained in:
2025-03-04 18:05:21 +08:00
parent cff5363260
commit 833676f545
24 changed files with 307 additions and 116 deletions

View File

@@ -24,12 +24,13 @@ export type msgType = 'add' | 'reduce' | 'remove' | 'edit' | 'init' | 'cleanup'
class WebSocketManager {
private client: WebSocket | null = null;
private connected: boolean = false;
private shop_id = user.userInfo.shopId ? String(user.userInfo.shopId) : '';
private initParams: ApifoxModel = {
type: 'manage',
account: `${user.userInfo.shopId}`,
account: this.shop_id,
operate_type: 'init',
table_code: '',
shop_id: `${user.userInfo.shopId}`,
shop_id: this.shop_id,
};
private onMessage: (message: any) => void = function () { };
private messageHandlers: Map<string, ((message: string) => void)[]> = new Map();