This commit is contained in:
启星
2025-12-04 14:11:00 +08:00
parent 2d37ab6844
commit 1c5a908dda
49 changed files with 505 additions and 192 deletions

View File

@@ -41,7 +41,7 @@
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"在线用户(%@人)"),@"0"];
self.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"用户列表(%@人)"),@"0"];
self.titleLabel.textColor = QXConfig.textColor;
self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self.bgView addSubview:self.titleLabel];
@@ -91,7 +91,7 @@
[weakSelf.dataArray addObject:offPitList];
[weakSelf.allUsers addObjectsFromArray:onPitList];
[weakSelf.allUsers addObjectsFromArray:offPitList];
weakSelf.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"在线用户(%@人)"),[NSString stringWithFormat:@"%ld",onPitList.count+offPitList.count]];
weakSelf.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"用户列表(%@人)"),[NSString stringWithFormat:@"%ld",onPitList.count+offPitList.count]];
[weakSelf.tableView.mj_header endRefreshing];
[weakSelf.tableView reloadData];
if (weakSelf.onlineListBlock) {

View File

@@ -7,7 +7,7 @@
#import "QXSingerSongListCell.h"
#import "QXMineNetwork.h"
#import "QXCustomAlertView.h"
@implementation QXSingerSongListCell
+(instancetype)cellWithTableView:(UITableView *)tableView{
static NSString *cellId = @"QXSingerSongListCell";
@@ -84,12 +84,18 @@
self.bossLabel.text = [NSString stringWithFormat:@"老板:%@",model.boss_nickname];
}
- (IBAction)requestAction:(UIButton*)sender {
if ([sender.titleLabel.text isEqualToString:@"点歌"]) {
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"点歌成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
QXCustomAlertView *alert = [[QXCustomAlertView alloc] init];
NSString *message = [NSString stringWithFormat:@"您是否确认点歌\"%@\" \n演唱者%@ \n礼物价值%@金币",self.model.song_name,self.model.singer_nickname,self.model.gift_price];
[alert showInView:KEYWINDOW title:@"温馨提示" message:message cancleTitle:@"取消" commitTitle:@"确定"];
alert.commitBlock = ^{
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"点歌成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
};
}else{
MJWeakSelf
[QXMineNetwork requestSongToTopWithId:self.model.id successBlock:^(NSDictionary * _Nonnull dict) {

View File

@@ -641,6 +641,7 @@
weakSelf.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color] ;
[weakSelf.nameLabel startShimmer];
}else{
weakSelf.nameLabel.shimmerColor = UIColor.clearColor;
[weakSelf.nameLabel stopShimmer];
}
if (model.master) {
@@ -1008,6 +1009,8 @@
-(void)showInView:(UIView *)view{
self.cpDressView.hidden = YES;
[self.cpDressView resetView];
[view addSubview:self];
[UIView animateWithDuration:0.3 animations:^{
self.bgView.y = SCREEN_HEIGHT- ScaleWidth(429+33)-kSafeAreaBottom;

View File

@@ -51,7 +51,7 @@
self.cpTagLabel = [[UILabel alloc] init];
self.cpTagLabel.font = [UIFont systemFontOfSize:12];
self.cpTagLabel.textColor = RGB16A(0xFFFFFF,0.78);
self.cpTagLabel.text = @"CP";
self.cpTagLabel.text = @"心动";
[self addSubview:self.cpTagLabel];
[self.cpTagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self.cpTagImageView);

View File

@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXUserCpInfoModel *model;
-(void)headerStartPlay;
-(void)hideHeader;
-(void)resetView;
@end
NS_ASSUME_NONNULL_END

View File

@@ -56,6 +56,8 @@
self.mp4View.backgroundColor = [UIColor clearColor];
self.mp4View.hidden = YES;
[self addSubview:self.mp4View];
[self bringSubviewToFront:self.headerView1];
[self bringSubviewToFront:self.headerView2];
}
-(void)setModel:(QXUserCpInfoModel *)model{
@@ -228,6 +230,14 @@
[self.mp4View setMute:YES];
[self.mp4View playHWDMP4:self.videoPath repeatCount:INTMAX_MAX delegate:self];
}
-(void)resetView{
[self.headerView1 sd_cancelLatestImageLoad];
[self.headerView2 sd_cancelLatestImageLoad];
self.headerView1.image = nil;
self.headerView2.image = nil;
[self stopHWDMP4];
_model = nil;
}
//- (QXEffectSvgaView *)svgaView {
// if (!_svgaView) {
// _svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectZero isAutoPlay:YES];

View File

@@ -19,6 +19,7 @@
@property (nonatomic, assign) BOOL isLoadEffect;
@property (nonatomic, strong) QXRoomChatListModel *playModel;
@property (nonatomic, assign) BOOL isPlaying;
@property (nonatomic, assign) BOOL isBackground;
@end
@implementation QXCPEffectView
- (instancetype)initWithFrame:(CGRect)frame {
@@ -70,6 +71,9 @@
}];
}
-(void)displayCpEffectUrl:(QXRoomChatListModel *)model{
if (self.isBackground) {
return;
}
NSString *play_image = model.rights_icon;
dispatch_async(self.queue, ^{
/// play_imagereturn
@@ -99,6 +103,7 @@
});
}
-(void)stopPlay{
self.isBackground = YES;
// [self removeSvgaQueueData];
self.isLoadEffect = NO;
[self.svagView stopEffectSvgaPlay];
@@ -107,10 +112,11 @@
// [self.alphaVideoView stop];
self.playerMp4View.hidden = YES;
self.svagView.hidden = YES;
[self hideEffect];
}
-(void)startPlay{
self.isBackground = NO;
[self loadStartSVGAPlayer];
}
-(void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container{

View File

@@ -202,14 +202,17 @@
}
NSDictionary *parm = notice.object;
NSString *uid = [NSString stringWithFormat:@"%@",[parm objectForKey:@"user_id"]];
BOOL isOnline = [[parm objectForKey:@"is_online"] boolValue];
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:!isOnline] forKey:uid];
if ([uid isEqualToString:self.pitModel.user_id]) {
if (isOnline) {
self.offlineImageView.hidden = YES;
}else{
self.offlineImageView.hidden = NO;
[self stopAudioAnimation];
NSInteger isOnline = [[parm objectForKey:@"is_online"] integerValue];
if ([uid isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.offlineImageView.hidden = YES;
}else{
if ([uid isEqualToString:self.pitModel.user_id]) {
if (isOnline==1) {
self.offlineImageView.hidden = YES;
}else{
self.offlineImageView.hidden = NO;
[self stopAudioAnimation];
}
}
}
QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict);
@@ -379,8 +382,10 @@
}
if (pitModel.user_id.longValue > 0) {
BOOL is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] boolValue];
if (is_offline) {
NSInteger is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] integerValue];
if (is_offline==1) {
self.offlineImageView.hidden = YES;
}else if(is_offline == 2){
if (self.noOffLine) {
self.offlineImageView.hidden = YES;
}else{
@@ -389,6 +394,9 @@
}else{
self.offlineImageView.hidden = YES;
}
if ([pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.offlineImageView.hidden = YES;
}
self.numberLabel.hidden = YES;
self.headerView.hidden = NO;
self.nameLabel.hidden = NO;

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];
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:na.viewControllers];
for (int i = 0; i < viewControllers.count; i++) {
UIViewController *vc = [viewControllers objectAtIndex:i];

View File

@@ -95,9 +95,9 @@
[self addSubview:self.compereView];
[self.compereView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.bgImageView).offset(5);
make.width.mas_equalTo(ScaleWidth(45));
make.height.mas_equalTo(ScaleWidth(45-10)+51);
make.left.equalTo(self.bgImageView).offset(5);
make.width.mas_equalTo(ScaleWidth(50));
make.height.mas_equalTo(ScaleWidth(50-10)+51);
make.left.equalTo(self.bgImageView).offset(20);
}];
self.titleLabel = [[UILabel alloc] init];
@@ -287,8 +287,8 @@
[self.priceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.bgImageView).offset(22);
make.width.mas_equalTo(ScaleWidth(84));
make.height.mas_equalTo(ScaleWidth(94));
make.top.mas_equalTo(ScaleWidth(78)+20);
make.height.mas_equalTo(ScaleWidth(80));
make.top.mas_equalTo(ScaleWidth(100));
}];
self.priceTitleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_title_image"]];
@@ -297,6 +297,7 @@
make.centerX.equalTo(self.priceView);
make.width.mas_equalTo(ScaleWidth(56));
make.height.mas_equalTo(ScaleWidth(15));
make.top.equalTo(self.priceView);
}];
self.priceBottomView = [[UIView alloc] init];
@@ -314,7 +315,7 @@
make.centerX.equalTo(self.priceView);
make.width.mas_equalTo(ScaleWidth(40));
make.height.mas_equalTo(ScaleWidth(40));
make.top.mas_equalTo(ScaleWidth(20));
make.top.mas_equalTo(12);
}];
self.priceLabel = [[UILabel alloc] init];
@@ -564,6 +565,7 @@
}
-(void)coinListDidSignWithCoin:(NSString *)coin{
[QXProjectTools vibrationFeedback];
[QXMineNetwork signCoinWithSign_value:coin sign_id:self.roomModel.sign_info.sign_id successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -653,7 +655,7 @@
}
contentView.pitModel = model;
if (pit_number == 9 || pit_number == 1) {
if (contentView.number == 9 || contentView.number == 1) {
}else{
[contentView hideCharm];
@@ -720,7 +722,7 @@
self.roomModel.room_info.pit_list = arr;
toSeatView.pitModel = fromPitModel;
fromSeatView.pitModel = totModel;
if (toPitNumber == 9 || toPitNumber == 1) {
if (toSeatView.number == 9 || toSeatView.number == 1) {
}else{
[toSeatView hideCharm];
@@ -742,6 +744,11 @@
md.nickname_color = user.nickname_color;
md.mic_cycle = user.mic_cycle;
seatView.pitModel = md;
if (seatView.number == 9 || seatView.number == 1) {
}else{
[seatView hideCharm];
}
break;
}
}
@@ -783,7 +790,7 @@
showToast(@"场次错误");
return;
}
self.priceLabel.text = sign_value;
// self.priceLabel.text = sign_value;
if (_coinView) {
[_coinView refreshCoinListWith:sign_coin_list];
}

View File

@@ -189,7 +189,9 @@
for (QXRoomSeatContentView*seatView in self.seatArray) {
if (seatView.pitModel.user_id.longLongValue > 0) {
if (![seatView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[arr addObject:seatView.pitModel];
if (seatView.number != 9) {
[arr addObject:seatView.pitModel];
}
}
}
}

View File

@@ -1120,6 +1120,9 @@
if (self.roomModel == nil) {
return;
}
if (isUpSeat) {
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithInteger:user.is_online] forKey:user.user_id];
}
switch (self.type) {
case QXRoomSeatViewTypeNormal:
[self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];