diff --git a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart index 86ef7292..d3b9641d 100644 --- a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart +++ b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart @@ -431,13 +431,26 @@ class _ProfilePageState extends ConsumerState { Future _expandReferralList() async { if (_isLoadingMoreReferrals) return; + // 如果已经加载过全部数据,直接展开,不重新请求 + if (_referrals.length >= _totalReferralCount) { + debugPrint('[ProfilePage] 数据已加载完整,直接展开'); + setState(() { + _isReferralListExpanded = true; + }); + return; + } + + debugPrint('[ProfilePage] 展开引荐列表,当前总数: $_totalReferralCount'); + setState(() { _isLoadingMoreReferrals = true; }); try { final referralService = ref.read(referralServiceProvider); - final response = await referralService.getDirectReferrals(limit: 200); + final response = await referralService.getDirectReferrals(limit: _totalReferralCount); + + debugPrint('[ProfilePage] 加载到 ${response.referrals.length} 条引荐记录'); if (mounted) { setState(() {