diff --git a/src/page/Home/Index/index.tsx b/src/page/Home/Index/index.tsx index ae48584..15d9ff7 100644 --- a/src/page/Home/Index/index.tsx +++ b/src/page/Home/Index/index.tsx @@ -1,7 +1,7 @@ import styles from '@/page/Home/Index/index.module.scss' import { useEffect, useState, useRef } from "react"; import Operation from '@/components/Operation'; -import { Button, Input, Modal, Pagination, Empty, message, Popover, Popconfirm, DatePicker, Select } from "antd"; +import { Button, Input, Modal, Pagination, Empty, message, Popover, Popconfirm, DatePicker, Select, Radio } from "antd"; import { GetRoom, PostRoom, GetCheckoutRoomNum, GetRoomRtcToken, DeleteRoom, GetRecord, PostRoomInfo, GetQrcode } from '@/api/Home/Index'; import ImageUrl from '@/utils/package/imageUrl' import { ExclamationCircleFilled, ReloadOutlined } from '@ant-design/icons'; @@ -42,6 +42,7 @@ const Index: React.FC = () => { const [subjectList, setSubjectList] = useState([]); const [timeData, setTimeData] = useState([]); const [isCreateRoom, setIsCreateRoom] = useState(false); + const [allowAnonymous, setAllowAnonymous] = useState(1); const [baseImage, setBaseImage] = useState(''); const userInfo = JSON.parse(storage.getItem('user') as string) useEffect(() => { @@ -462,6 +463,15 @@ const Index: React.FC = () => { }) }} /> +
+ 匿名入会: + { + setAllowAnonymous(e.target.value); + }} value={allowAnonymous}> + 开启 + 关闭 + +
{ if (bool) { message.error('房间号已存在!') } else { - PostRoom(createRoomFrom).then(res => { + PostRoom({ ...createRoomFrom, allowAnonymous }).then(res => { if (res.code === 200) { message.success('创建成功!') setCreateRoomModal(false) @@ -492,7 +502,7 @@ const Index: React.FC = () => { } }) } else { - PostRoomInfo(createRoomFrom).then(res => { + PostRoomInfo({ ...createRoomFrom, allowAnonymous }).then(res => { if (res.code === 200) { message.success('更新成功!') setCreateRoomModal(false)