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 43a5b055..48296c94 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 @@ -106,7 +106,7 @@ class _ProfilePageState extends ConsumerState { double _settledUsdt = 0.0; double _expiredUsdt = 0.0; double _expiredPower = 0.0; - bool _isLoadingWallet = true; + bool _isLoadingWallet = false; // 懒加载,初始为 false String? _walletError; // 待领取奖励列表(每一笔单独显示) @@ -128,10 +128,10 @@ class _ProfilePageState extends ConsumerState { int _unreadNotificationCount = 0; // ========== 懒加载 + 重试机制相关状态 ========== - // 各区域加载状态 + // 各区域加载状态(懒加载区域初始为 false,等待可见时触发) bool _isLoadingUserData = true; - bool _isLoadingReferral = true; - bool _isLoadingAuthorization = true; + bool _isLoadingReferral = false; + bool _isLoadingAuthorization = false; String? _userDataError; String? _referralError; String? _authorizationError; @@ -1403,8 +1403,8 @@ class _ProfilePageState extends ConsumerState { /// 构建推荐人信息卡片(包含授权数据) Widget _buildReferralInfoCard() { - // 显示加载状态(骨架屏) - if (_isLoadingAuthorization && !_hasLoadedAuthorization) { + // 显示加载状态(骨架屏)- 只有正在加载时才显示 + if (_isLoadingAuthorization) { return _buildSkeleton(height: 180); } @@ -1559,8 +1559,8 @@ class _ProfilePageState extends ConsumerState { /// 构建主要内容卡片 Widget _buildMainContentCard() { - // 显示加载状态(骨架屏)- 收益数据 - if (_isLoadingWallet && !_hasLoadedWallet) { + // 显示加载状态(骨架屏)- 只有正在加载时才显示 + if (_isLoadingWallet) { return _buildSkeleton(height: 400); }