From 04189e12b9a167cde7544100951fa4c63a0f1a90 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 12 Jan 2026 16:00:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=B7=BB=E5=8A=A0Socket?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E9=85=8D=E7=BD=AE=E5=B9=B6=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E7=A1=AC=E7=BC=96=E7=A0=81=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 7 +++++++ .../componentDevelopment/componentTest/testInstance.tsx | 2 +- src/pages/ideContainer/index.tsx | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 29a8e20..0ab52bd 100644 --- a/.env +++ b/.env @@ -4,6 +4,10 @@ NEXT_PUBLIC_API_BASE_URL=/ # code-server服务地址 NEXT_PUBLIC_DEV_CODE_SERVER_HOST='http://192.168.5.119:8443' +# Socket链接 +NEXT_PUBLIC_DEV_SOCKET_HOST='ws://192.168.5.119' +#NEXT_PUBLIC_DEV_SOCKET_HOST='wss://p12.ngsk.tech:7001' + # 开发服务器主机地址 129穿透 #NEXT_PUBLIC_DEV_SERVER_HOST=https://p29.ngsk.tech:7001 @@ -13,6 +17,9 @@ NEXT_PUBLIC_DEV_CODE_SERVER_HOST='http://192.168.5.119:8443' # 开发环境-119 NEXT_PUBLIC_DEV_SERVER_HOST='http://192.168.5.119:80' +# p12 +#NEXT_PUBLIC_DEV_SERVER_HOST='https://p12.ngsk.tech:7001' + # 开发环境-158 #NEXT_PUBLIC_DEV_SERVER_HOST='http://192.168.5.158:80' diff --git a/src/pages/componentDevelopment/componentTest/testInstance.tsx b/src/pages/componentDevelopment/componentTest/testInstance.tsx index 4183535..0cffb53 100644 --- a/src/pages/componentDevelopment/componentTest/testInstance.tsx +++ b/src/pages/componentDevelopment/componentTest/testInstance.tsx @@ -110,7 +110,7 @@ const TestInstance = ({ instance, parentId, onBack }: { instance: any; parentId: const host = window.location.host; let wsUrl = ''; if (window.location.host.includes('localhost')) { - wsUrl = `ws://192.168.5.119/ws/v1/bpms-workbench/test-case/${instance.id}/${cryptoRandom()}`; + wsUrl = `${process.env.NEXT_PUBLIC_DEV_SOCKET_HOST}/ws/v1/bpms-workbench/test-case/${instance.id}/${cryptoRandom()}`; } else { wsUrl = `${protocol}//${host}/ws/v1/bpms-workbench/test-case/${instance.id}/${cryptoRandom()}`; diff --git a/src/pages/ideContainer/index.tsx b/src/pages/ideContainer/index.tsx index 1f21375..e090d88 100644 --- a/src/pages/ideContainer/index.tsx +++ b/src/pages/ideContainer/index.tsx @@ -202,7 +202,7 @@ function IDEContainer() { const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws'; let wsApi = `${protocol}://${window.location.host}/ws/v1/bpms-runtime`; if (window.location.host.includes('localhost')) { - wsApi = `ws://192.168.5.119/ws/v1/bpms-runtime`; + wsApi = `${process.env.NEXT_PUBLIC_DEV_SOCKET_HOST}/ws/v1/bpms-runtime`; } const uri = `${wsApi}?x-auth0-token=${token}`; ws.connect(uri); @@ -410,7 +410,6 @@ function IDEContainer() { dispatch(updateCurrentAppData({ ...menuItem })); - console.log("menuItem:",menuItem); if (menuItem) { setSelected({ ...menuItem,