Compare commits

...

4 Commits

4 changed files with 37 additions and 22 deletions

View File

@ -34,6 +34,7 @@ const Index: React.FC = () => {
const stupWizardRef = useRef<any>();
const [user, setUser] = useState<any>({});
const [currentRoomInfo, setCurrentRoomInfo] = useState<any>({});
const [timeData, setTimeData] = useState<any>([]);
const userInfo = JSON.parse(storage.getItem('user') as string)
useEffect(() => {
setUser(userInfo)
@ -386,15 +387,23 @@ const Index: React.FC = () => {
</div>
</div>
</Modal>
<Modal title="选择时间段" destroyOnClose={true} open={timeSelectModal} footer={null} onCancel={() => setTimeSelectModal(false)} centered width={'400px'}>
<Modal title="选择时间段" destroyOnClose={true} open={timeSelectModal} footer={null} onCancel={() => setTimeSelectModal(false)} centered maskClosable={false} width={'400px'}>
<div>
<RangePicker
showTime={{ format: 'YYYY-MM-DD HH:mm:ss' }}
format="YYYY-MM-DD HH:mm:ss"
onChange={(_value, dateString) => {
setTimeData(dateString)
}}
/>
<div style={{ display: 'flex', justifyContent: 'center', marginTop: '10px' }}>
<Button type="primary"
style={{ backgroundColor: '#31353A', marginRight: '10px' }}
onClick={() => setTimeSelectModal(false)}></Button>
<Button type="primary" className='m-ant-btn' onClick={async () => {
const setting = JSON.parse(storage.getItem('setting') as string)
if (dateString.length === 2) {
GetRecord(dayjs(dateString[0]).unix(), dayjs(dateString[1]).unix(), currentRoomInfo.roomNum).then(res => {
if (timeData.length === 2) {
GetRecord(dayjs(timeData[0]).unix(), dayjs(timeData[1]).unix(), currentRoomInfo.roomNum).then(res => {
if (res.code === 200) {
const fileName = res.data.split('/').pop().split('?')[0];
fileUpLoad({
@ -406,8 +415,8 @@ const Index: React.FC = () => {
setTimeSelectModal(false)
})
}
}}
/>
}}></Button>
</div>
</div>
</Modal>
<JoinSetting ref={joinSettingRef} />

View File

@ -998,11 +998,13 @@ const Meeting: React.FC = () => {
}
// 全员观看
const getShowUser = async (): Promise<void> => {
await GetShowUser(state.channelId).then(async (res) => {
if (res.code === 200 && res.data) {
renderVideo(res.data)
}
})
if (location.href.indexOf('/meeting') !== -1) {
await GetShowUser(state.channelId).then(async (res) => {
if (res.code === 200 && res.data) {
renderVideo(res.data)
}
})
}
}
// 加入房间时间
const changeCurrentSeconds = (): string => {
@ -1207,8 +1209,11 @@ const Meeting: React.FC = () => {
// 退出房间
const leaveChannel = async (bool: boolean = true): Promise<void> => {
await stopRecorderMedia()
if (bool) {
await getLeave()
try {
if (bool) {
await getLeave()
}
} catch (error) {
}
await agora.leaveChannel()
if (user.isAnonymous) {

View File

@ -22,15 +22,12 @@ export const startSignalr = async () => {
});
}
export const onStart = async (callBack?: Function) => {
if (connection.state !== signalR.HubConnectionState.Connected) {
try {
await connection.start();
if (callBack) {
callBack()
}
} catch (err) {
setTimeout(onStart, 5000);
export const onStart = async () => {
if (connection) {
if (connection.state !== signalR.HubConnectionState.Connected) {
connection.start();
} else {
setTimeout(onStart, 3000);
}
}
}

View File

@ -381,7 +381,11 @@ $pagination-hover-background-color: #5575F2;
.ant-message {
-webkit-app-region: no-drag;
}
// ant-spin-fullscreen
.ant-spin-fullscreen {
z-index: 10000;
}
.ant-picker-dropdown {
-webkit-app-region: no-drag;
}