From e87cadb2f2fb287b400414e418bd0ab105bd971a Mon Sep 17 00:00:00 2001 From: yangzhe Date: Fri, 5 Dec 2025 11:10:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E5=91=BD=E5=90=8DuserId?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=BAId=E5=B9=B6=E6=B7=BB=E5=8A=A0WebSock?= =?UTF-8?q?et=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/App.vue b/App.vue index fcef6e6..7eb0a2f 100644 --- a/App.vue +++ b/App.vue @@ -172,9 +172,9 @@ export default { buildWsUrl() { const protocol = window.location.protocol.indexOf("https") === 0 ? "wss" : "ws"; - const userId = + const Id = (this.vuex_user && (this.vuex_user.id || this.vuex_user.Id)) || ""; - return `${protocol}://120.55.234.65:8082/api/Dialogue/HandleConnection?Id=${userId}`; // &equipmentType=0 + return `${protocol}://120.55.234.65:8082/api/Dialogue/HandleConnection?Id=${Id}`; // &equipmentType=0 }, // 初始化原生 WebSocket 连接 initWebSocket() { @@ -308,6 +308,8 @@ export default { }, // 连接错误 handleWsError(e) { + console.log("[WebSocket] 连接错误:", e); + this.lockReconnect = false; this.reconnect(); },