diff --git a/lib/pages/home/nearby_tab.dart b/lib/pages/home/nearby_tab.dart index b4c5ff3..d82b14b 100644 --- a/lib/pages/home/nearby_tab.dart +++ b/lib/pages/home/nearby_tab.dart @@ -94,7 +94,7 @@ class _NearbyTabState extends State with AutomaticKeepAliveClientMixi height: MediaQuery.of(context).size.height - totalBottomPadding, child: ListView.separated( // 移除顶部 padding,让刷新指示器可以正确显示在 AppBar 下方 - padding: EdgeInsets.only(left: 12, right: 12, bottom: 12), + padding: EdgeInsets.only(left: 12, right: 12), itemBuilder: (context, index) { // 空数据状态 if (controller.nearbyFeed.isEmpty && index == 0) { diff --git a/lib/pages/home/recommend_tab.dart b/lib/pages/home/recommend_tab.dart index 13da93e..3f617a1 100644 --- a/lib/pages/home/recommend_tab.dart +++ b/lib/pages/home/recommend_tab.dart @@ -37,6 +37,18 @@ class _RecommendTabState extends State final tabBarHeight = 64.0; final totalBottomPadding = bottomPadding + tabBarHeight; return Obx(() { + if (controller.recommendIsLoading.value && controller.recommendFeed.isEmpty) { + return Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CircularProgressIndicator(), + SizedBox(height: 16), + Text('加载数据中...'), + ], + ), + ); + } return EasyRefresh( controller: _refreshController, header: const ClassicHeader( @@ -93,7 +105,7 @@ class _RecommendTabState extends State child: ListView.separated( // 关键:始终允许滚动,即使内容不足 // 移除顶部 padding,让刷新指示器可以正确显示在 AppBar 下方 - padding: EdgeInsets.only(left: 12, right: 12, top: 12), + padding: EdgeInsets.only(left: 12, right: 12), itemBuilder: (context, index) { // 空数据状态 if (controller.recommendFeed.isEmpty && index == 0) {