直播列表loading优化
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||||
[[self getView] getAnchorRoomListSuccess:array];
|
[[self getView] getAnchorRoomListSuccess:array];
|
||||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||||
|
[[self getView] getAnchorRoomListFail];
|
||||||
} errorToast:NO] singleRoomSortId:tabId ? tabId : @""];
|
} errorToast:NO] singleRoomSortId:tabId ? tabId : @""];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,5 +20,7 @@
|
|||||||
|
|
||||||
///获取个播房成功
|
///获取个播房成功
|
||||||
- (void)getAnchorRoomListSuccess:(NSArray<HomeRecommendRoomModel *> *)array;
|
- (void)getAnchorRoomListSuccess:(NSArray<HomeRecommendRoomModel *> *)array;
|
||||||
|
///获取个播房失败
|
||||||
|
- (void)getAnchorRoomListFail;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
///Tool
|
///Tool
|
||||||
#import "ThemeColor.h"
|
#import "ThemeColor.h"
|
||||||
#import "XPMacro.h"
|
#import "XPMacro.h"
|
||||||
|
#import "XCHUDTool.h"
|
||||||
///View
|
///View
|
||||||
#import "XPHomeHapppyRoomTableViewCell.h"
|
#import "XPHomeHapppyRoomTableViewCell.h"
|
||||||
#import "XPHomeBannerTableViewCell.h"
|
#import "XPHomeBannerTableViewCell.h"
|
||||||
@@ -35,6 +36,9 @@
|
|||||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||||
///数据源
|
///数据源
|
||||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) BOOL hadLoad;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XPHomeLivePageViewController
|
@implementation XPHomeLivePageViewController
|
||||||
@@ -61,7 +65,10 @@
|
|||||||
|
|
||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
|
if (!self.hadLoad) {
|
||||||
|
self.hadLoad = YES;
|
||||||
|
[XCHUDTool showAnchorLoading];
|
||||||
|
}
|
||||||
[self headerRefresh];
|
[self headerRefresh];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +149,12 @@
|
|||||||
[self.datasource removeAllObjects];
|
[self.datasource removeAllObjects];
|
||||||
[self.datasource addObjectsFromArray:array];
|
[self.datasource addObjectsFromArray:array];
|
||||||
[self.collectionView reloadData];
|
[self.collectionView reloadData];
|
||||||
|
[XCHUDTool hideHUD];
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取个播房失败
|
||||||
|
- (void)getAnchorRoomListFail {
|
||||||
|
[XCHUDTool hideHUD];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)getHomeMoreAnchorRoomListFail:(NSString *)messag {
|
- (void)getHomeMoreAnchorRoomListFail:(NSString *)messag {
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#import "XPHtmlUrl.h"
|
#import "XPHtmlUrl.h"
|
||||||
#import "StatisticsServiceHelper.h"
|
#import "StatisticsServiceHelper.h"
|
||||||
#import "XPWeakTimer.h"
|
#import "XPWeakTimer.h"
|
||||||
#import "XCHUDTool.h"
|
|
||||||
///Model
|
///Model
|
||||||
#import "HomeLiveTagModel.h"
|
#import "HomeLiveTagModel.h"
|
||||||
#import "HomeLiveLookRecordModel.h"
|
#import "HomeLiveLookRecordModel.h"
|
||||||
@@ -75,7 +74,6 @@
|
|||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
[XCHUDTool showAnchorLoading];
|
|
||||||
[self initHeaderAndFooterRrfresh];
|
[self initHeaderAndFooterRrfresh];
|
||||||
[self initSubViews];
|
[self initSubViews];
|
||||||
[self addTimer];
|
[self addTimer];
|
||||||
@@ -161,7 +159,6 @@
|
|||||||
self.titleView.titles = self.titles;
|
self.titleView.titles = self.titles;
|
||||||
[self.titleView reloadData];
|
[self.titleView reloadData];
|
||||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||||
[XCHUDTool hideHUD];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)getHomeLiveTagListFail:(NSArray<HomeLiveTagModel *> *)array {
|
- (void)getHomeLiveTagListFail:(NSArray<HomeLiveTagModel *> *)array {
|
||||||
@@ -176,7 +173,6 @@
|
|||||||
self.titleView.titles = self.titles;
|
self.titleView.titles = self.titles;
|
||||||
[self.titleView reloadData];
|
[self.titleView reloadData];
|
||||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||||
[XCHUDTool hideHUD];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - JXCategoryListContentViewDelegate
|
#pragma mark - JXCategoryListContentViewDelegate
|
||||||
|
Reference in New Issue
Block a user