yangjie #36
|
|
@ -6,7 +6,6 @@ import { useState, useImperativeHandle, forwardRef } from "react";
|
||||||
const SingIn = forwardRef((props: any, ref: any) => {
|
const SingIn = forwardRef((props: any, ref: any) => {
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
changeModal: () => {
|
changeModal: () => {
|
||||||
setSingInModal(true)
|
|
||||||
getRoomSingnIn()
|
getRoomSingnIn()
|
||||||
},
|
},
|
||||||
getModal: () => {
|
getModal: () => {
|
||||||
|
|
@ -23,6 +22,9 @@ const SingIn = forwardRef((props: any, ref: any) => {
|
||||||
const getRoomSingnIn = async (): Promise<void> => {
|
const getRoomSingnIn = async (): Promise<void> => {
|
||||||
await GetRoomSingnIn().then(res => {
|
await GetRoomSingnIn().then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
if (res.data.length) {
|
||||||
|
setSingInModal(true)
|
||||||
|
}
|
||||||
setSingInList(res.data.map((item: any) => {
|
setSingInList(res.data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
|
|
||||||
|
|
@ -418,6 +418,15 @@ const Meeting: React.FC = () => {
|
||||||
firstFooterList[0][1].title = state.enableCamera ? '关闭视频' : '开启视频'
|
firstFooterList[0][1].title = state.enableCamera ? '关闭视频' : '开启视频'
|
||||||
firstFooterList[0][1].active = !state.enableCamera
|
firstFooterList[0][1].active = !state.enableCamera
|
||||||
setFooterList(firstFooterList)
|
setFooterList(firstFooterList)
|
||||||
|
function showSingIn() {
|
||||||
|
if (!role.ID.includes(userInfo.roleId)) {
|
||||||
|
singInRef.current.getModal().then((res: boolean) => {
|
||||||
|
if (!res) {
|
||||||
|
singInRef.current.changeModal()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const setting = await JSON.parse(storage.getItem('setting') as string);
|
const setting = await JSON.parse(storage.getItem('setting') as string);
|
||||||
const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);
|
const stateInfo = await JSON.parse(storage.getItem('stateInfo') as string);
|
||||||
|
|
@ -441,22 +450,10 @@ const Meeting: React.FC = () => {
|
||||||
} else {
|
} else {
|
||||||
message.error('当前不在会议室!')
|
message.error('当前不在会议室!')
|
||||||
}
|
}
|
||||||
if (!role.ID.includes(userInfo.roleId)) {
|
showSingIn()
|
||||||
singInRef.current.getModal().then((res: boolean) => {
|
|
||||||
if (!res) {
|
|
||||||
singInRef.current.changeModal()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
if (!role.ID.includes(userInfo.roleId)) {
|
showSingIn()
|
||||||
singInRef.current.getModal().then((res: boolean) => {
|
|
||||||
if (!res) {
|
|
||||||
singInRef.current.changeModal()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -465,6 +462,8 @@ const Meeting: React.FC = () => {
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
showSingIn()
|
||||||
}
|
}
|
||||||
}, 10000);
|
}, 10000);
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue