diff --git a/web/src/request/api.ts b/web/src/request/api.ts index 16caf4e0d24b44eb9a6ff39e349ac14e17425075..06b8642312b2d72edda736672c32adffdbc0f774 100755 --- a/web/src/request/api.ts +++ b/web/src/request/api.ts @@ -59,7 +59,7 @@ export function getCustomTopo(data: { id: number }) { return request({ url: baseURL+'/api/run_custom_topo', method: 'get', - params: data + params: {...data,'clientId':`${parseInt(Math.random() * 1000 + '')}`} }) } diff --git a/web/src/utils/socket.ts b/web/src/utils/socket.ts index f45ca1aa4d43b8f22c41517efbdd0f19b4011bf0..080d74f2ee6848111a456afceea291339d9346b6 100644 --- a/web/src/utils/socket.ts +++ b/web/src/utils/socket.ts @@ -21,7 +21,7 @@ interface socket { const socket: socket = { websocket: null, - connectURL: 'wss://10.41.107.29:8888/plugin/ws/logs', + connectURL: `wss://10.41.107.29:8888/plugin/ws/logs?clientId=${parseInt(Math.random() * 1000 + '')}`, // 开启标识 socket_open: false, // 心跳timer diff --git a/web/src/views/topoLogs/logStream_plugin.vue b/web/src/views/topoLogs/logStream_plugin.vue index 8498e7d9efbde7499dafb7bb114b482611ff9ce3..4ba157046466bee143a3d3ee1ca9aa27ed6e5d5c 100644 --- a/web/src/views/topoLogs/logStream_plugin.vue +++ b/web/src/views/topoLogs/logStream_plugin.vue @@ -234,8 +234,7 @@ const openRealTimeLog = (state: boolean) => { const log_size = ref(0); let is_continue = ref(true); const load = () => { - if (total_logs.value !== 0 && !is_continue.value) return; - console.log("滑动到底部可发起请求", total_logs.value, log_size.value); + if (total_logs.value !== 0 || !is_continue.value) return; if (log_size.value >= total_logs.value) { log_size.value = total_logs.value; is_continue.value = false;