大家都在搜接口
This commit is contained in:
@@ -1232,6 +1232,7 @@
|
|||||||
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168627EC927C00F10D8F /* XPHomeLittleGamePesenter.m */; };
|
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168627EC927C00F10D8F /* XPHomeLittleGamePesenter.m */; };
|
||||||
E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */; };
|
E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */; };
|
||||||
E8F9168E27ECA69500F10D8F /* HomeLittleGameRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */; };
|
E8F9168E27ECA69500F10D8F /* HomeLittleGameRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */; };
|
||||||
|
F183EF412935E1C000E2465F /* HomeEveryOneSearchModel.m in Sources */ = {isa = PBXBuildFile; fileRef = F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */; };
|
||||||
F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */; };
|
F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
@@ -3547,6 +3548,8 @@
|
|||||||
E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLittleGameTableViewCell.m; sourceTree = "<group>"; };
|
E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLittleGameTableViewCell.m; sourceTree = "<group>"; };
|
||||||
E8F9168C27ECA69500F10D8F /* HomeLittleGameRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeLittleGameRoomModel.h; sourceTree = "<group>"; };
|
E8F9168C27ECA69500F10D8F /* HomeLittleGameRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeLittleGameRoomModel.h; sourceTree = "<group>"; };
|
||||||
E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeLittleGameRoomModel.m; sourceTree = "<group>"; };
|
E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeLittleGameRoomModel.m; sourceTree = "<group>"; };
|
||||||
|
F183EF3F2935E1C000E2465F /* HomeEveryOneSearchModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeEveryOneSearchModel.h; sourceTree = "<group>"; };
|
||||||
|
F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeEveryOneSearchModel.m; sourceTree = "<group>"; };
|
||||||
F1D8556D2931FC86008C418F /* XPRoomYearActivityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomYearActivityView.h; sourceTree = "<group>"; };
|
F1D8556D2931FC86008C418F /* XPRoomYearActivityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomYearActivityView.h; sourceTree = "<group>"; };
|
||||||
F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomYearActivityView.m; sourceTree = "<group>"; };
|
F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomYearActivityView.m; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@@ -8251,6 +8254,8 @@
|
|||||||
9B3353C128816E6F00AC2F24 /* HomeLiveTagModel.m */,
|
9B3353C128816E6F00AC2F24 /* HomeLiveTagModel.m */,
|
||||||
9B39C8842885408C00564D17 /* HomeLiveLookRecordModel.h */,
|
9B39C8842885408C00564D17 /* HomeLiveLookRecordModel.h */,
|
||||||
9B39C8852885408C00564D17 /* HomeLiveLookRecordModel.m */,
|
9B39C8852885408C00564D17 /* HomeLiveLookRecordModel.m */,
|
||||||
|
F183EF3F2935E1C000E2465F /* HomeEveryOneSearchModel.h */,
|
||||||
|
F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */,
|
||||||
);
|
);
|
||||||
path = Model;
|
path = Model;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -9485,6 +9490,7 @@
|
|||||||
E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */,
|
E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */,
|
||||||
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
|
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
|
||||||
E8A1F7A8290690E00099C952 /* XPNobleRankUpdateView.m in Sources */,
|
E8A1F7A8290690E00099C952 /* XPNobleRankUpdateView.m in Sources */,
|
||||||
|
F183EF412935E1C000E2465F /* HomeEveryOneSearchModel.m in Sources */,
|
||||||
9BAC92F528E6E63000147DD8 /* XPRoomInsideOperationCell.m in Sources */,
|
9BAC92F528E6E63000147DD8 /* XPRoomInsideOperationCell.m in Sources */,
|
||||||
9BE570BC28F65B7200D491A5 /* XPMineCollectRoomCell.m in Sources */,
|
9BE570BC28F65B7200D491A5 /* XPMineCollectRoomCell.m in Sources */,
|
||||||
E86A16C22856D635004228B8 /* XPSessionFindNewGreetTableViewCell.m in Sources */,
|
E86A16C22856D635004228B8 /* XPSessionFindNewGreetTableViewCell.m in Sources */,
|
||||||
|
@@ -45,6 +45,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
page:(NSString *)page
|
page:(NSString *)page
|
||||||
pageSize:(NSString *)pageSize;
|
pageSize:(NSString *)pageSize;
|
||||||
|
|
||||||
|
/// 大家都在搜的房间列表
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param sid sid
|
||||||
|
+ (void)requestEveryOneSearchRoomList:(HttpRequestHelperCompletion)completion wordId:(NSString *)sid;
|
||||||
|
|
||||||
/// 首页推荐的轮播图
|
/// 首页推荐的轮播图
|
||||||
/// @param completion 完成
|
/// @param completion 完成
|
||||||
/// @param uid 用户的uid
|
/// @param uid 用户的uid
|
||||||
|
@@ -44,6 +44,13 @@
|
|||||||
[self makeRequest:@"search/room" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, key, type, page, pageSize, nil];
|
[self makeRequest:@"search/room" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, key, type, page, pageSize, nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 大家都在搜的房间列表
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param sid sid
|
||||||
|
+ (void)requestEveryOneSearchRoomList:(HttpRequestHelperCompletion)completion wordId:(NSString *)sid {
|
||||||
|
[self makeRequest:@"every/one/search/getRoomList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, sid, nil];
|
||||||
|
}
|
||||||
|
|
||||||
/// 首页推荐的轮播图
|
/// 首页推荐的轮播图
|
||||||
/// @param completion 完成
|
/// @param completion 完成
|
||||||
/// @param uid 用户的uid
|
/// @param uid 用户的uid
|
||||||
|
20
xplan-ios/Main/Home/Model/HomeEveryOneSearchModel.h
Normal file
20
xplan-ios/Main/Home/Model/HomeEveryOneSearchModel.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// HomeEveryOneSearchModel.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GLEN on 2022/11/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface HomeEveryOneSearchModel : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *sid;
|
||||||
|
@property (nonatomic, copy) NSString *relationRoomUid;
|
||||||
|
@property (nonatomic, copy) NSString *word;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
16
xplan-ios/Main/Home/Model/HomeEveryOneSearchModel.m
Normal file
16
xplan-ios/Main/Home/Model/HomeEveryOneSearchModel.m
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// HomeEveryOneSearchModel.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GLEN on 2022/11/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "HomeEveryOneSearchModel.h"
|
||||||
|
|
||||||
|
@implementation HomeEveryOneSearchModel
|
||||||
|
|
||||||
|
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||||
|
return @{@"sid":@"id"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -41,6 +41,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///是否是推荐房间
|
///是否是推荐房间
|
||||||
@property (nonatomic, assign) BOOL isRecommend;
|
@property (nonatomic, assign) BOOL isRecommend;
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *erbanNo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -19,6 +19,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 获取首页推荐列表
|
/// 获取首页推荐列表
|
||||||
- (void)getHomeRecommendRoomList;
|
- (void)getHomeRecommendRoomList;
|
||||||
|
|
||||||
|
/// 获取大家都在搜的房间列表
|
||||||
|
/// @param sid keyID
|
||||||
|
- (void)getEveryOneSearchRoomList:(NSString *)sid;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -36,4 +36,13 @@
|
|||||||
}] uid:uid];
|
}] uid:uid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 获取大家都在搜的房间列表
|
||||||
|
/// @param sid keyID
|
||||||
|
- (void)getEveryOneSearchRoomList:(NSString *)sid {
|
||||||
|
[Api requestEveryOneSearchRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
|
NSArray<HomeRecommendRoomModel *> * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||||
|
[[self getView] everyoneSearchListSuccess:array];
|
||||||
|
}] wordId:sid];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#import "Api+Mine.h"
|
#import "Api+Mine.h"
|
||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
#import "XPMineFootPrintModel.h"
|
#import "XPMineFootPrintModel.h"
|
||||||
|
#import "HomeEveryOneSearchModel.h"
|
||||||
#import "XPInRoomRecordProtocol.h"
|
#import "XPInRoomRecordProtocol.h"
|
||||||
|
|
||||||
@implementation XPInRoomRecordPresenter
|
@implementation XPInRoomRecordPresenter
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
- (void)getEveryoneSearchList {
|
- (void)getEveryoneSearchList {
|
||||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||||
[Api requestEveryoneSearch:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api requestEveryoneSearch:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
NSArray *array = [XPMineFootPrintModel modelsWithArray:data.data];
|
NSArray *array = [HomeEveryOneSearchModel modelsWithArray:data.data];
|
||||||
[[self getView] getEveryoneSearchListSuccess:array];
|
[[self getView] getEveryoneSearchListSuccess:array];
|
||||||
}] uid:uid];
|
}] uid:uid];
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///搜索页获取推荐房间失败
|
///搜索页获取推荐房间失败
|
||||||
- (void)searchRoomGetRecommendFail;
|
- (void)searchRoomGetRecommendFail;
|
||||||
|
|
||||||
|
/// 大家都在搜房间列表成功
|
||||||
|
- (void)everyoneSearchListSuccess:(NSArray *)list;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -14,11 +14,15 @@ typedef NS_ENUM(NSInteger, SearchType){
|
|||||||
SearchType_Users = 2,
|
SearchType_Users = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
@class HomeSearchResultModel;
|
@class HomeSearchResultModel, HomeRecommendRoomModel;
|
||||||
@interface XPSearchListTableViewCell : UITableViewCell
|
@interface XPSearchListTableViewCell : UITableViewCell
|
||||||
|
|
||||||
///配置数据
|
///配置数据
|
||||||
- (void)configData:(HomeSearchResultModel *)resultModel type:(SearchType)type;
|
- (void)configData:(HomeSearchResultModel *)resultModel type:(SearchType)type;
|
||||||
|
|
||||||
|
///配置大家都在搜房间列表
|
||||||
|
- (void)configEveryoneData:(HomeRecommendRoomModel *)resultModel;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
#import "ThemeColor.h"
|
#import "ThemeColor.h"
|
||||||
///Model
|
///Model
|
||||||
#import "HomeSearchResultModel.h"
|
#import "HomeSearchResultModel.h"
|
||||||
|
#import "HomeRecommendRoomModel.h"
|
||||||
///View
|
///View
|
||||||
#import "NetImageView.h"
|
#import "NetImageView.h"
|
||||||
|
|
||||||
@@ -66,6 +67,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)configEveryoneData:(HomeRecommendRoomModel *)resultModel {
|
||||||
|
if (resultModel) {
|
||||||
|
self.avatarImageView.imageUrl = resultModel.avatar;
|
||||||
|
self.nickLabel.text = resultModel.title ;
|
||||||
|
self.idLabel.text = [NSString stringWithFormat:@"%@号:%@",AppName, resultModel.erbanNo];
|
||||||
|
self.sexImageView.image = resultModel.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
|
||||||
|
if (resultModel.onlineNum > 100) {
|
||||||
|
self.numberLabel.text = [NSString stringWithFormat:@"%ld", resultModel.onlineNum];
|
||||||
|
} else {
|
||||||
|
self.numberLabel.text = [NSString stringWithFormat:@" %ld ", resultModel.onlineNum];
|
||||||
|
}
|
||||||
|
self.numberView.hidden = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Private Method
|
#pragma mark - Private Method
|
||||||
- (void)initSubViews {
|
- (void)initSubViews {
|
||||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||||
|
@@ -69,18 +69,22 @@
|
|||||||
if (cell == nil) {
|
if (cell == nil) {
|
||||||
cell = [[XPSearchListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])];
|
cell = [[XPSearchListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])];
|
||||||
}
|
}
|
||||||
HomeSearchResultModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row];
|
HomeRecommendRoomModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row];
|
||||||
[cell configData:resultModel type:1];
|
[cell configEveryoneData:resultModel];
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
HomeSearchResultModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row];
|
HomeRecommendRoomModel * resultModel = [self.relateArray safeObjectAtIndex1:indexPath.row];
|
||||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchRelateViewEnterRoom:)]) {
|
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchRelateViewEnterRoom:)]) {
|
||||||
[self.delegate xPHomeSearchRelateViewEnterRoom:resultModel.uid];
|
[self.delegate xPHomeSearchRelateViewEnterRoom:resultModel.uid];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
return 74;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - collectionViewDelegate
|
#pragma mark - collectionViewDelegate
|
||||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||||
return self.recommendArray.count;
|
return self.recommendArray.count;
|
||||||
@@ -132,7 +136,7 @@
|
|||||||
if (!_relateTitle) {
|
if (!_relateTitle) {
|
||||||
UILabel *label = [[UILabel alloc] init];
|
UILabel *label = [[UILabel alloc] init];
|
||||||
label.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
label.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||||
// label.textColor = [ThemeColor mainTextColor];
|
label.textColor = [ThemeColor mainTextColor];
|
||||||
label.text = @"相关房间";
|
label.text = @"相关房间";
|
||||||
_relateTitle = label;
|
_relateTitle = label;
|
||||||
}
|
}
|
||||||
|
@@ -169,26 +169,24 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
|||||||
}
|
}
|
||||||
|
|
||||||
///大家都在搜
|
///大家都在搜
|
||||||
- (void)xPRoomSearchRecordViewControllerEveryoneSearch:(NSString *)word {
|
- (void)xPRoomSearchRecordViewControllerEveryoneSearch:(NSString *)word sid:(nonnull NSString *)sid {
|
||||||
self.searchView.searchTextField.text = word;
|
self.searchView.searchTextField.text = word;
|
||||||
[self.recordVc storeSearchRecord:word];
|
[self.recordVc storeSearchRecord:word];
|
||||||
[self.presenter searchRoomList:word type:@"3"];
|
[self.presenter getEveryOneSearchRoomList:sid];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - XPHomeSearchProtocol
|
#pragma mark - XPHomeSearchProtocol
|
||||||
- (void)searchRoomSuccess:(NSArray *)data type:(nonnull NSString *)type {
|
- (void)everyoneSearchListSuccess:(NSArray *)list {
|
||||||
if (type.integerValue == 3) {
|
if (list.count) {//有值,显示列表
|
||||||
if (data.count) {//有值,显示列表
|
|
||||||
[self.view addSubview:self.relateView];
|
[self.view addSubview:self.relateView];
|
||||||
[self.relateView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.relateView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.right.bottom.mas_equalTo(0);
|
make.left.right.bottom.mas_equalTo(0);
|
||||||
make.top.mas_equalTo(self.searchView.mas_bottom);
|
make.top.mas_equalTo(self.searchView.mas_bottom);
|
||||||
}];
|
}];
|
||||||
self.relateView.relateArray = data;
|
self.relateView.relateArray = list;
|
||||||
} else {//无数据,显示推荐房间
|
} else {//无数据,显示推荐房间
|
||||||
[self.presenter getHomeRecommendRoomList];
|
[self.presenter getHomeRecommendRoomList];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)searchRoomGetRecommendSuccess:(NSArray *)data {
|
- (void)searchRoomGetRecommendSuccess:(NSArray *)data {
|
||||||
|
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)xPRoomSearchRecordViewControllerSearchWithWord:(NSString *)word;
|
- (void)xPRoomSearchRecordViewControllerSearchWithWord:(NSString *)word;
|
||||||
|
|
||||||
///点击了大家都在搜
|
///点击了大家都在搜
|
||||||
- (void)xPRoomSearchRecordViewControllerEveryoneSearch:(NSString *)word;
|
- (void)xPRoomSearchRecordViewControllerEveryoneSearch:(NSString *)word sid:(NSString *)sid;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#import "XPInRoomRecordProtocol.h"
|
#import "XPInRoomRecordProtocol.h"
|
||||||
///Model
|
///Model
|
||||||
#import "XPMineFootPrintModel.h"
|
#import "XPMineFootPrintModel.h"
|
||||||
|
#import "HomeEveryOneSearchModel.h"
|
||||||
|
|
||||||
NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
||||||
|
|
||||||
@@ -188,7 +189,8 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
|||||||
return cell;
|
return cell;
|
||||||
} else if (collectionView == self.everyOneCollectionView) {
|
} else if (collectionView == self.everyOneCollectionView) {
|
||||||
XPHomeSearchRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeSearchRecordCell class]) forIndexPath:indexPath];
|
XPHomeSearchRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeSearchRecordCell class]) forIndexPath:indexPath];
|
||||||
cell.recordString = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
|
HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
|
||||||
|
cell.recordString = model.word;
|
||||||
return cell;
|
return cell;
|
||||||
} else {
|
} else {
|
||||||
XPHomeAttentionCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeAttentionCollectionViewCell class]) forIndexPath:indexPath];
|
XPHomeAttentionCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeAttentionCollectionViewCell class]) forIndexPath:indexPath];
|
||||||
@@ -204,9 +206,9 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
|||||||
[self.delegate xPRoomSearchRecordViewControllerSearchWithWord:str];
|
[self.delegate xPRoomSearchRecordViewControllerSearchWithWord:str];
|
||||||
}
|
}
|
||||||
} else if (collectionView == self.everyOneCollectionView) {
|
} else if (collectionView == self.everyOneCollectionView) {
|
||||||
NSString *str = self.searchList[indexPath.row];
|
HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
|
||||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomSearchRecordViewControllerEveryoneSearch:)]) {
|
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomSearchRecordViewControllerEveryoneSearch: sid:)]) {
|
||||||
[self.delegate xPRoomSearchRecordViewControllerEveryoneSearch:str];
|
[self.delegate xPRoomSearchRecordViewControllerEveryoneSearch:model.word sid:model.sid];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XPMineFootPrintModel *resultModel = self.inRoomList[indexPath.row];
|
XPMineFootPrintModel *resultModel = self.inRoomList[indexPath.row];
|
||||||
@@ -227,8 +229,8 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
|
|||||||
CGFloat width = [str boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width;
|
CGFloat width = [str boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width;
|
||||||
return CGSizeMake(width + 26, 26);
|
return CGSizeMake(width + 26, 26);
|
||||||
} else if(collectionView == self.everyOneCollectionView){
|
} else if(collectionView == self.everyOneCollectionView){
|
||||||
NSString *str = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
|
HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
|
||||||
CGFloat width = [str boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width;
|
CGFloat width = [model.word boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:12]} context:nil].size.width;
|
||||||
return CGSizeMake(width + 26, 26);
|
return CGSizeMake(width + 26, 26);
|
||||||
} else {
|
} else {
|
||||||
return CGSizeMake(56, 75);
|
return CGSizeMake(56, 75);
|
||||||
|
@@ -306,8 +306,7 @@
|
|||||||
/// @param completion 完成
|
/// @param completion 完成
|
||||||
/// @param uid uid
|
/// @param uid uid
|
||||||
+ (void)requestEveryoneSearch:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
+ (void)requestEveryoneSearch:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||||||
#warning todo
|
[self makeRequest:@"every/one/search/getList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
||||||
[self makeRequest:@"" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取好友派对列表
|
/// 获取好友派对列表
|
||||||
|
Reference in New Issue
Block a user