| | |
| | | 'lanIp' => '127.0.0.1', |
| | | 'startPort' => 2100, |
| | | 'daemonize' => false, |
| | | 'pidFile' => runtime_path() . 'business_gateway_worker.pid', |
| | | 'pingInterval' => 30, |
| | | 'pingNotResponseLimit' => 1, |
| | | 'pingData' => '', |
| | |
| | | 'count' => 1, |
| | | 'eventHandler' => '\app\gateway\BusinessEvents', |
| | | ], |
| | | |
| | | // Register配置pid文件 |
| | | 'registerPidFile' => runtime_path() . 'business_gateway_register.pid', |
| | | 'gatewayPidFile' => runtime_path() . 'business_gateway_gateway.pid', |
| | | 'businessWorkerPidFile' => runtime_path() . 'business_gateway_business.pid', |
| | | |
| | | ]; |
| | |
| | | 'lanIp' => '127.0.0.1', |
| | | 'startPort' => 2000, |
| | | 'daemonize' => false, |
| | | 'pidFile' => runtime_path() . 'gateway_worker.pid', |
| | | 'pingInterval' => 30, |
| | | 'pingNotResponseLimit' => 1, |
| | | 'pingData' => '', |
| | |
| | | 'eventHandler' => '\app\gateway\Events', |
| | | ], |
| | | |
| | | // Register配置pid文件 |
| | | 'registerPidFile' => runtime_path() . 'gateway_register.pid', |
| | | 'gatewayPidFile' => runtime_path() . 'gateway_gateway.pid', |
| | | 'businessWorkerPidFile' => runtime_path() . 'gateway_business.pid', |
| | | |
| | | ]; |
| | |
| | | }, res => { |
| | | this.conversationId = res.data.conversation.conversation_id; |
| | | this.loadMessages(); |
| | | this.wsUrl = res.data.wsUrl; |
| | | this.wsUrl = 'wss://www.lblmh.com'//res.data.wsUrl; |
| | | // 初始化WebSocket连接 |
| | | this.initWebSocket(); |
| | | }); |
| | |
| | | const currentUserId = this.currentUser.user_id; |
| | | |
| | | // 构建WebSocket连接URL - 使用名片聊天专用端口2349 |
| | | const wsUrl = `${this.wsUrl}:2349?user_id=${currentUserId}&usertype=supplier `; |
| | | const wsUrl = `wss://www.lblmh.com/business?user_id=${currentUserId}&usertype=supplier`; |
| | | try { |
| | | // 创建WebSocket连接 |
| | | this.socketTask = uni.connectSocket({ |
| | | url: wsUrl, |
| | | success: () => {}, |
| | | fail: (err) => { |
| | | console.log(err); |
| | | console.log(wsUrl); |
| | | // 尝试重连 |
| | | this.reconnectWebSocket(); |
| | | } |