suerprisePlus
2024-11-27 ab8f3297f7c8243d486c9da0900e4f813b2ea2df
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>