@@ -125,7 +125,8 @@
|
||||
[[self getView] onGetLittleGameListSuccess:array ];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] onGetLittleGameListFail];
|
||||
} errorToast:NO]];
|
||||
} errorToast:NO]
|
||||
roomUid:uid];
|
||||
}
|
||||
///快速匹配小游戏房
|
||||
/// @param mgId 游戏ID
|
||||
|
@@ -197,6 +197,7 @@
|
||||
[[self getView] onGetLittleGameListSuccess:array];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getHomeRecommendDataFail];
|
||||
}errorToast:NO]];
|
||||
}errorToast:NO]
|
||||
roomUid:@""];
|
||||
}
|
||||
@end
|
||||
|
@@ -130,7 +130,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
@kWeakify(self);
|
||||
RACSubject* playRAC = [RACSubject subject];
|
||||
RACSubject* littleGameRAC = [RACSubject subject];
|
||||
[[RACSignal combineLatest:@[playRAC, littleGameRAC]
|
||||
[[RACSignal combineLatest:@[playRAC, littleGameRAC]
|
||||
reduce:^id(NSArray<ActivityInfoModel*> *playModels, NSArray<LittleGameInfoModel*> *littleGameModels){
|
||||
@kStrongify(self);
|
||||
self.playList = [NSMutableArray arrayWithArray:playModels];
|
||||
@@ -138,7 +138,9 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {}];
|
||||
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
|
||||
[Api roomActivityList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if (code == 200) {
|
||||
@@ -158,6 +160,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}
|
||||
} roomId:roomId];
|
||||
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
[Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
|
||||
@@ -166,7 +169,8 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
} else {
|
||||
[littleGameRAC sendError:nil];
|
||||
}
|
||||
}];
|
||||
}
|
||||
roomUid:roomUid];
|
||||
}
|
||||
-(void)dealWithData{
|
||||
self.isLoadActivity = YES;
|
||||
|
@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface Api (LittleGame)
|
||||
/// 获取小游戏列表
|
||||
/// @param completion 完成
|
||||
+ (void)getLittleGameList:(HttpRequestHelperCompletion)completion;
|
||||
+ (void)getLittleGameList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
|
||||
|
||||
/// 获取小游戏的code
|
||||
/// @param completion 完成
|
||||
|
@@ -10,9 +10,10 @@
|
||||
@implementation Api (LittleGame)
|
||||
|
||||
/// 获取小游戏列表
|
||||
/// @param roomUid 房主的 uid, 房间类型切换的时候传入
|
||||
/// @param completion 完成
|
||||
+ (void)getLittleGameList:(HttpRequestHelperCompletion)completion {
|
||||
[self makeRequest:@"miniGame/record/miniGameList" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, nil];
|
||||
+ (void)getLittleGameList:(HttpRequestHelperCompletion)completion roomUid:(nonnull NSString *)roomUid {
|
||||
[self makeRequest:@"miniGame/record/miniGameList" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUid, nil];
|
||||
}
|
||||
|
||||
|
||||
|
@@ -130,7 +130,8 @@
|
||||
self.gameList = [dataArray copy];
|
||||
self.datasource = [self handleGameListData:self.gameList];
|
||||
}
|
||||
}];
|
||||
}
|
||||
roomUid:@""];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,8 @@
|
||||
self.datasource = array;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
}];
|
||||
}
|
||||
roomUid:@""];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
|
@@ -104,7 +104,8 @@
|
||||
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
|
||||
self.gameView.littleGameList = array.mutableCopy;
|
||||
}
|
||||
}];
|
||||
}
|
||||
roomUid:@""];
|
||||
}
|
||||
|
||||
-(void)installUI{
|
||||
|
Reference in New Issue
Block a user