完善个人资料页功能

完成多麦位
Bug fix
This commit is contained in:
eggmanQQQ
2024-06-27 21:31:00 +08:00
parent 71b7263fd6
commit fc92135ce6
103 changed files with 1771 additions and 469 deletions

View File

@@ -48,6 +48,8 @@
#import "MsRoomMessageMainView.h"
#import "RoomHeaderView.h"
#import "SocialStageView.h"
#import "TenMicStageView.h"
#import "FifteenMicStageView.h"
#import "DatingStageView.h"
#import "AnchorStageView.h"
#import "AnchorPkStageView.h"
@@ -103,6 +105,8 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
@property (nonatomic,strong) RoomHeaderView *roomHeaderView;
///
@property (nonatomic,strong) StageView *stageView;
@property (nonatomic,strong) TenMicStageView *tenMicStageView;
@property (nonatomic,strong) FifteenMicStageView *fifteenMicStageView;
///
@property (nonatomic,strong) MsRoomMessageMainView *messageContainerView;
///
@@ -324,10 +328,11 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[[NIMSDK sharedSDK].broadcastManager addDelegate:self];
[CountDownHelper shareHelper].delegate = self;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myGiftEffectUpdate:) name:kRoomGiftEffectUpdateNotificationKey object:nil];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showRoomFirstChargeWindowFormNot:) name:kShowFirstRechargeView object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showRoomFirstChargeWindowFormNot:) name:kShowFirstRechargeView object:nil];
[XPSkillCardPlayerManager shareInstance].isInRoom = YES;
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openRedPacketNotification:) name:@"kOpenRedPacketNotification" object:nil];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showSendheadlineView:) name:@"kShowSendheadlineView" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openRedPacketNotification:) name:@"kOpenRedPacketNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showSendheadlineView:) name:@"kShowSendheadlineView" object:nil];
[self addTimer];
}
@@ -374,7 +379,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
NSString *scrolling = redPacketDic[@"scrolling"];
[self.menuContainerView showInputView:scrolling];
}
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
@@ -424,6 +428,22 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self.view addSubview:self.animationView];
}
- (void)__layoutFifteenMicStage {
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.mas_equalTo(self.view);
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
make.height.mas_equalTo(self.stageView.hightForStageView);
}];
}
- (void)__layoutTenMicStage {
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.mas_equalTo(self.view);
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
make.height.mas_equalTo(self.stageView.hightForStageView);
}];
}
- (void)initSubViewConstraints {
[self.backContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
@@ -622,7 +642,19 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self.stageView removeFromSuperview];
self.stageView = nil;
self.stageView = [[LittleGameScrollStageView alloc] initWithDelegate:self];
}else if(self.roomInfo.hadChangeRoomType && ![self.stageView isKindOfClass:[SocialStageView class]]) {
}
else if(self.roomInfo.type == RoomType_15Mic) {
[self.stageView removeFromSuperview];
self.stageView = nil;
self.stageView = [[FifteenMicStageView alloc] initWithDelegate:self];
}else if(self.roomInfo.type == RoomType_10Mic) {
[self.stageView removeFromSuperview];
self.stageView = nil;
self.stageView = [[TenMicStageView alloc] initWithDelegate:self];
}
else if(self.roomInfo.hadChangeRoomType && ![self.stageView isKindOfClass:[SocialStageView class]]) {
[self.stageView removeFromSuperview];
self.stageView = nil;
self.stageView = [[SocialStageView alloc] initWithDelegate:self];
@@ -791,7 +823,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
- (void)exitLittleGame {
RoomInfoModel * roomInfo = self.getRoomInfo;
NSMutableDictionary * params = [NSMutableDictionary dictionary];
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
[params setObject:ticket forKey:@"ticket"];
[params setObject:@(roomInfo.uid).stringValue forKey:@"uid"];
@@ -810,7 +841,10 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
}
[params setObject:@(RoomType_Game) forKey:@"type"];
if (self.roomInfo.oldType == 0) {
self.roomInfo.oldType = RoomType_Game;
}
[params setObject:@(self.roomInfo.oldType) forKey:@"type"];
[params setObject:@"0" forKey:@"mgId"];
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
@@ -1107,7 +1141,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
self.hasAnimationEffect = roomInfo.hasAnimationEffect;
self.roomInfo = roomInfo;
self.userInfo = userInfo;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
[self.presenter getRedPacket:[NSString stringWithFormat:@"%ld", self.roomInfo.uid]];
@@ -1619,6 +1653,14 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
} else {
if (self.roomInfo.type == RoomType_Anchor) {
[self changeStageViewOnAnchorRoom];
} else if (self.roomInfo.type == RoomType_15Mic) {
[self __layoutFifteenMicStage];
[self changeStageViewOnRoomUpdate];
[self.fifteenMicStageView onRoomUpdate];
} else if (self.roomInfo.type == RoomType_10Mic) {
[self __layoutTenMicStage];
[self changeStageViewOnRoomUpdate];
[self.tenMicStageView onRoomUpdate];
} else {
[self changeStageViewOnRoomUpdate];
}
@@ -1701,8 +1743,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
self.userInfo.isFirstCharge = NO;
[self.menuContainerView onRoomUpdate];
[self.activityContainerView onRoomUpdate];
} else if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState) {
///iOS
NSDictionary * dic= attachment.data[@"roomInfo"];
@@ -1871,7 +1911,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
message.messageObject = object;
[self.messageContainerView handleNIMTextMessage:message];
}
}
//
@@ -2422,6 +2461,21 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
}
return _stageView;
}
- (TenMicStageView *)tenMicStageView {
if (!_tenMicStageView) {
_tenMicStageView = [[TenMicStageView alloc] initWithDelegate:self];
}
return _tenMicStageView;
}
- (FifteenMicStageView *)fifteenMicStageView {
if (!_fifteenMicStageView) {
_fifteenMicStageView = [[FifteenMicStageView alloc] initWithDelegate:self];
}
return _fifteenMicStageView;
}
- (XPRoomLittleGameContainerView *)littleGameView {
if (!_littleGameView) {
_littleGameView = [[XPRoomLittleGameContainerView alloc] initWithDelegate:self];