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,