调整前端user-connected

This commit is contained in:
CakeCN
2026-01-08 21:01:11 +08:00
parent 75795dd853
commit e698c50a4b
2 changed files with 4 additions and 2 deletions

View File

@@ -80,10 +80,11 @@ document.addEventListener('DOMContentLoaded', function () {
// 初始化聊天消息管理器
chatManager = new ChatMessageManager();
socket.on('connect', function () {
socket.on('user-connected', function (data) {
console.log('Connected to server');
socket.emit('login',JSON.stringify(data));
})
socket.on('connect', function () {
});
socket.on('open-iframe', function(data) {
OpenIframe();