This commit is contained in:
yj 2024-07-15 10:02:50 +08:00
parent b4e92c0004
commit 621731828e
2 changed files with 6 additions and 3 deletions

View File

@ -290,7 +290,9 @@ const Meeting: React.FC = () => {
})
}
} else if (e.key === 'isRemotJoin') {
getRoomUser()
setTimeout(() => {
getRoomUser()
}, 1000)
}
};
return (

View File

@ -17,7 +17,8 @@ export const startSignalr = () => {
}
export const onSignalr = (callBack: Function) => {
connection.on("GetUserId", (message: any) => {
connection.on("sendChannelMsg", (message: any) => {
console.log(message);
callBack(message)
});
}
@ -27,7 +28,7 @@ export const onInvoke = (str: string, data: any) => {
case 'levelChannel':
connection.invoke(str, data.roomNum)
break;
case 'senChannelMsg':
case 'sendChannelMsg':
connection.invoke(str, data.roomNum, data.msg)
break;
}