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