From c37af0f08dc0cdee582661d359abc78e7e805b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 11:24:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9tcp=E8=BF=9E=E6=8E=A5ip?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/tcpConnection.js | 4 ++-- pages/home/home.vue | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api/tcpConnection.js b/api/tcpConnection.js index f876ca3..a0306bf 100644 --- a/api/tcpConnection.js +++ b/api/tcpConnection.js @@ -11,8 +11,8 @@ // TCP连接配置 const TCP_CONFIG = { - ip: "39.102.136.61:8088", - port: "8080", + ip: "39.102.136.61", + port: "8088", channel: "1", // 可选 1~20 charsetname: "UTF-8", // 默认UTF-8,可选GBK }; diff --git a/pages/home/home.vue b/pages/home/home.vue index 2702bb5..9b935e5 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -396,7 +396,7 @@ export default { if (this.tcpConnected) { console.log('页面销毁,自动关闭主TCP连接') tcpConnection.disconnect({ - ip: '39.102.136.61:8088', + ip: '39.102.136.61', port: '8080', channel: '1', charsetname: 'UTF-8' @@ -408,8 +408,8 @@ export default { if (this.myStocksTcpConnected) { console.log('页面销毁,自动关闭我的自选TCP连接') tcpConnection.disconnect({ - ip: '39.102.136.61:8088', - port: '8080', + ip: '39.102.136.61', + port: '8088', channel: '2', charsetname: 'UTF-8' }) @@ -779,8 +779,8 @@ export default { // console.log('执行TCP连接...') tcpConnection.connect( { - ip: '39.102.136.61:8088', - port: '8080', + ip: '39.102.136.61', + port: '8088', channel: '1', // 可选 1~20 charsetname: 'UTF-8' // 默认UTF-8,可选GBK } @@ -792,8 +792,8 @@ export default { // console.log('断开TCP连接...') tcpConnection.disconnect( { - ip: '39.102.136.61:8088', - port: '8080', + ip: '39.102.136.61', + port: '8088', channel: '1', // 可选 1~20 charsetname: 'UTF-8' // 默认UTF-8,可选GBK } @@ -824,8 +824,8 @@ export default { console.log('执行我的自选TCP连接...') tcpConnection.connect( { - ip: '39.102.136.61:8088', - port: '8080', + ip: '39.102.136.61', + port: '8088', channel: '2', // 我的自选使用channel 2 charsetname: 'UTF-8' // 默认UTF-8,可选GBK } @@ -837,8 +837,8 @@ export default { console.log('断开我的自选TCP连接...') tcpConnection.disconnect( { - ip: '39.102.136.61:8088', - port: '8080', + ip: '39.102.136.61', + port: '8088', channel: '2', // 我的自选使用channel 2 charsetname: 'UTF-8' // 默认UTF-8,可选GBK }