From 20e25fa96d9de733d28d217cdd5ed14ab61bc21c Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Fri, 13 Dec 2024 14:09:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Home/Index/index.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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)