Flavionel 5 年之前
父節點
當前提交
16cc95d703
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      resources/js/components/pages/MeetingsAppRoot.vue

+ 7 - 3
resources/js/components/pages/MeetingsAppRoot.vue

@@ -40,7 +40,7 @@ import SocketIO from "socket.io-client"
 
 Vue.use(
     new VueSocketIO({
-        debug: false,
+        debug: true,
         connection: SocketIO(process.env.MIX_SOCKET_SERVICE_URL)
     })
 )
@@ -106,8 +106,12 @@ export default {
 
         this.$store.commit('setLobbies', lobbies)
 
-        this.$socket.emit("lobbyDataRequest", (data) => {
-            console.log(data)
+        this.$socket.emit("lobbyDataRequest", lobbies)
+
+        this.sockets.subscribe('lobby-data', data => {
+            for (let meeting of data.meetings) {
+                this.$store.commit("setLobbyActivity", meeting);
+            }
         })
     }
 }