选中状态
This commit is contained in:
parent
3cbdaf58ca
commit
cb6a89ac9f
|
|
@ -5,6 +5,7 @@ import { useNavigate } from 'react-router-dom';
|
|||
import { Button, Input, Modal, Pagination, Empty, message } from "antd";
|
||||
import { GetRoom, PostRomm, GetCheckoutRoomNum, GetRoomRtcToken, GetRoomInfo } from '@/api/Home/Index';
|
||||
import ImageUrl from '@/utils/package/imageUrl'
|
||||
import { storage } from '@/utils';
|
||||
const Index: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const [list, setList] = useState({
|
||||
|
|
@ -21,6 +22,8 @@ const Index: React.FC = () => {
|
|||
const [joinRoomModal, setJoinRoomModal] = useState(false)
|
||||
const [joinRoomFrom, setJoinRoomFrom] = useState<string>('')
|
||||
useEffect(() => {
|
||||
// 默认设置为未加入房间防止用户直接关闭
|
||||
storage.setItem('isJoin', false)
|
||||
getRoomList()
|
||||
}, [list.pageIndex]);
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@
|
|||
}
|
||||
|
||||
.active {
|
||||
border: 1px red solid;
|
||||
border: 1px white solid;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ const Meeting: React.FC = () => {
|
|||
userid: userInfo.account,
|
||||
token: state.token,
|
||||
})
|
||||
setCurrentVideoId(userInfo.account)
|
||||
setUser(userInfo)
|
||||
setIsInit(false)
|
||||
window.addEventListener('customStorageChange', handleCustomStorageChange);
|
||||
|
|
@ -253,10 +254,14 @@ const Meeting: React.FC = () => {
|
|||
stupWizardRef.current.changeIsStupWizard()
|
||||
break;
|
||||
case '录制':
|
||||
footerListTemplate[itemIndex][rowIndex].title = '录制中'
|
||||
footerListTemplate[itemIndex][rowIndex].active = true
|
||||
setFooterList(footerListTemplate)
|
||||
agora.startRecording()
|
||||
if (currentVideoId === user.account) {
|
||||
message.error('请勿自己录制自己!')
|
||||
} else {
|
||||
footerListTemplate[itemIndex][rowIndex].title = '录制中'
|
||||
footerListTemplate[itemIndex][rowIndex].active = true
|
||||
setFooterList(footerListTemplate)
|
||||
agora.startRecording()
|
||||
}
|
||||
break;
|
||||
case '录制中':
|
||||
footerListTemplate[itemIndex][rowIndex].title = '录制'
|
||||
|
|
@ -417,7 +422,7 @@ const Meeting: React.FC = () => {
|
|||
<div className={`${styles.meetingContentSwiper} drag`}>
|
||||
{roomUserList.map((item: any, index: number) =>
|
||||
<div
|
||||
className={styles.meetingContentSwiperCard}
|
||||
className={`${styles.meetingContentSwiperCard} ${user.account === currentVideoId ? styles.active : ''}`}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
setCurrentVideoId(item.account)
|
||||
|
|
|
|||
Loading…
Reference in New Issue