This commit is contained in:
启星
2025-09-24 09:28:49 +08:00
parent dad4a5164d
commit 6b15cc818f
11 changed files with 75 additions and 39 deletions

View File

@@ -102,6 +102,9 @@ QXRoomUserInfoViewDelegate
} }
} }
[self playHWDMP4]; [self playHWDMP4];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[QXGiftPlayerManager shareManager] startPlay];
});
self.navigationController.viewControllers = marr; self.navigationController.viewControllers = marr;
// self.navigationController.interactivePopGestureRecognizer.enabled = NO; // self.navigationController.interactivePopGestureRecognizer.enabled = NO;
} }
@@ -110,8 +113,12 @@ QXRoomUserInfoViewDelegate
// [[QXGiftPlayerManager shareManager] stopPlay]; // [[QXGiftPlayerManager shareManager] stopPlay];
self.continuousView.hidden = YES; self.continuousView.hidden = YES;
[self stopHWDMP4]; [self stopHWDMP4];
}
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[[QXGiftPlayerManager shareManager] stopPlay];
}
-(void)initSubViews{ -(void)initSubViews{
// [self updateBgImage:@"room_background"]; // [self updateBgImage:@"room_background"];
@@ -235,9 +242,25 @@ QXRoomUserInfoViewDelegate
} }
#pragma mark - #pragma mark -
-(void)joinRoom{ -(void)joinRoom{
if (self.roomModel) {
[self resetSubviews];
[self configRoomDataIsJoin:YES];
}else{
MJWeakSelf
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
weakSelf.roomModel = roomModel;
[self resetSubviews];
[self configRoomDataIsJoin:YES];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
});
}];
}
[self resetSubviews];
[self configRoomDataIsJoin:YES];
//// roomModel.room_info.pk_room_id = @"33"; //// roomModel.room_info.pk_room_id = @"33";
// //
// //

View File

@@ -508,8 +508,8 @@ NSInteger maxMessageCount = 20;
make.top.equalTo(self.nameLabel.mas_bottom).offset(2); make.top.equalTo(self.nameLabel.mas_bottom).offset(2);
}]; }];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];
@@ -731,8 +731,8 @@ NSInteger maxMessageCount = 20;
make.top.equalTo(self.nameLabel.mas_bottom).offset(2); make.top.equalTo(self.nameLabel.mas_bottom).offset(2);
}]; }];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];

View File

@@ -308,8 +308,8 @@
self.nameLabel.text = md.nickname?md.nickname:@""; self.nameLabel.text = md.nickname?md.nickname:@"";
[self.iconBgView removeAllSubviews]; [self.iconBgView removeAllSubviews];
[self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)]; [self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0 ; i < md.icon.count; i++) { for (int i = 0 ; i < md.icon.count; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];
@@ -326,7 +326,7 @@
make.width.mas_equalTo(iconWidth); make.width.mas_equalTo(iconWidth);
make.height.mas_equalTo(iconHeight); make.height.mas_equalTo(iconHeight);
make.centerY.equalTo(self.iconBgView); make.centerY.equalTo(self.iconBgView);
make.centerX.equalTo(self.iconBgView).offset(-38/2+(margin+iconWidth)*i); make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i);
}]; }];
}else{ }else{
[iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -9,12 +9,14 @@
#import "QXRoomSeatContentView.h" #import "QXRoomSeatContentView.h"
#import "QXRoomSeatDelegate.h" #import "QXRoomSeatDelegate.h"
#import "QXUserModel.h" #import "QXUserModel.h"
#import "QXSelectAuctionInfoView.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QXRoomSeatTypeAuctionView : UIView @interface QXRoomSeatTypeAuctionView : UIView
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate; @property (nonatomic,weak)id<QXRoomSeatDelegate>delegate;
@property (nonatomic,strong)QXRoomModel *roomModel; @property (nonatomic,strong)QXRoomModel *roomModel;
@property (nonatomic,assign)NSInteger myPitNumber; @property (nonatomic,assign)NSInteger myPitNumber;
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView;
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number; -(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;

View File

@@ -8,7 +8,6 @@
#import "QXRoomSeatTypeAuctionView.h" #import "QXRoomSeatTypeAuctionView.h"
#import "QXRoomSeatContentView.h" #import "QXRoomSeatContentView.h"
#import "UIButton+QX.h" #import "UIButton+QX.h"
#import "QXSelectAuctionInfoView.h"
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXTimer.h" #import "QXTimer.h"
#import "QXRoomAuctionResultView.h" #import "QXRoomAuctionResultView.h"
@@ -63,7 +62,6 @@
@property (nonatomic,strong)QXRoomSeatContentView *sixthSeatView; @property (nonatomic,strong)QXRoomSeatContentView *sixthSeatView;
@property (nonatomic,strong)UIButton *moreBtn; @property (nonatomic,strong)UIButton *moreBtn;
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView;
@property (nonatomic,strong)NSMutableArray *seatArray; @property (nonatomic,strong)NSMutableArray *seatArray;
@property (nonatomic,strong)QXTimer *timer; @property (nonatomic,strong)QXTimer *timer;

View File

@@ -103,6 +103,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;
@@ -390,6 +393,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;
@@ -608,6 +614,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;

View File

@@ -210,7 +210,7 @@
} }
for (int i = 0;i<userModel.icon.count;i++) { for (int i = 0;i<userModel.icon.count;i++) {
NSString*icon = userModel.icon[i]; NSString*icon = userModel.icon[i];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*ScaleWidth(42), self.idLabel.bottom+5, ScaleWidth(42), ScaleWidth(16))]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*UserIconWidth, self.idLabel.bottom+5, UserIconWidth, UserIconHeight)];
[imageView sd_setImageWithURL:[NSURL URLWithString:icon]]; [imageView sd_setImageWithURL:[NSURL URLWithString:icon]];
[self addSubview:imageView]; [self addSubview:imageView];
[self.iconArray addObject:imageView]; [self.iconArray addObject:imageView];

View File

@@ -104,7 +104,7 @@
}]; }];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(42, 16); layout.itemSize = CGSizeMake(UserIconWidth, UserIconHeight);
layout.minimumLineSpacing = 7; layout.minimumLineSpacing = 7;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];

View File

@@ -274,8 +274,8 @@
- (void)awakeFromNib { - (void)awakeFromNib {
[super awakeFromNib]; [super awakeFromNib];
// Initialization code // Initialization code
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];

View File

@@ -13,6 +13,10 @@
//#define StatusHeight kSafeAreaTop + 20 //#define StatusHeight kSafeAreaTop + 20
///导航高度 + safe高 ///导航高度 + safe高
#define NavContentHeight (kSafeAreaTop + NavHeight) #define NavContentHeight (kSafeAreaTop + NavHeight)
///称号高
#define UserIconHeight 17
/// 称号宽
#define UserIconWidth 74
///导航高 ///导航高
#define NavHeight 44 #define NavHeight 44
///工具栏高度 ///工具栏高度