File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11Page ( {
22 data : {
33 bIsReady : false , // 页面是否准备就绪
4+ bIsFetchingTopicList : false , // 是否正在获取专题列表数据
45 nActiveTabIndex : 0 , // 当前处于活动状态的tab
56 nContentLen : 60 , // 主题卡片显示正文的长度
67 aTabBarList : [
9091 * 0 => 正常获取 1 => 页面触底后获取 2 => 切换tab后获取
9192 */
9293 fnNetRTopicList ( nFetchScene = 0 ) {
94+ this . setData ( {
95+ bIsFetchingTopicList : true
96+ } ) ;
9397 // 显示标题栏加载效果
9498 wx . showNavigationBarLoading ( ) ;
9599 wx . dc . topic
@@ -114,15 +118,17 @@ Page({
114118 wx . stopPullDownRefresh ( ) ;
115119 wx . hideNavigationBarLoading ( ) ;
116120 this . setData ( {
117- bIsReady : true
121+ bIsReady : true ,
122+ bIsFetchingTopicList : false
118123 } ) ;
119124 } )
120125 . catch ( ( ) => {
121126 // 停止加载效果
122127 wx . stopPullDownRefresh ( ) ;
123128 wx . hideNavigationBarLoading ( ) ;
124129 this . setData ( {
125- bIsReady : true
130+ bIsReady : true ,
131+ bIsFetchingTopicList : false
126132 } ) ;
127133 } ) ;
128134 } ,
Original file line number Diff line number Diff line change 1515 <view class="topic-list-wrap">
1616 <block wx:if="{{aTopicList.length}}">
1717 <topic-list data="{{aTopicList}}"></topic-list>
18+ <view class="topic-list-loading ta-c color-grey">加载中...</view>
1819 </block>
1920 <block wx:else>
2021 <view class="topic-list-no-data vh-parent color-grey">
Original file line number Diff line number Diff line change 2727.topic-list-wrap {
2828 padding: 20rpx
2929}
30+ .topic-list-loading {
31+ padding: 10rpx;
32+ font-size: 28rpx;
33+ }
3034.topic-list-no-data {
3135 height: calc(100vh - 150rpx);
3236 font-size: 28rpx;
You can’t perform that action at this time.
0 commit comments