diff --git a/src/pages/componentDevelopment/componentTest/testInstance.tsx b/src/pages/componentDevelopment/componentTest/testInstance.tsx index b5e7c04..de1cca5 100644 --- a/src/pages/componentDevelopment/componentTest/testInstance.tsx +++ b/src/pages/componentDevelopment/componentTest/testInstance.tsx @@ -31,14 +31,17 @@ const TestInstance = ({ instance, parentId, onBack }: { instance: any; parentId: // WebSocket hook const { connect, disconnect, isConnected, sendMessage } = useWebSocket({ onOpen: () => { + console.log('链接成功'); setIsSocketConnected(true); addLog('连接信息:连接成功!'); }, onClose: () => { + console.log('链接关闭'); setIsSocketConnected(false); addLog('连接信息:连接已断开'); }, onError: () => { + console.log('链接错误'); addLog('连接错误:连接失败'); }, onMessage: (event) => { @@ -107,10 +110,10 @@ 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/wst/test-case/${instance.id}/${cryptoRandom()}`; + wsUrl = `ws://192.168.5.119/ws/v1/bpms-workbench/test-case/${instance.id}/${cryptoRandom()}`; } else { - wsUrl = `${protocol}//${host}/wst/test-case/${instance.id}/${cryptoRandom()}`; + wsUrl = `${protocol}//${host}/ws/v1/bpms-workbench/test-case/${instance.id}/${cryptoRandom()}`; } @@ -510,7 +513,7 @@ const TestInstance = ({ instance, parentId, onBack }: { instance: any; parentId: {logs.length === 0 ? (
暂无日志信息
-请点击"链接实例"按钮连接测试实例
+请点击"链接实例"按钮连接测试实例