This commit is contained in:
qiangyanwen 2022-12-13 17:35:56 +08:00
parent 5fcf4cd511
commit 99a550929b
1 changed files with 2 additions and 0 deletions

View File

@ -112,6 +112,7 @@ const disk = reactive({
}) })
function GetSytem(){ function GetSytem(){
console.log("开始连接websocket......")
const ws = new WebSocket("ws://127.0.0.1:8000/api/ws") const ws = new WebSocket("ws://127.0.0.1:8000/api/ws")
ws.onopen = function () { ws.send("")}; ws.onopen = function () { ws.send("")};
ws.onmessage = function (e){ ws.onmessage = function (e){
@ -153,6 +154,7 @@ function GetSytem(){
disk.data=data_array disk.data=data_array
} }
} }
</script> </script>