完成
This commit is contained in:
@@ -78,10 +78,36 @@
|
||||
/// 有人退出交友房私密小屋
|
||||
-(void)friendCabinRoomIsQuit{
|
||||
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
|
||||
|
||||
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
|
||||
for (int i = 0; i < viewControllers.count; i++) {
|
||||
UIViewController *vc = [viewControllers objectAtIndex:i];
|
||||
if ([vc isEqual:self]) {
|
||||
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
|
||||
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
|
||||
[viewControllers insertObject:roomVc atIndex:i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.navigationController.viewControllers = viewControllers;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
QXGlobal.shareGlobal.superRoomId = @"";
|
||||
// [self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
/// 私密小屋时间发生延时
|
||||
-(void)friendCabinRoomTimeDelayWithTime:(NSString*)end_time{
|
||||
[self.seatContentView friendCabinRoomTimeDelayWithTime:end_time];
|
||||
}
|
||||
|
||||
|
||||
-(void)meetActivityProgressIsUpdate:(NSDictionary *)updateDict{
|
||||
QXXLHModel *model = [QXXLHModel yy_modelWithJSON:updateDict[@"xlh_data"]];
|
||||
[self.skyView updateProgress:model];
|
||||
[self.ageView updateProgress:model];
|
||||
[self.timeView updateProgress:model];
|
||||
}
|
||||
|
||||
-(void)meetActivityGiftInfoIsUpdate:(QXRoomChatListModel *)giftInfo{
|
||||
[self.meetView updateUserAndGiftInfoWithModel:giftInfo];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
#import "QXRoomBottomView.h"
|
||||
#import "QXRoomMessageManager.h"
|
||||
#import "QXSendGiftView.h"
|
||||
|
||||
/// 活动
|
||||
#import "QXSkyPraizeView.h"/// 天空之境
|
||||
#import "QXAgePraizeView.h"/// 岁月之城
|
||||
#import "QXTimePraizeView.h"/// 时空之巅
|
||||
#import "QXMeetActivityView.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRoomViewController : QXBaseViewController<QXRoomMessageManagerDelegate,QXRoomSeatDelegate>
|
||||
@@ -32,7 +38,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 发送礼物
|
||||
@property (nonatomic,strong)QXSendGiftView *sendGiftView;
|
||||
|
||||
|
||||
|
||||
@property (nonatomic,strong)QXSkyPraizeView *skyView;
|
||||
@property (nonatomic,strong)QXAgePraizeView *ageView;
|
||||
@property (nonatomic,strong)QXTimePraizeView *timeView;
|
||||
/// 巡乐会
|
||||
@property (nonatomic,strong)QXMeetActivityView *meetView;
|
||||
-(void)configBottomTools;
|
||||
|
||||
-(void)destroyViews;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -278,6 +278,7 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
|
||||
-(void)resetSubviews{
|
||||
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
||||
if (self.roomModel.room_info.type_id.intValue != 6) {
|
||||
[self.roomBgImageView sd_setImageWithURL:[NSURL URLWithString:self.roomModel.room_info.room_background]];
|
||||
}else{
|
||||
@@ -397,16 +398,21 @@ QXRoomUserInfoViewDelegate
|
||||
|
||||
self.micTeamView.countLabel.text = self.roomModel.room_info.queue_number;
|
||||
self.titleView.roomModel = self.roomModel;
|
||||
if (self.roomModel.user_info.pit_number.intValue > 0) {
|
||||
if (self.roomModel.room_info.type_id.intValue == 6) {
|
||||
self.bottomView.isCabinRoom = YES;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
[[QXAgoraEngine sharedEngine] enableAudio:NO];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:NO];
|
||||
self.seatContentView.myPitNumber = self.roomModel.user_info.pit_number.intValue;
|
||||
}else{
|
||||
self.seatContentView.myPitNumber = -1;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:NO];
|
||||
[[QXAgoraEngine sharedEngine] enableAudio:NO];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:YES];
|
||||
if (self.roomModel.user_info.pit_number.intValue > 0) {
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
[[QXAgoraEngine sharedEngine] enableAudio:NO];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:NO];
|
||||
self.seatContentView.myPitNumber = self.roomModel.user_info.pit_number.intValue;
|
||||
}else{
|
||||
self.seatContentView.myPitNumber = -1;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:NO];
|
||||
[[QXAgoraEngine sharedEngine] enableAudio:NO];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:YES];
|
||||
}
|
||||
}
|
||||
self.seatContentView.roomModel = self.roomModel;
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2){
|
||||
@@ -464,6 +470,9 @@ QXRoomUserInfoViewDelegate
|
||||
//// _movieView = nil;
|
||||
//// }
|
||||
[[QXAgoraEngine sharedEngine] startPreViewWithUid:uid view:self.movieView.videoView];
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
[[QXAgoraEngine sharedEngine] enableAudio:NO];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:NO];
|
||||
}
|
||||
|
||||
}];
|
||||
@@ -481,10 +490,7 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
[QXRoomMessageManager shared].delegate = self;
|
||||
[QXAgoraEngine sharedEngine].delegate = self;
|
||||
if (self.roomModel.room_info.type_id.intValue == 6) {
|
||||
self.bottomView.isCabinRoom = YES;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
}
|
||||
|
||||
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) {
|
||||
// 点唱房
|
||||
@@ -523,6 +529,10 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
|
||||
-(void)configBottomTools{
|
||||
if (self.roomModel.room_info.type_id.intValue == 6) {
|
||||
self.bottomView.isCabinRoom = YES;
|
||||
return;
|
||||
}
|
||||
self.bottomView.roomModel = self.roomModel;
|
||||
BOOL hasPK = NO;
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
@@ -731,6 +741,9 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
|
||||
}
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber{
|
||||
[self.seatContentView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber];
|
||||
}
|
||||
// 踢出房间
|
||||
-(void)userDidTakeOffWithUserInfo:(QXUserHomeModel *)userInfo{
|
||||
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
@@ -1606,6 +1619,28 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
|
||||
};
|
||||
_sendGiftView.jumpActivityGiftBlock = ^(QXGiftModel * _Nonnull gift, NSString * _Nonnull userIds) {
|
||||
if (gift.gift_bag.intValue == 10) {
|
||||
weakSelf.skyView.giftModel = gift;
|
||||
weakSelf.skyView.roomId = weakSelf.roomId;
|
||||
weakSelf.skyView.userIds = userIds;
|
||||
[weakSelf.sendGiftView hide];
|
||||
[weakSelf.skyView showInView:weakSelf.view];
|
||||
}else if(gift.gift_bag.intValue == 11) {
|
||||
weakSelf.ageView.giftModel = gift;
|
||||
weakSelf.ageView.roomId = weakSelf.roomId;
|
||||
weakSelf.ageView.userIds = userIds;
|
||||
[weakSelf.sendGiftView hide];
|
||||
[weakSelf.ageView showInView:weakSelf.view];
|
||||
}else if(gift.gift_bag.intValue == 12) {
|
||||
weakSelf.timeView.giftModel = gift;
|
||||
weakSelf.timeView.roomId = weakSelf.roomId;
|
||||
weakSelf.timeView.userIds = userIds;
|
||||
[weakSelf.sendGiftView hide];
|
||||
[weakSelf.timeView showInView:weakSelf.view];
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
return _sendGiftView;
|
||||
}
|
||||
@@ -1727,6 +1762,62 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
return _micTeamView;
|
||||
}
|
||||
//
|
||||
-(QXSkyPraizeView *)skyView{
|
||||
if (!_skyView) {
|
||||
_skyView = [[QXSkyPraizeView alloc] init];
|
||||
MJWeakSelf
|
||||
_skyView.startBlock = ^{
|
||||
[weakSelf.skyView hide];
|
||||
weakSelf.meetView.roomId = weakSelf.roomId;
|
||||
[weakSelf.meetView showInView:weakSelf.view];
|
||||
};
|
||||
}
|
||||
return _skyView;
|
||||
}
|
||||
-(QXAgePraizeView *)ageView{
|
||||
if (!_ageView) {
|
||||
_ageView = [[QXAgePraizeView alloc] init];
|
||||
MJWeakSelf
|
||||
_ageView.startBlock = ^{
|
||||
[weakSelf.ageView hide];
|
||||
weakSelf.meetView.roomId = weakSelf.roomId;
|
||||
[weakSelf.meetView showInView:weakSelf.view];
|
||||
};
|
||||
}
|
||||
return _ageView;
|
||||
}
|
||||
-(QXTimePraizeView *)timeView{
|
||||
if (!_timeView) {
|
||||
_timeView = [[QXTimePraizeView alloc] init];
|
||||
MJWeakSelf
|
||||
_timeView.startBlock = ^{
|
||||
[weakSelf.timeView hide];
|
||||
weakSelf.meetView.roomId = weakSelf.roomId;
|
||||
[weakSelf.meetView showInView:weakSelf.view];
|
||||
};
|
||||
}
|
||||
return _timeView;
|
||||
}
|
||||
-(QXMeetActivityView *)meetView{
|
||||
if (!_meetView) {
|
||||
_meetView = [[QXMeetActivityView alloc] init];
|
||||
_meetView.roomId = self.roomId;
|
||||
}
|
||||
return _meetView;
|
||||
}
|
||||
-(void)destroyViews{
|
||||
if (_skyView) {
|
||||
[_skyView destroyViews];
|
||||
_skyView = nil;
|
||||
}
|
||||
if (_ageView) {
|
||||
[_ageView destroyViews];
|
||||
_ageView = nil;
|
||||
}
|
||||
if (_timeView) {
|
||||
[_timeView destroyViews];
|
||||
_timeView = nil;
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user