处理需求 #64

1. /miniGame/record/miniGameList 补充参数 roomUid
This commit is contained in:
eggmanQQQ
2024-06-03 14:59:42 +08:00
parent 283dcdb2ec
commit 2077815bac
8 changed files with 21 additions and 11 deletions

View File

@@ -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

View File

@@ -197,6 +197,7 @@
[[self getView] onGetLittleGameListSuccess:array];
}fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] getHomeRecommendDataFail];
}errorToast:NO]];
}errorToast:NO]
roomUid:@""];
}
@end

View File

@@ -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;

View File

@@ -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 完成

View File

@@ -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];
}

View File

@@ -130,7 +130,8 @@
self.gameList = [dataArray copy];
self.datasource = [self handleGameListData:self.gameList];
}
}];
}
roomUid:@""];
}
}

View File

@@ -74,7 +74,8 @@
self.datasource = array;
[self.collectionView reloadData];
}
}];
}
roomUid:@""];
}
- (void)initSubViews {

View File

@@ -104,7 +104,8 @@
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
self.gameView.littleGameList = array.mutableCopy;
}
}];
}
roomUid:@""];
}
-(void)installUI{