From afd3fe35aeaae4f3984c94ca29d57b5a3a52107f Mon Sep 17 00:00:00 2001
From: suerprisePlus <15810472099@163.com>
Date: 星期二, 15 十月 2024 10:24:39 +0800
Subject: [PATCH] websocket接口对接

---
 src/App.vue |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 055b6a9..7a2ca71 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -24,14 +24,27 @@
   },
   data() {
     return {
-     
+      wsSocket: null
     }
   },
   mounted() {
-  
+ 
   },
   methods: {
-  
+    createSocket() {
+      this.wsSocket = new WebSocket(config.pySocket);
+      this.wsSocket.onopen = (event) => {
+        console.log('WebSocket杩炴帴鎴愬姛');
+      };
+      this.wsSocket.onmessage = (event) => {
+
+        if (event.data != "杩炴帴鎴愬姛") {
+
+
+
+        }
+      };
+    }
   }
 };
 </script>

--
Gitblit v1.9.3