46 lines
1.7 KiB
Mathematica
46 lines
1.7 KiB
Mathematica
![]() |
//
|
||
|
// MewHomeManager.m
|
||
|
// xplan-ios
|
||
|
//
|
||
|
// Created by duoban on 2023/12/20.
|
||
|
//
|
||
|
|
||
|
#import "MewHomeManager.h"
|
||
|
#import <ReactiveObjC/ReactiveObjC.h>
|
||
|
#import "MewMainHomeBannerInfoModel.h"
|
||
|
#import "Api+MewHomeApi.h"
|
||
|
#import "MewMainHomeMenuInfoModel.h"
|
||
|
#import "MewMainHomeProtocol.h"
|
||
|
#import "MewMainHomeGiftRecordModel.h"
|
||
|
#import "MewMainHomeHotRoomModel.h"
|
||
|
@implementation MewHomeManager
|
||
|
/// 获取首页顶部的轮播图
|
||
|
- (void)mew_requestMainHomeTopDataList {
|
||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||
|
[Api mew_RequestMainHomeMenuList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||
|
NSArray * array = [MewMainHomeMenuInfoModel modelsWithArray:data.data];
|
||
|
[[self getView] mew_getHomeTopDataSuccess:array];
|
||
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||
|
|
||
|
}] uid:uid];
|
||
|
}
|
||
|
/// 获取全服礼物记录列表
|
||
|
- (void)mew_requestMainHomeGiftRecordList{
|
||
|
[Api mew_RequestMainHomeGiftRecordList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||
|
NSArray * array = [MewMainHomeGiftRecordModel modelsWithArray:data.data];
|
||
|
[[self getView] mew_getHomeGiftRecordListSuccess:array];
|
||
|
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||
|
[[self getView] mew_getHomeGiftRecordListFail];
|
||
|
}]];
|
||
|
}
|
||
|
//获取热门房间
|
||
|
-(void)mew_requestMainHomePersonalRoomList:(NSString *)uid{
|
||
|
[Api mew_RequestMainHomePersonalRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||
|
NSArray * array = [MewMainHomeHotRoomModel modelsWithArray:data.data];
|
||
|
[[self getView]mew_getHomePersonalRoomListSuccess:array];
|
||
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||
|
[[self getView]mew_getHomePersonalRoomListFail];
|
||
|
} showLoading:NO errorToast:NO] uid:uid];
|
||
|
}
|
||
|
@end
|