From 4f9f4ed87f393f27a59d6e53acf6fba816a39fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Sat, 7 Jun 2025 21:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9d7526b..87cf1bc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,8 +25,8 @@ export default { return { // WebSocket相关 websocket: null, - websocketUrl: 'ws://10.42.0.1:7181/ws', - // websocketUrl: 'ws://119.45.202.115:7181/ws', + // websocketUrl: 'ws://10.42.0.1:7181/ws', + websocketUrl: 'ws://119.45.202.115:7181/ws', isWebSocketConnected: false, reconnectTimer: null, reconnectAttempts: 0, @@ -96,11 +96,11 @@ export default { onWebSocketMessage(event) { try { const data = JSON.parse(event.data, (key, value, ctx) => { - if (key === 'objid') { - console.log(value.toString()) + if (ctx) { + console.log('ctx', ctx) } if (typeof value === 'number' && value > Number.MAX_SAFE_INTEGER) { - return '' + value; + return ctx?.source || value; } return value; })