This commit is contained in:
yj 2024-07-15 17:36:51 +08:00
parent 5d79891e7d
commit 403a90f016
2 changed files with 13 additions and 13 deletions

View File

@ -166,7 +166,6 @@ const Meeting: React.FC = () => {
getRoomUser() getRoomUser()
break; break;
} }
}) })
}, []) }, [])

View File

@ -17,18 +17,19 @@ export const startSignalr = () => {
} }
export const onSignalr = (callBack: Function) => { export const onSignalr = (callBack: Function) => {
connection.on("ReceiveMessage", (uid: string, userName: string, message: string) => { if (connection){
callBack({ connection.on("ReceiveMessage", (uid: string, userName: string, message: string) => {
key:'ReceiveMessage', callBack({
uid, message, userName key:'ReceiveMessage',
}) uid, message, userName
}); })
connection.on("RefreshUserList", () => { });
callBack({ connection.on("RefreshUserList", () => {
key: 'ReceiveMessage' callBack({
}) key: 'ReceiveMessage'
}); })
});
}
} }
export const onInvoke = async (str: string, data: any) => { export const onInvoke = async (str: string, data: any) => {
switch (str) { switch (str) {