覆盖羽声

This commit is contained in:
启星
2025-10-20 09:43:10 +08:00
parent affed1af58
commit 0d82f9e0ef
1331 changed files with 43209 additions and 14707 deletions

View File

@@ -18,8 +18,7 @@
@interface QXSearchViewController ()<UIGestureRecognizerDelegate,UICollectionViewDelegate,UICollectionViewDataSource,ZLCollectionViewBaseFlowLayoutDelegate,QXSearchTopViewDelegate>
@property(nonatomic,strong)UICollectionView* collectionView;
@property(nonatomic,strong)QXSearchTopView *topView;
@property(nonatomic,strong)NSMutableArray *resultArray;
@property(nonatomic,strong)QXSearchListModel *model;
@end
@implementation QXSearchViewController
@@ -56,23 +55,22 @@
-(void)searchActionWithKeywords:(NSString *)keywords{
MJWeakSelf
[QXMineNetwork searchApiWithType:2 search:keywords successBlock:^(NSDictionary * _Nonnull dict) {
[weakSelf.resultArray removeAllObjects];
NSArray *arr = [NSArray yy_modelArrayWithClass:[QXSearchModel class] json:dict];
if (arr.count == 0) {
[QXMineNetwork searchListApiWithKetwords:keywords successBlock:^(NSDictionary * _Nonnull dict) {
QXSearchListModel *model = [QXSearchListModel yy_modelWithJSON:dict];
weakSelf.model = model;
if (weakSelf.model.users.count == 0 && weakSelf.model.rooms.count == 0) {
showToast(@"暂无搜索结果");
return;
}
[weakSelf.resultArray addObjectsFromArray:arr];
[weakSelf pushToResultVC];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
-(void)pushToResultVC{
QXHomeSearchResultVC *vc = [[QXHomeSearchResultVC alloc] init];
vc.resultArray = self.resultArray;
vc.model = self.model;
[self.navigationController pushViewController:vc animated:YES];
}
@@ -135,11 +133,6 @@
}
return _topView;
}
-(NSMutableArray *)resultArray{
if (!_resultArray) {
_resultArray = [NSMutableArray array];
}
return _resultArray;
}
@end