申请发言优化

This commit is contained in:
yj 2024-08-22 17:59:22 +08:00
parent beb847d262
commit 4c51e3d03e
1 changed files with 23 additions and 2 deletions

View File

@ -29,6 +29,7 @@ const Meeting: React.FC = () => {
const sharedFilesModelRef = useRef<any>(); const sharedFilesModelRef = useRef<any>();
const invitingPersonnelRef = useRef<any>(); const invitingPersonnelRef = useRef<any>();
const stupWizardRef = useRef<any>(); const stupWizardRef = useRef<any>();
const [isClicked, setIsClicked] = useState(false);
const [statusList, setStatusList] = useState({ const [statusList, setStatusList] = useState({
userList: false, userList: false,
userChatList: false, userChatList: false,
@ -150,7 +151,7 @@ const Meeting: React.FC = () => {
let userInfo = JSON.parse(storage.getItem('user') as string) let userInfo = JSON.parse(storage.getItem('user') as string)
const msgTips = '您不是管理员或发言人,无法开启此功能!' const msgTips = '您不是管理员或发言人,无法开启此功能!'
useEffect(() => { useEffect(() => {
let time = null as any; let time: NodeJS.Timeout;
setUser(userInfo) setUser(userInfo)
setTimeout(() => { setTimeout(() => {
if (location.hash.indexOf('/login') === -1) { if (location.hash.indexOf('/login') === -1) {
@ -472,6 +473,17 @@ const Meeting: React.FC = () => {
}; };
}, [recorder]) }, [recorder])
useEffect(() => {
let timer: NodeJS.Timeout;
if (isClicked) {
timer = setTimeout(() => {
setIsClicked(false);
}, 10000);
}
return () => clearTimeout(timer);
}, [isClicked]);
const changeAgoraDevice = () => { const changeAgoraDevice = () => {
setRoomUserList((res: any) => { setRoomUserList((res: any) => {
res.forEach(async (item: any) => { res.forEach(async (item: any) => {
@ -851,7 +863,16 @@ const Meeting: React.FC = () => {
sharedFilesModelRef.current.getData() sharedFilesModelRef.current.getData()
break; break;
case '申请发言': case '申请发言':
GetApplySpeak(state.channelId) if (!isClicked) {
setIsClicked(true);
GetApplySpeak(state.channelId).then(res => {
if (res.code === 200) {
message.success('申请发言成功')
}
})
} else {
message.error('申请已提交,请勿重复点击!');
}
break; break;
case '会议监控': case '会议监控':
window.electron.oepnWindow({ window.electron.oepnWindow({