修改了小游戏房切换到普通房的时候显示异常的问题

This commit is contained in:
fengshuo
2022-04-01 23:41:44 +08:00
committed by chenguilong
parent fa8760a4aa
commit 4883bb4879
3 changed files with 9 additions and 3 deletions

View File

@@ -164,7 +164,7 @@
make.top.mas_equalTo(self).offset(kNavigationHeight - 14 - 11 - 25.0 / 2.0);
}];
}
self.gameListView.mgId = roomInfo.mgId > 0 ? [NSString stringWithFormat:@"%lld", roomInfo.mgId] : @"-1";
self.gameListView.mgId = roomInfo.mgId > 0 ? [NSString stringWithFormat:@"%lld", roomInfo.mgId] : @"0";
} else {
if (self.gameListView.superview) {
[self.gameListView removeFromSuperview];
@@ -764,8 +764,9 @@
if (roomInfo.tagId > 0) {
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
}
if ([itemInfo.mgId isEqualToString:@"-1"]) {
if ([itemInfo.mgId isEqualToString:@"0"]) {
[params setObject:@(RoomType_Game) forKey:@"type"];
[params setObject:@"0" forKey:@"mgId"];
} else {
[params setObject:@(RoomType_MiniGame) forKey:@"type"];
[params setObject:itemInfo.mgId forKey:@"mgId"];

View File

@@ -139,7 +139,7 @@
if (code == 200) {
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
LittleGameInfoModel * gameInfo = [[LittleGameInfoModel alloc] init];
gameInfo.mgId = @"-1";
gameInfo.mgId = @"0";
gameInfo.name = @"扩列交友";
NSMutableArray * dataArray = [NSMutableArray array];
[dataArray addObjectsFromArray:array];

View File

@@ -461,6 +461,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
- (void)openRoomSuccess:(RoomInfoModel *)roomInfo {
self.roomInfo = roomInfo;
[self changeStageViewOnRoomUpdate];
[self.roomHeaderView onRoomUpdate];
[self.activityContainerView onRoomUpdate];
[self.backContainerView onRoomUpdate];
@@ -531,6 +532,10 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
NSMutableDictionary *lastRoomInfoDic = [NSMutableDictionary dictionaryWithDictionary:[self.roomInfo model2dictionary]];
[lastRoomInfoDic addEntriesFromDictionary: ((NSString *)data[@"roomInfo"]).toJSONObject];
RoomInfoModel *newRoomInfo = [RoomInfoModel modelWithJSON:lastRoomInfoDic];
//TODO: mgid
if (newRoomInfo.type != RoomType_MiniGame) {
newRoomInfo.mgId = 0;
}
newRoomInfo.hasAnimationEffect = self.hasAnimationEffect;
if (newRoomInfo.roomModeType == RoomModeType_Open_Blind && self.roomInfo.roomModeType != RoomModeType_Open_Blind) {
///