新增在线用户显示

This commit is contained in:
不做码农
2022-05-15 09:24:09 +08:00
parent 89b96a367e
commit b524672b05
4 changed files with 32 additions and 11 deletions
+6
View File
@@ -60,6 +60,7 @@ export default {
},
// 接收消息处理
receiveMsg(connection) {
console.log(connection)
connection.on("onlineNum", (data) => {
store.dispatch("socket/changeOnlineNum", data);
});
@@ -84,5 +85,10 @@ export default {
store.dispatch("socket/getNoticeList", data.data);
}
})
// 接收在线用户
connection.on("onlineUser", (data) => {
store.dispatch("socket/getOnlineUsers", data);
})
}
}