fix(profile): 移除骨架屏替换整个widget的逻辑
- Widget 结构始终保持不变,不受数据加载状态影响 - 数据值根据加载状态显示 "--" 或实际值 - 用户可正常滚动页面,静态标签始终可见 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0208022615
commit
c22d5ceb75
|
|
@ -1403,24 +1403,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
|
||||
/// 构建推荐人信息卡片(包含授权数据)
|
||||
Widget _buildReferralInfoCard() {
|
||||
// 显示加载状态(骨架屏)- 只有正在加载时才显示
|
||||
if (_isLoadingAuthorization) {
|
||||
return _buildSkeleton(height: 180);
|
||||
}
|
||||
|
||||
// 显示错误状态(带重试)
|
||||
if (_authorizationError != null && _authorizationRetryCount >= _maxRetries) {
|
||||
return _buildErrorRetry(
|
||||
error: _authorizationError!,
|
||||
onRetry: () {
|
||||
_authorizationRetryCount = 0;
|
||||
_loadAuthorizationData();
|
||||
},
|
||||
retryCount: _authorizationRetryCount,
|
||||
height: 180,
|
||||
);
|
||||
}
|
||||
|
||||
// Widget 结构始终保持,数据值根据状态显示 "--" 或实际值
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
|
@ -1559,24 +1542,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||
|
||||
/// 构建主要内容卡片
|
||||
Widget _buildMainContentCard() {
|
||||
// 显示加载状态(骨架屏)- 只有正在加载时才显示
|
||||
if (_isLoadingWallet) {
|
||||
return _buildSkeleton(height: 400);
|
||||
}
|
||||
|
||||
// 显示错误状态(带重试)- 收益数据
|
||||
if (_walletError != null && _walletRetryCount >= _maxRetries) {
|
||||
return _buildErrorRetry(
|
||||
error: _walletError!,
|
||||
onRetry: () {
|
||||
_walletRetryCount = 0;
|
||||
_loadWalletData();
|
||||
},
|
||||
retryCount: _walletRetryCount,
|
||||
height: 400,
|
||||
);
|
||||
}
|
||||
|
||||
// Widget 结构始终保持,数据值根据状态显示 "0" 或实际值
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
|
|
|||
Loading…
Reference in New Issue