From c6304d75cf34c19a90b0a9b9d6fa5064170d1d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Wed, 10 Sep 2025 11:01:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E9=A1=B5=E7=A0=81?= =?UTF-8?q?=E4=B8=BA1=E6=97=B6=E7=9A=84=E6=95=B0=E6=8D=AE=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一修改多个选择弹窗组件,当页码变化时不再限制第一页的数据请求,确保数据加载逻辑一致 --- Cunkebao/src/components/AccountSelection/selectionPopup.tsx | 2 +- Cunkebao/src/components/FriendSelection/selectionPopup.tsx | 2 +- Cunkebao/src/components/GroupSelection/selectionPopup.tsx | 2 +- Cunkebao/src/components/PoolSelection/selectionPopup.tsx | 2 +- .../traffic-distribution/list/components/SendRcrodModal.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cunkebao/src/components/AccountSelection/selectionPopup.tsx b/Cunkebao/src/components/AccountSelection/selectionPopup.tsx index f6d012a5d..a40bd6ea4 100644 --- a/Cunkebao/src/components/AccountSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/AccountSelection/selectionPopup.tsx @@ -103,7 +103,7 @@ export default function SelectionPopup({ // 页码变化 useEffect(() => { - if (!visible || currentPage === 1) return; + if (!visible) return; fetchAccounts(currentPage, searchQuery); }, [currentPage, visible, searchQuery]); diff --git a/Cunkebao/src/components/FriendSelection/selectionPopup.tsx b/Cunkebao/src/components/FriendSelection/selectionPopup.tsx index eaa386920..6f52b5015 100644 --- a/Cunkebao/src/components/FriendSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/FriendSelection/selectionPopup.tsx @@ -123,7 +123,7 @@ const SelectionPopup: React.FC = ({ // 页码变化时请求数据(只在弹窗打开且页码不是1时执行) useEffect(() => { - if (!visible || currentPage === 1) return; // 弹窗关闭或第一页时不请求 + if (!visible) return; // 弹窗关闭或第一页时不请求 fetchFriends(currentPage, searchQuery); }, [currentPage, visible, searchQuery]); diff --git a/Cunkebao/src/components/GroupSelection/selectionPopup.tsx b/Cunkebao/src/components/GroupSelection/selectionPopup.tsx index c7237b172..69cecf764 100644 --- a/Cunkebao/src/components/GroupSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/GroupSelection/selectionPopup.tsx @@ -135,7 +135,7 @@ export default function SelectionPopup({ // 页码变化时请求数据(只在弹窗打开且页码不是1时执行) useEffect(() => { - if (!visible || currentPage === 1) return; + if (!visible) return; fetchGroups(currentPage, searchQuery); }, [currentPage, visible, searchQuery]); diff --git a/Cunkebao/src/components/PoolSelection/selectionPopup.tsx b/Cunkebao/src/components/PoolSelection/selectionPopup.tsx index 1e59529ce..eb0ccf761 100644 --- a/Cunkebao/src/components/PoolSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/PoolSelection/selectionPopup.tsx @@ -134,7 +134,7 @@ export default function SelectionPopup({ // 页码变化时请求数据(只在弹窗打开且页码不是1时执行) useEffect(() => { - if (!visible || currentPage === 1) return; + if (!visible) return; fetchPoolPackages(currentPage, searchQuery); }, [currentPage, visible, searchQuery]); diff --git a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx index d74c52191..e9d824522 100644 --- a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx +++ b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx @@ -81,7 +81,7 @@ const SendRcrodModal: React.FC = ({ // 页码变化 useEffect(() => { - if (!visible || !ruleId || currentPage === 1) return; + if (!visible || !ruleId) return; fetchSendRecords(currentPage, searchKeyword); }, [currentPage]);