小游戏-选择开房类型的界面的逻辑的完善

This commit is contained in:
fengshuo
2022-01-22 11:35:44 +08:00
committed by chenguilong
parent 29f0fa6658
commit fed928c8e9
11 changed files with 87 additions and 19 deletions

View File

@@ -74,6 +74,8 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
@property (nonatomic,strong) XPRoomFunctionContainerView *functionView;
///Uid
@property (nonatomic,copy) NSString * roomUid;
///id
@property (nonatomic,copy) NSString *mgId;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
///
@@ -104,6 +106,21 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
return YES;
}
/** XPRoomViewController init
* @params roomUid uid
* @params viewController
* @params mgId id
*/
+ (BOOL)openRoom:(NSString*)roomUid mgId:(NSString *)mgId viewController:(UIViewController*)viewController {
XPRoomViewController * roomVC = [[self alloc] init];
roomVC.roomUid = roomUid;
roomVC.mgId = mgId;
BaseNavigationController * baseNav = [[BaseNavigationController alloc] initWithRootViewController:roomVC];
baseNav.modalPresentationStyle = UIModalPresentationFullScreen;
[viewController presentViewController:baseNav animated:YES completion:nil];
return YES;
}
- (void)dealloc {
#warning to dox -
@@ -378,10 +395,14 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
} else { //
if ([self.roomUid isEqualToString:[NSString stringWithFormat:@"%ld", userInfo.uid]]) { //
if (roomInfo.roomId > 0) { // 使
[self.presenter openRoom:roomInfo.title type:roomInfo.type roomPwd:roomInfo.roomPwd roomDesc:roomInfo.roomDesc backPic:@""];
[self.presenter openRoom:roomInfo.title type:roomInfo.type roomPwd:roomInfo.roomPwd roomDesc:roomInfo.roomDesc backPic:@"" mgId:self.mgId];
} else { //
NSString* title = [NSString stringWithFormat:@"%@的房间", userInfo.nick];
[self.presenter openRoom:title type:RoomType_Game roomPwd:@"" roomDesc:@"" backPic:@""];
RoomType type = RoomType_Game;
if (self.mgId.length > 0) {
type = RoomType_MiniGame;
}
[self.presenter openRoom:title type:type roomPwd:@"" roomDesc:@"" backPic:@"" mgId:self.mgId];
}
} else { //
// TODO: 线