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; })