This commit is contained in:
yj 2024-08-15 12:17:34 +08:00
parent d9c346f486
commit 8ef5988cea
1 changed files with 8 additions and 18 deletions

View File

@ -301,7 +301,11 @@ const Meeting: React.FC = () => {
break; break;
// 用户退出频道回调 // 用户退出频道回调
case 'UserLeave': case 'UserLeave':
setAllUserListData('UserLeave', item) if (item.uid === userInfo.uid) {
leaveChannel()
} else {
setAllUserListData('UserLeave', item)
}
break; break;
// 所有用户开闭麦 // 所有用户开闭麦
case 'OperAllMicr': case 'OperAllMicr':
@ -930,20 +934,13 @@ const Meeting: React.FC = () => {
setAllUserLook(item) setAllUserLook(item)
}} }}
>Ta</Button> : ''} >Ta</Button> : ''}
{item.uid !== user.uid ? <Button {item.uid !== user.uid && user.roleId === '1' ? <Button
type="primary" type="primary"
className='m-ant-btn' className='m-ant-btn'
size={'small'} size={'small'}
onClick={(event) => { onClick={(event) => {
event.stopPropagation(); event.stopPropagation();
GetRoomKickout(state.channelId, item.id).then(res => { GetRoomKickout(state.channelId, item.id)
if (res.code === 200) {
onInvoke('sendOper', {
roomNum: state.channelId,
type: 3,
})
}
})
}} }}
></Button> : null} ></Button> : null}
{item.uid !== user.uid && user.roleId === '1' ? <Button {item.uid !== user.uid && user.roleId === '1' ? <Button
@ -1143,14 +1140,7 @@ const Meeting: React.FC = () => {
style={{ width: '100%' }} style={{ width: '100%' }}
size={'small'} size={'small'}
onClick={() => { onClick={() => {
GetRoomKickout(state.channelId, item.id).then(res => { GetRoomKickout(state.channelId, item.id)
if (res.code === 200) {
onInvoke('sendOper', {
roomNum: state.channelId,
type: 3,
})
}
})
}} }}
></Button> ></Button>
</div> </div>