diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h index 7b2fdd8..5e52ec2 100644 --- a/QXLive/Base/QXGlobal.h +++ b/QXLive/Base/QXGlobal.h @@ -111,7 +111,7 @@ typedef void (^showFinishBlock)(void); /** 退出房间 */ --(void)quitRoomWithRoomId:(NSString*)roomId; +-(void)quitRoomWithRoomId:(NSString*)roomId removeListener:(BOOL)removeListener; /// 去完成任务 -(void)finishTask; diff --git a/QXLive/Base/QXGlobal.m b/QXLive/Base/QXGlobal.m index e0142a5..0772a54 100644 --- a/QXLive/Base/QXGlobal.m +++ b/QXLive/Base/QXGlobal.m @@ -242,6 +242,9 @@ } if ([roomId isEqualToString:self.roomId]) { if ([navagationController.viewControllers containsObject:self.roomVC]) { + if (![navagationController.visibleViewController isEqual:self.roomVC]) { + [navagationController popToViewController:self.roomVC animated:YES]; + } return; }else{ [UIApplication sharedApplication].idleTimerDisabled = YES; @@ -296,7 +299,7 @@ [[QXRoomMessageManager shared] joinGroupWithRoomId:roomId]; [QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) { if (weakSelf.roomId && ![weakSelf.roomId isEqualToString:roomId]) { - [weakSelf quitRoomWithRoomId:weakSelf.roomId]; + [weakSelf quitRoomWithRoomId:weakSelf.roomId removeListener:NO]; } // hideLoadingInView(KEYWINDOW) // roomModel.room_info.pk_room_id = @"33"; @@ -371,7 +374,7 @@ } } } --(void)quitRoomWithRoomId:(NSString *)roomId{ +-(void)quitRoomWithRoomId:(NSString *)roomId removeListener:(BOOL)removeListener{ [self stopKeepTimer]; [UIApplication sharedApplication].idleTimerDisabled = NO; /// 移除所有红包 @@ -389,7 +392,7 @@ /// 销毁整个声网示例 [[QXAgoraEngine sharedEngine] destroyEngine]; /// 退出直播群 - [[QXRoomMessageManager shared] quitGroupWithRoomId:roomId]; + [[QXRoomMessageManager shared] quitGroupWithRoomId:roomId removeListener:removeListener]; [[QXGlobal shareGlobal].offLineDict removeAllObjects]; [[NSNotificationCenter defaultCenter] removeObserver:self]; if (_roomVC) { diff --git a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m index 6cbbdaf..459bee0 100644 --- a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m +++ b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m @@ -511,7 +511,18 @@ self.giftModel = nil; self.pitUserListView.isSingle = NO; [self.pitUserListView.selectedArray removeAllObjects]; - self.pitUserListView.users = pitUsers; + NSMutableArray *arr = [NSMutableArray array]; + for (QXRoomPitModel *md in pitUsers) { + QXRoomPitModel *model = [QXRoomPitModel new]; + model.user_id = md.user_id; + model.nickname = md.nickname; + model.pit_number = md.pit_number; + model.sex = md.sex; + model.avatar = md.avatar; + model.user_code = md.user_code; + [arr addObject:model]; + } + self.pitUserListView.users = arr; [self getMyWallet]; } -(void)setUserModel:(QXRoomPitModel *)userModel{ diff --git a/QXLive/Login(登录)/Controlller/QXLoginViewController.m b/QXLive/Login(登录)/Controlller/QXLoginViewController.m index df15c37..76c5e78 100644 --- a/QXLive/Login(登录)/Controlller/QXLoginViewController.m +++ b/QXLive/Login(登录)/Controlller/QXLoginViewController.m @@ -253,7 +253,7 @@ model.navIsHidden = YES; model.preferredStatusBarStyle = UIStatusBarStyleDarkContent; - model.logoImage = [UIImage imageNamed:@"login_logo"]; + model.logoImage = [UIImage imageNamed:@"app_one_login_icon"]; model.logoFrameBlock = ^CGRect(CGSize screenSize, CGSize superViewSize, CGRect frame) { frame.origin = CGPointMake((SCREEN_WIDTH - 88) * .5, 150+ kSafeAreaTop); frame.size = CGSizeMake(88, 88); diff --git a/QXLive/Manager/QXRoomMessageManager.h b/QXLive/Manager/QXRoomMessageManager.h index 9e43e24..573acb4 100644 --- a/QXLive/Manager/QXRoomMessageManager.h +++ b/QXLive/Manager/QXRoomMessageManager.h @@ -324,7 +324,7 @@ NS_ASSUME_NONNULL_BEGIN -(void)joinGroupWithRoomId:(NSString*)roomId; /// 退出房间群组 --(void)quitGroupWithRoomId:(NSString*)roomId; +-(void)quitGroupWithRoomId:(NSString*)roomId removeListener:(BOOL)removeListener; -(void)sendChatMessage:(NSString *)message messageType:(QXRoomMessageType)messageType needInsertMessage:(BOOL)needInsertMessage; /// 发送表情 diff --git a/QXLive/Manager/QXRoomMessageManager.m b/QXLive/Manager/QXRoomMessageManager.m index cc5e0eb..3ed4da6 100644 --- a/QXLive/Manager/QXRoomMessageManager.m +++ b/QXLive/Manager/QXRoomMessageManager.m @@ -42,7 +42,7 @@ -(void)joinGroupWithRoomId:(NSString *)roomId{ MJWeakSelf if (self.groupId) { - [self quitGroupWithRoomId:self.groupId]; + [self quitGroupWithRoomId:self.groupId removeListener:YES]; } [[V2TIMManager sharedInstance] addGroupListener:self]; [[V2TIMManager sharedInstance] addAdvancedMsgListener:self]; @@ -56,12 +56,13 @@ QXLOG(@"腾讯IM加入聊天室失败-code%d-原因%@",code,desc); }]; } --(void)quitGroupWithRoomId:(NSString *)roomId{ - MJWeakSelf - self.groupId = nil; - self.roomId = nil; - [[V2TIMManager sharedInstance] removeGroupListener:self]; - [[V2TIMManager sharedInstance] removeAdvancedMsgListener:self]; +-(void)quitGroupWithRoomId:(NSString *)roomId removeListener:(BOOL)removeListener{ + if (removeListener) { + self.groupId = nil; + self.roomId = nil; + [[V2TIMManager sharedInstance] removeGroupListener:self]; + [[V2TIMManager sharedInstance] removeAdvancedMsgListener:self]; + } NSString *groupId = [NSString stringWithFormat:@"room%@",roomId]; [[V2TIMManager sharedInstance] quitGroup:groupId succ:^{ diff --git a/QXLive/Mine(音域)/Controller/QXMineViewController.m b/QXLive/Mine(音域)/Controller/QXMineViewController.m index 80e88b8..25b97bc 100644 --- a/QXLive/Mine(音域)/Controller/QXMineViewController.m +++ b/QXLive/Mine(音域)/Controller/QXMineViewController.m @@ -161,9 +161,25 @@ break; case QXMineServiceTypeSingerAuth:{ QXLOG(@"点击了歌手认证"); - QXRoomSingerAuthViewController *vc = [[QXRoomSingerAuthViewController alloc] init]; - vc.singer_status = self.userModel.singer_status; - [self.navigationController pushViewController:vc animated:YES]; + MJWeakSelf + if (![QXGlobal shareGlobal].isRealName) { + QXLOG(@"未实名,弹出实名认证"); + QXRealNamePopView *v = [[QXRealNamePopView alloc] init]; + v.closeActionBlock = ^{ + [[QXGlobal shareGlobal] hideViewBlock:^{}]; + }; + v.authActionBlock = ^{ + [[QXGlobal shareGlobal] hideViewBlock:^{ + QXRoomSingerAuthViewController *vc = [[QXRoomSingerAuthViewController alloc] init]; + vc.singer_status = weakSelf.userModel.singer_status; + [weakSelf.navigationController pushViewController:vc animated:YES]; + }]; + }; + [[QXGlobal shareGlobal] showView:v popType:(PopViewTypePopFromCenter) tapDismiss:NO finishBlock:^{}]; + }else{ + QXMyRoomViewController *vc = [[QXMyRoomViewController alloc] init]; + [self.navigationController pushViewController:vc animated:YES]; + } } break; case QXMineServiceTypeSongList:{ diff --git a/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m b/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m index 3c3538e..dea294f 100644 --- a/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m +++ b/QXLive/Mine(音域)/Controller/个人主页/QXUserHomePageViewController.m @@ -70,7 +70,7 @@ self.categoryView.delegate = self; self.categoryView.titleSelectedColor = QXConfig.textColor; self.categoryView.titleColor = RGB16(0x666666); - self.categoryView.titleFont = [UIFont boldSystemFontOfSize:12]; + self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14]; self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16]; self.categoryView.titleColorGradientEnabled = YES; self.categoryView.titleLabelZoomEnabled = YES; diff --git a/QXLive/Mine(音域)/Controller/亲密关系/QXIntimateViewController.m b/QXLive/Mine(音域)/Controller/亲密关系/QXIntimateViewController.m index 3f47b39..014caf1 100644 --- a/QXLive/Mine(音域)/Controller/亲密关系/QXIntimateViewController.m +++ b/QXLive/Mine(音域)/Controller/亲密关系/QXIntimateViewController.m @@ -122,7 +122,7 @@ MJWeakSelf QXIntimateMoreListCell *cell = [QXIntimateMoreListCell cellWithTableView:tableView]; cell.userId = self.userId; - QXRoomBestFriendListModel *md = self.dataArray.firstObject; + QXRoomBestFriendListModel *md = self.dataArray[indexPath.section-1]; cell.model = md.relation_list.firstObject; cell.delegate = self; cell.deleteSuccessBlock = ^(QXRelationshipListModel * _Nonnull model) { diff --git a/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m b/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m index ce1c945..a4602ed 100644 --- a/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m +++ b/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m @@ -61,7 +61,10 @@ weakSelf.priceView.model = model; [weakSelf.tableView reloadData]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + showToast(msg); + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [weakSelf.navigationController popViewControllerAnimated:YES]; + }); }]; } diff --git a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.h b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.h index ed1a38b..31e0b22 100644 --- a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.h +++ b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.h @@ -24,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) IBOutlet UILabel *timeLabel; @property (nonatomic,strong)QXRelationshipListModel *model; @property (nonatomic,strong)NSString *userId; +@property (weak, nonatomic) IBOutlet UIButton *deleteBtn; +@property (weak, nonatomic) IBOutlet UIButton *topBtn; @property (nonatomic,copy)void(^topSuccessBlock)(QXRelationshipListModel*model); @property (nonatomic,copy)void(^deleteSuccessBlock)(QXRelationshipListModel*model); @property (nonatomic,weak)iddelegate; diff --git a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.m b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.m index bb8f291..5b5ab1c 100644 --- a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.m +++ b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.m @@ -103,6 +103,13 @@ self.rightNameLabel.text = model.nickname1; self.rightSexImageView.image = [UIImage imageNamed:model.sex2.intValue == 1?@"user_sex_boy":@"user_sex_girl"]; } + if ([self.userId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { + self.topBtn.hidden = YES; + self.deleteBtn.hidden = YES; + }else{ + self.topBtn.hidden = NO; + self.deleteBtn.hidden = NO; + } NSTimeInterval currentTime = [[NSDate date] timeIntervalSince1970]; long long milliseconds = (long long)(currentTime); NSInteger time = model.end_time.longLongValue - milliseconds; diff --git a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.xib b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.xib index ed7560b..9160aed 100644 --- a/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.xib +++ b/QXLive/Mine(音域)/View/亲密关系/QXIntimateMoreListCell.xib @@ -166,6 +166,7 @@ + @@ -173,6 +174,7 @@ + diff --git a/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.m b/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.m index 6f5874f..b583a14 100644 --- a/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.m +++ b/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.m @@ -47,6 +47,7 @@ [self.priceBtn setTitle:model.market_value forState:(UIControlStateNormal)]; self.onlineLabel.text = model.is_online==1?@"当前在线":@"当前离线"; self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES; + self.continueBtn.hidden = NO; } - (IBAction)continueAction:(id)sender { diff --git a/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.xib b/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.xib index ee6ec03..19f874f 100644 --- a/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.xib +++ b/QXLive/Mine(音域)/View/家族/QXFamilyMemberCell.xib @@ -53,8 +53,8 @@ @@ -65,7 +65,7 @@ - + + + @@ -211,21 +211,22 @@ - + + - + diff --git a/QXLive/Mine(音域)/View/设置/QXBlackListCell.h b/QXLive/Mine(音域)/View/设置/QXBlackListCell.h index 252120b..7bcde8f 100644 --- a/QXLive/Mine(音域)/View/设置/QXBlackListCell.h +++ b/QXLive/Mine(音域)/View/设置/QXBlackListCell.h @@ -56,6 +56,8 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) IBOutlet UILabel *roleLabel; @property (nonatomic,assign)BOOL isUpSeat; +/// 是否显示icon标签 +@property (nonatomic,assign)BOOL isNoIcon; @property (nonatomic,strong)QXRoomUserInfoModel *onlineUser; diff --git a/QXLive/Mine(音域)/View/设置/QXBlackListCell.m b/QXLive/Mine(音域)/View/设置/QXBlackListCell.m index 1d7ccc0..ab2a9fe 100644 --- a/QXLive/Mine(音域)/View/设置/QXBlackListCell.m +++ b/QXLive/Mine(音域)/View/设置/QXBlackListCell.m @@ -174,18 +174,21 @@ }else{ self.sexImageView.hidden = YES; } - - if (rankModel.icon.count > 0) { - self.iconBgView.hidden = NO; - for (int i = 0;i < rankModel.icon.count;i++) { - if (i < 3) { - UIImageView *iconImageView = self.iconViewArray[i]; - iconImageView.hidden = NO; - [iconImageView sd_setImageWithURL:[NSURL URLWithString:rankModel.icon[i]]]; - } - } - }else{ + if (self.isNoIcon) { self.iconBgView.hidden = YES; + }else{ + if (rankModel.icon.count > 0) { + self.iconBgView.hidden = NO; + for (int i = 0;i < rankModel.icon.count;i++) { + if (i < 3) { + UIImageView *iconImageView = self.iconViewArray[i]; + iconImageView.hidden = NO; + [iconImageView sd_setImageWithURL:[NSURL URLWithString:rankModel.icon[i]]]; + } + } + }else{ + self.iconBgView.hidden = YES; + } } [self.removeBtn setTitle:[NSString stringWithFormat:@" %@",rankModel.total?rankModel.total:rankModel.gift_prices] forState:(UIControlStateNormal)]; @@ -271,6 +274,9 @@ break; } } +-(void)setIsNoIcon:(BOOL)isNoIcon{ + _isNoIcon = isNoIcon; +} - (void)awakeFromNib { [super awakeFromNib]; // Initialization code diff --git a/QXLive/Other/AppDelegate+Login.m b/QXLive/Other/AppDelegate+Login.m index 962a1b1..7a4b9c2 100644 --- a/QXLive/Other/AppDelegate+Login.m +++ b/QXLive/Other/AppDelegate+Login.m @@ -113,7 +113,7 @@ } -(void)takeOff{ if(QXGlobal.shareGlobal.roomId.length > 0){ - [[QXGlobal shareGlobal] quitRoomWithRoomId:QXGlobal.shareGlobal.roomId]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:QXGlobal.shareGlobal.roomId removeListener:YES]; } self.tabbarVC.selectedIndex = 3; QXBaseNavigationController *tabbarNa = (QXBaseNavigationController *)self.tabbarVC.selectedViewController; diff --git a/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/Contents.json b/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/Contents.json new file mode 100644 index 0000000..fdb5702 --- /dev/null +++ b/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "app_one_login_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/app_one_login_icon@2x.png b/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/app_one_login_icon@2x.png new file mode 100644 index 0000000..7fb44bd Binary files /dev/null and b/QXLive/Other/Assets.xcassets/app_one_login_icon.imageset/app_one_login_icon@2x.png differ diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController+Friend.m b/QXLive/Room(房间)/Controller/QXRoomViewController+Friend.m index 6ef8f7f..b3d071c 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController+Friend.m +++ b/QXLive/Room(房间)/Controller/QXRoomViewController+Friend.m @@ -77,7 +77,7 @@ } /// 有人退出交友房私密小屋 -(void)friendCabinRoomIsQuit{ - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId removeListener:YES]; NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers]; for (int i = 0; i < viewControllers.count; i++) { diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController.m b/QXLive/Room(房间)/Controller/QXRoomViewController.m index 26c6c9c..2099d89 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController.m +++ b/QXLive/Room(房间)/Controller/QXRoomViewController.m @@ -319,7 +319,7 @@ QXRoomUserInfoViewDelegate }failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { showToast(msg); - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId removeListener:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [weakSelf.navigationController popViewControllerAnimated:YES]; }); @@ -655,7 +655,11 @@ QXRoomUserInfoViewDelegate } BOOL hasSong = NO; if ((self.roomModel.room_info.type_id.intValue == 1) && self.roomModel.room_info.label_id.intValue == 2) { - hasSong = YES; + if (self.roomModel.pk_info) { + hasSong = NO; + }else{ + hasSong = YES; + } } /// 暂时不要pk // hasPK = NO; @@ -906,7 +910,7 @@ QXRoomUserInfoViewDelegate // 踢出房间 -(void)userDidTakeOffWithUserInfo:(QXUserHomeModel *)userInfo{ if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId removeListener:YES]; // self.navigationController.interactivePopGestureRecognizer.enabled = YES; [self.navigationController popViewControllerAnimated:YES]; } diff --git a/QXLive/Room(房间)/View/QXMiniRoomView.m b/QXLive/Room(房间)/View/QXMiniRoomView.m index d80e9ad..76c0dcf 100644 --- a/QXLive/Room(房间)/View/QXMiniRoomView.m +++ b/QXLive/Room(房间)/View/QXMiniRoomView.m @@ -101,7 +101,7 @@ -(void)closeAction{ [self.layer removeAnimationForKey:@"rotationAnimation"]; [self removeFromSuperview]; - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId removeListener:YES]; } -(void)handlePan:(UIPanGestureRecognizer*)recognizer{ diff --git a/QXLive/Room(房间)/View/QXRoomTitleView.m b/QXLive/Room(房间)/View/QXRoomTitleView.m index 5d48215..0598229 100644 --- a/QXLive/Room(房间)/View/QXRoomTitleView.m +++ b/QXLive/Room(房间)/View/QXRoomTitleView.m @@ -405,7 +405,7 @@ } -(void)leaveRoom{ if ([self.roomModel.room_info.type_id isEqualToString:@"6"] && [self.roomModel.room_info.label_id isEqualToString:@"5"]) { - [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId removeListener:YES]; NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers]; for (int i = 0; i < viewControllers.count; i++) { UIViewController *vc = [viewControllers objectAtIndex:i]; @@ -420,7 +420,7 @@ [self.navigationController popViewControllerAnimated:YES]; QXGlobal.shareGlobal.superRoomId = @""; }else{ - [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId]; + [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomId removeListener:YES]; [self.navigationController popViewControllerAnimated:YES]; } } diff --git a/QXLive/Room(房间)/View/排行榜/QXRoomRankSubView.m b/QXLive/Room(房间)/View/排行榜/QXRoomRankSubView.m index 0a5f71f..b18e194 100644 --- a/QXLive/Room(房间)/View/排行榜/QXRoomRankSubView.m +++ b/QXLive/Room(房间)/View/排行榜/QXRoomRankSubView.m @@ -233,6 +233,7 @@ cell.cellType = QXBlackListCellTypeRank; cell.backgroundColor = [UIColor clearColor]; cell.titleLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row+4]; + cell.isNoIcon = YES; cell.rankModel = self.dataArray[indexPath.row]; return cell; } @@ -318,36 +319,37 @@ self.nameLabel.text = md.nickname?md.nickname:@""; [self.iconBgView removeAllSubviews]; [self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)]; - CGFloat iconWidth = UserIconWidth; - CGFloat iconHeight = UserIconHeight; - CGFloat margin = 6; - for (int i = 0 ; i < md.icon.count; i++) { - UIImageView *iconImageView = [[UIImageView alloc] init]; - [iconImageView sd_setImageWithURL:[NSURL URLWithString:md.icon[i]]]; - [self.iconBgView addSubview:iconImageView]; - if (md.icon.count == 1) { - [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(iconWidth); - make.height.mas_equalTo(iconHeight); - make.centerY.centerX.equalTo(self.iconBgView); - }]; - }else if(md.icon.count == 2){ - [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(iconWidth); - make.height.mas_equalTo(iconHeight); - make.centerY.equalTo(self.iconBgView); - make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i); - }]; - }else{ - [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(i*(iconWidth+margin)); - make.width.mas_equalTo(iconWidth); - make.height.mas_equalTo(iconHeight); - make.centerY.equalTo(self.iconBgView); - }]; - } - - } + +// CGFloat iconWidth = UserIconWidth; +// CGFloat iconHeight = UserIconHeight; +// CGFloat margin = 6; +// for (int i = 0 ; i < md.icon.count; i++) { +// UIImageView *iconImageView = [[UIImageView alloc] init]; +// [iconImageView sd_setImageWithURL:[NSURL URLWithString:md.icon[i]]]; +// [self.iconBgView addSubview:iconImageView]; +// if (md.icon.count == 1) { +// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { +// make.width.mas_equalTo(iconWidth); +// make.height.mas_equalTo(iconHeight); +// make.centerY.centerX.equalTo(self.iconBgView); +// }]; +// }else if(md.icon.count == 2){ +// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { +// make.width.mas_equalTo(iconWidth); +// make.height.mas_equalTo(iconHeight); +// make.centerY.equalTo(self.iconBgView); +// make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i); +// }]; +// }else{ +// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { +// make.left.mas_equalTo(i*(iconWidth+margin)); +// make.width.mas_equalTo(iconWidth); +// make.height.mas_equalTo(iconHeight); +// make.centerY.equalTo(self.iconBgView); +// }]; +// } +// +// } } -(void)initSubviews{ self.headerImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_header_placehoulder"]]; @@ -404,6 +406,7 @@ }]; self.iconBgView = [[UIView alloc] init]; + self.iconBgView.hidden = YES; [self addSubview:self.iconBgView]; [self.iconBgView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.equalTo(self); @@ -419,7 +422,7 @@ [self addSubview:self.rankBtn]; [self.rankBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.equalTo(self); - make.top.equalTo(self.iconBgView.mas_bottom); + make.top.equalTo(self.nameLabel.mas_bottom).offset(5); make.height.mas_equalTo(16); }]; diff --git a/QXLive/Room(房间)/View/点唱/QXSingerSongListCell.m b/QXLive/Room(房间)/View/点唱/QXSingerSongListCell.m index 1bf4eeb..689cd31 100644 --- a/QXLive/Room(房间)/View/点唱/QXSingerSongListCell.m +++ b/QXLive/Room(房间)/View/点唱/QXSingerSongListCell.m @@ -68,7 +68,7 @@ self.playingLabel.hidden = NO; self.requestBtn.hidden = YES; }else{ - self.requestBtn.hidden = NO; + self.requestBtn.hidden = !self.isCompere; self.playingLabel.hidden = YES; } } diff --git a/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.h b/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.h index c694295..d56d885 100644 --- a/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.h +++ b/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,assign)NSInteger historyType; @property (nonatomic,assign)QXRoomPitModel* pitModel; @property (nonatomic,strong)NSString*roomId; - +-(void)updateSongList; @end NS_ASSUME_NONNULL_END diff --git a/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.m b/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.m index df5fb61..0ef0ca7 100644 --- a/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.m +++ b/QXLive/Room(房间)/View/点唱/QXSingerSongListContentView.m @@ -83,10 +83,11 @@ if (list.count == 0) { weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; }else{ - [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; } } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; }]; }else if (self.type == 1){ /// 已点歌曲 @@ -100,10 +101,11 @@ if (list.count == 0) { weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; }else{ - [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; } } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; }]; }else{ /// 历史歌曲 @@ -117,10 +119,11 @@ if (list.count == 0) { weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; }else{ - [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; } } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - + [weakSelf.tableView.mj_header endRefreshing]; + [weakSelf.tableView.mj_footer endRefreshing]; }]; } } diff --git a/QXLive/Room(房间)/View/点唱/QXSingerSongListView.m b/QXLive/Room(房间)/View/点唱/QXSingerSongListView.m index a05fdc6..bc1c0fa 100644 --- a/QXLive/Room(房间)/View/点唱/QXSingerSongListView.m +++ b/QXLive/Room(房间)/View/点唱/QXSingerSongListView.m @@ -99,6 +99,7 @@ [self.titles replaceObjectAtIndex:1 withObject:self.alreadySongTitle]; self.categoryView.titles = self.titles; [self.categoryView reloadDataWithoutListContainer]; + [self.alreadySongView updateSongList]; } -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ diff --git a/QXLive/Room(房间)/View/用户信息/QXRoomUserInfoView.m b/QXLive/Room(房间)/View/用户信息/QXRoomUserInfoView.m index bc4859d..60eff46 100644 --- a/QXLive/Room(房间)/View/用户信息/QXRoomUserInfoView.m +++ b/QXLive/Room(房间)/View/用户信息/QXRoomUserInfoView.m @@ -681,8 +681,12 @@ [weakSelf.collectionView reloadData]; weakSelf.idLabel.text = [NSString stringWithFormat:@"%@ ID:%@",model.sex.intValue==1?@"男":@"女",model.user_code]; weakSelf.guildLabel.text = [NSString stringWithFormat:@"所属公会:%@",[model.guild isExist]?model.guild:@"无"]; - if (![model.guild isExist] && ![weakSelf.userId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { - weakSelf.joinGuildBtn.hidden = NO; + if ([model.guild isExist]) { + if ([weakSelf.userId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { + weakSelf.joinGuildBtn.hidden = YES; + }else{ + weakSelf.joinGuildBtn.hidden = NO; + } }else{ weakSelf.joinGuildBtn.hidden = YES; } diff --git a/QXLive/Room(房间)/View/签约房/QXSignCoinListView.m b/QXLive/Room(房间)/View/签约房/QXSignCoinListView.m index 33ab788..3cebaa5 100644 --- a/QXLive/Room(房间)/View/签约房/QXSignCoinListView.m +++ b/QXLive/Room(房间)/View/签约房/QXSignCoinListView.m @@ -210,9 +210,9 @@ [weakSelf.collectionView reloadData]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { showToast(msg); - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [weakSelf getCoinList]; - }); +// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ +// [weakSelf getCoinList]; +// }); }]; } diff --git a/QXLive/Room(房间)/View/设置/QXRoomSettingView.m b/QXLive/Room(房间)/View/设置/QXRoomSettingView.m index bf16d65..9d054f5 100644 --- a/QXLive/Room(房间)/View/设置/QXRoomSettingView.m +++ b/QXLive/Room(房间)/View/设置/QXRoomSettingView.m @@ -308,7 +308,7 @@ } if (model.type == QXRoomSettingTypeRoomLeave) { [self.navigationController popViewControllerAnimated:YES]; - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id removeListener:YES]; return; } if (model.type == QXRoomSettingTypeRoomCompere) { diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.h b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.h index 8bfb015..cd2113c 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.h +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.h @@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,strong)QXRoomPitModel *pitModel; @property (nonatomic,assign)BOOL onlyShowHeader; @property (nonatomic,assign) BOOL isSeatSpeaking; +/// 不显示麦圈 +@property (nonatomic,assign) BOOL noMicCycle; @property (nonatomic,strong)NSString *is_lock; @property (nonatomic,strong)UIImageView *noUserImageView; diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m index c95e9dc..833cc12 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m @@ -218,6 +218,9 @@ QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict); } -(void)speakInfo:(NSNotification*)notice{ + if (self.noMicCycle) { + return; + } id object = notice.object; if ([object isKindOfClass:[AgoraRtcAudioVolumeInfo class]]) { AgoraRtcAudioVolumeInfo *info = (AgoraRtcAudioVolumeInfo*)object; @@ -241,6 +244,9 @@ -(void)setNoOffLine:(BOOL)noOffLine{ _noOffLine = noOffLine; } +-(void)setNoMicCycle:(BOOL)noMicCycle{ + _noMicCycle = noMicCycle; +} -(void)setIsPK:(BOOL)isPK{ _isPK = isPK; self.nameLabel.font = [UIFont systemFontOfSize:10]; diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeCabinView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeCabinView.m index dd91291..e30df89 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeCabinView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeCabinView.m @@ -330,7 +330,7 @@ -(void)leaveRoom{ UINavigationController *na = (UINavigationController *)KEYWINDOW.rootViewController; if ([self.roomModel.room_info.type_id isEqualToString:@"6"] && [self.roomModel.room_info.label_id isEqualToString:@"5"]) { - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id removeListener:YES]; NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:na.viewControllers]; for (int i = 0; i < viewControllers.count; i++) { UIViewController *vc = [viewControllers objectAtIndex:i]; @@ -346,7 +346,7 @@ [na popViewControllerAnimated:YES]; QXGlobal.shareGlobal.superRoomId = @""; }else{ - [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomModel.room_info.room_id]; + [[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomModel.room_info.room_id removeListener:YES]; // self.navigationController.interactivePopGestureRecognizer.enabled = YES; [na popViewControllerAnimated:YES]; } diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeFrientView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeFrientView.m index 89e542c..6d45143 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeFrientView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeFrientView.m @@ -1180,7 +1180,7 @@ if ([model.room_id isExist]) { QXGlobal.shareGlobal.superRoomId = self.roomModel.room_info.room_id; if ([model.user1_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id] || [model.user2_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { - [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id]; + [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id removeListener:YES]; [[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.viewController.navigationController]; } } diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeNormalView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeNormalView.m index d99441b..5f2a43c 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeNormalView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeNormalView.m @@ -74,7 +74,7 @@ static NSInteger maxSeat = 8; for (int i = 0 ; i < maxSeat ; i++) { QXRoomSeatContentView *contentView = [[QXRoomSeatContentView alloc] init]; contentView.number = i+1; - contentView.noOffLine = YES; +// contentView.noOffLine = YES; // [contentView addTapBlock:^(id _Nonnull obj) { // [weakSelf didClickSeatView:obj]; // }]; @@ -89,8 +89,8 @@ static NSInteger maxSeat = 8; } [self.seatArray addObject:self.compereView]; [self.seatArray addObject:self.guestView]; - self.compereView.noOffLine = YES; - self.guestView.noOffLine = YES; +// self.compereView.noOffLine = YES; +// self.guestView.noOffLine = YES; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSingerView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSingerView.m index 52049ab..0a565d2 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSingerView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSingerView.m @@ -82,6 +82,7 @@ }]; self.bossView = [[QXRoomSeatContentView alloc] init]; + self.bossView.noMicCycle = YES; self.bossView.tagString = @"老板"; self.bossView.delegate = self; self.bossView.number = 10; @@ -259,6 +260,9 @@ [self.delegate didClickUserHeaderWithPitModel:seatView.pitModel userModel:nil isPkRoom:NO pkRoomId:@"" isNoTakeOff:NO]; } }else{ + if (seatView == self.singerView) { + return; + } if (seatView.number == 9) { /// 麦位没人时点9号麦直接请求上麦 [self upseatCompere]; @@ -391,10 +395,11 @@ if (toPitNumber == 9) { self.compereView.contentView.hidden = NO; self.compereView.contentViewNoBodyBtn.hidden = YES; - }else{ - self.compereView.contentView.hidden = YES; - self.compereView.contentViewNoBodyBtn.hidden = NO; } +// else{ +// self.compereView.contentView.hidden = YES; +// self.compereView.contentViewNoBodyBtn.hidden = NO; +// } NSString* tmpPitNum = [NSString stringWithFormat:@"%@",fromPitModel.pit_number]; fromPitModel.pit_number = totModel.pit_number; totModel.pit_number = tmpPitNum;