From c8d8db27d7d2292b1501056da8324dc94e319d2f Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 12 Dec 2024 11:13:38 +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/components/SingIn/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/SingIn/index.tsx b/src/components/SingIn/index.tsx index 0b64b03..5ea64b1 100644 --- a/src/components/SingIn/index.tsx +++ b/src/components/SingIn/index.tsx @@ -9,6 +9,7 @@ const SingIn = forwardRef((props: any, ref: any) => { getRoomSingnIn() }, getModal: () => { + setIsMessage(true) return new Promise((resolve, reject) => { setSingInModal(bool => { resolve(bool) @@ -18,6 +19,7 @@ const SingIn = forwardRef((props: any, ref: any) => { }, })) const [singInModal, setSingInModal] = useState(false); + const [isMessage, setIsMessage] = useState(false); const [singInList, setSingInList] = useState([]); const getRoomSingnIn = async (): Promise => { await GetRoomSingnIn().then(res => { @@ -25,7 +27,12 @@ const SingIn = forwardRef((props: any, ref: any) => { if (res.data.length) { setSingInModal(true) } else { - message.error('暂未绑定签到人,请联系管理员添加后签到!') + setIsMessage(bool => { + if (!bool) { + message.error('暂未绑定签到人,请联系管理员添加后签到!') + } + return false + }) } setSingInList(res.data.map((item: any) => { return {