41 lines
1.5 KiB
Objective-C
41 lines
1.5 KiB
Objective-C
//
|
||
// YMMineCollectRoomListPresenter.m
|
||
// YUMI
|
||
//
|
||
// Created by YUMI on 2022/7/27.
|
||
//
|
||
|
||
#import "XPMineCollectRoomListPresenter.h"
|
||
#import "Api+Mine.h"
|
||
#import "Api+Room.h"
|
||
#import "XPMineCollectRoomListProtocol.h"
|
||
#import "AccountInfoStorage.h"
|
||
#import "HomeCollectRoomModel.h"
|
||
|
||
@implementation XPMineCollectRoomListPresenter
|
||
|
||
/// 获取收藏房间列表
|
||
/// @param page 当前的页数
|
||
/// @param pageSize 一页多少个
|
||
/// @param type 类型:4:个播房;其他:派对房;不传:所有房间
|
||
- (void)getCollectRoomList:(int)page pageSize:(int)pageSize state:(int)state type:(NSString *)type {
|
||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||
[Api requestMineCollectRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||
NSArray * array = [HomeCollectRoomModel modelsWithArray:data.data[@"fansRoomList"]];
|
||
[[self getView] onGetCollectRoomListSuccess:array state:state];
|
||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||
[[self getView] getCollectRoomListFail:state];
|
||
}] uid:uid page:[NSString stringWithFormat:@"%d", page] pageSize:[NSString stringWithFormat:@"%d", pageSize] roomType:type.length ? type : NULL];
|
||
}
|
||
|
||
///批量删除收藏的房间
|
||
- (void)deletecollectRoomWithRoomUids:(NSString *)roomUids {
|
||
NSString * type = @"3";
|
||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||
[Api collectRoom:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||
[[self getView] deleteCollectRoomSuccess];
|
||
}] roomUid:@"" uid:uid type:type roomUids:roomUids];
|
||
}
|
||
|
||
@end
|