From 9333be9a9c76792bca83e7f8a8665f1e74ce245a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=B0?= Date: Tue, 14 Oct 2025 14:54:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E5=B8=83=E5=90=8E=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E5=BC=B9=E7=AA=97=E8=87=AA=E5=8A=A8=E5=BC=B9=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game_pages/detail/index.tsx | 36 +++++++++++++++++++++---- src/game_pages/detail/style.module.scss | 26 +++++++++++++++++- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/src/game_pages/detail/index.tsx b/src/game_pages/detail/index.tsx index 45d1409..93b5930 100644 --- a/src/game_pages/detail/index.tsx +++ b/src/game_pages/detail/index.tsx @@ -333,7 +333,9 @@ function Coursel(props) { // 分享弹窗 const SharePopup = forwardRef(({ id, from, detail, userInfo }, ref) => { const [visible, setVisible] = useState(false); + const [publishFlag, setPublishFlag] = useState(false); // const posterRef = useRef(); + const { max_participants, participant_count } = detail || {}; useEffect(() => { if (id) { @@ -361,7 +363,8 @@ const SharePopup = forwardRef(({ id, from, detail, userInfo }, ref) => { } useImperativeHandle(ref, () => ({ - show: () => { + show: (publish_flag = false) => { + setPublishFlag(publish_flag); setVisible(true); }, })); @@ -451,6 +454,7 @@ const SharePopup = forwardRef(({ id, from, detail, userInfo }, ref) => { function onClose() { setVisible(false); + setPublishFlag(false); } return ( @@ -467,11 +471,27 @@ const SharePopup = forwardRef(({ id, from, detail, userInfo }, ref) => { > - 分享至 + {publishFlag ? ( + 球局发布成功 🎉 + ) : ( + 分享至 + )} + {publishFlag && ( + + + 还剩 + + {" "} + {max_participants - participant_count}{" "} + + 人加入完成组局, 去邀请好友加入吧~ + + + )}