修改提交

This commit is contained in:
启星
2025-12-04 23:35:49 +08:00
parent 1c5a908dda
commit 57975eafc1
38 changed files with 216 additions and 112 deletions

View File

@@ -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++) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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<UITouch *> *)touches withEvent:(UIEvent *)event{

View File

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