yangjie #36

Merged
yangqiang merged 7 commits from yangjie into master 2024-11-14 10:57:31 +08:00
2 changed files with 16 additions and 15 deletions
Showing only changes of commit abfad93e59 - Show all commits

View File

@ -6,7 +6,6 @@ import { useState, useImperativeHandle, forwardRef } from "react";
const SingIn = forwardRef((props: any, ref: any) => {
useImperativeHandle(ref, () => ({
changeModal: () => {
setSingInModal(true)
getRoomSingnIn()
},
getModal: () => {
@ -23,6 +22,9 @@ const SingIn = forwardRef((props: any, ref: any) => {
const getRoomSingnIn = async (): Promise<void> => {
await GetRoomSingnIn().then(res => {
if (res.code === 200) {
if (res.data.length) {
setSingInModal(true)
}
setSingInList(res.data.map((item: any) => {
return {
...item,

View File

@ -418,6 +418,15 @@ const Meeting: React.FC = () => {
firstFooterList[0][1].title = state.enableCamera ? '关闭视频' : '开启视频'
firstFooterList[0][1].active = !state.enableCamera
setFooterList(firstFooterList)
function showSingIn() {
if (!role.ID.includes(userInfo.roleId)) {
singInRef.current.getModal().then((res: boolean) => {
if (!res) {
singInRef.current.changeModal()
}
})
}
}
setTimeout(async () => {
const setting = await JSON.parse(storage.getItem('setting') as string);
const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);
@ -441,22 +450,10 @@ const Meeting: React.FC = () => {
} else {
message.error('当前不在会议室!')
}
if (!role.ID.includes(userInfo.roleId)) {
singInRef.current.getModal().then((res: boolean) => {
if (!res) {
singInRef.current.changeModal()
}
})
}
showSingIn()
},
onCancel() {
if (!role.ID.includes(userInfo.roleId)) {
singInRef.current.getModal().then((res: boolean) => {
if (!res) {
singInRef.current.changeModal()
}
})
}
showSingIn()
}
})
}
@ -465,6 +462,8 @@ const Meeting: React.FC = () => {
}
return data
})
} else {
showSingIn()
}
}, 10000);
return () => {