2021-11-29 21:40:11 +08:00
|
|
|
//
|
|
|
|
// XPHomeSearchPresenter.m
|
|
|
|
// xplan-ios
|
|
|
|
//
|
|
|
|
// Created by 冯硕 on 2021/11/29.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "XPHomeSearchPresenter.h"
|
|
|
|
#import "Api+Home.h"
|
|
|
|
#import "XPHomeSearchProtocol.h"
|
|
|
|
#import "HomeSearchResultModel.h"
|
|
|
|
|
|
|
|
@implementation XPHomeSearchPresenter
|
|
|
|
|
2021-12-02 18:06:11 +08:00
|
|
|
|
|
|
|
/// 搜索房间或者用户
|
|
|
|
/// @param key 搜索的关键字
|
|
|
|
/// @param type 类型 1 房间 2 用户
|
|
|
|
- (void)searchRoomList:(NSString *)key type:(NSString *)type {
|
2021-11-29 21:40:11 +08:00
|
|
|
[Api searchComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
NSArray * array = [HomeSearchResultModel modelsWithArray:data.data];
|
|
|
|
[[self getView] searchRoomSuccess:array];
|
2021-12-02 18:06:11 +08:00
|
|
|
}] key:key type:type page:@"1" pageSize:@"50"];
|
2021-11-29 21:40:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|