Commit 167d57d8 by suolong

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive…

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive into feature/v57版本pk迁移
parents 00aee5e3 e70b84b1
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
} }
// 打印解析结果 // 打印解析结果
if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){ if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){
NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]); // NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]);
NSLog(@"--->URL:%@\n%@",urlStr,dataDict);
} }
// 判断空值 // 判断空值
...@@ -351,7 +352,8 @@ ...@@ -351,7 +352,8 @@
} }
// 打印解析结果 // 打印解析结果
if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){ if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){
NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]); // NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]);
NSLog(@"--->URL:%@\n%@",urlStr,dataDict);
} }
// 判断空值 // 判断空值
...@@ -983,7 +985,8 @@ ...@@ -983,7 +985,8 @@
} }
// 打印解析结果 // 打印解析结果
if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){ if(FUSConfig.sharedInstanced.devConfigs.enableHttpDebug){
NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]); // NSLog(@"--->URL:%@\n%@",urlStr,[dataDict dictToUTF8String]);
NSLog(@"--->URL:%@\n%@",urlStr,dataDict);
} }
// 判断空值 // 判断空值
......
...@@ -673,7 +673,7 @@ ...@@ -673,7 +673,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202506260028; CURRENT_PROJECT_VERSION = 202506260030;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
...@@ -938,7 +938,7 @@ ...@@ -938,7 +938,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202506260028; CURRENT_PROJECT_VERSION = 202506260030;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
......
...@@ -692,6 +692,7 @@ ...@@ -692,6 +692,7 @@
00CD269B2F5956D100A07432 /* pk_multi_round_result_state_blue_lose_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26952F5956D100A07432 /* pk_multi_round_result_state_blue_lose_animation.webp */; }; 00CD269B2F5956D100A07432 /* pk_multi_round_result_state_blue_lose_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26952F5956D100A07432 /* pk_multi_round_result_state_blue_lose_animation.webp */; };
00CD269C2F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26972F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png */; }; 00CD269C2F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26972F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png */; };
00CD269D2F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26962F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp */; }; 00CD269D2F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26962F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp */; };
00CD26BD2F5A877E00A07432 /* live_bottom_tool_gift_guide_animate.webp in Resources */ = {isa = PBXBuildFile; fileRef = 00CD26BC2F5A877E00A07432 /* live_bottom_tool_gift_guide_animate.webp */; };
00D25B962D3113CE00666959 /* FUSLiveRecordsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B8B2D3113CE00666959 /* FUSLiveRecordsController.swift */; }; 00D25B962D3113CE00666959 /* FUSLiveRecordsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B8B2D3113CE00666959 /* FUSLiveRecordsController.swift */; };
00D25B972D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B8E2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m */; }; 00D25B972D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B8E2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m */; };
00D25B982D3113CE00666959 /* FUSLiveRecordsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B912D3113CE00666959 /* FUSLiveRecordsHeaderView.swift */; }; 00D25B982D3113CE00666959 /* FUSLiveRecordsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00D25B912D3113CE00666959 /* FUSLiveRecordsHeaderView.swift */; };
...@@ -3012,6 +3013,7 @@ ...@@ -3012,6 +3013,7 @@
00CD26962F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = pk_multi_round_result_state_draw_animation.webp; sourceTree = "<group>"; }; 00CD26962F5956D100A07432 /* pk_multi_round_result_state_draw_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = pk_multi_round_result_state_draw_animation.webp; sourceTree = "<group>"; };
00CD26972F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pk_multi_round_result_state_pending_animation@2x.png"; sourceTree = "<group>"; }; 00CD26972F5956D100A07432 /* pk_multi_round_result_state_pending_animation@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pk_multi_round_result_state_pending_animation@2x.png"; sourceTree = "<group>"; };
00CD26982F5956D100A07432 /* pk_multi_round_result_state_red_win_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = pk_multi_round_result_state_red_win_animation.webp; sourceTree = "<group>"; }; 00CD26982F5956D100A07432 /* pk_multi_round_result_state_red_win_animation.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = pk_multi_round_result_state_red_win_animation.webp; sourceTree = "<group>"; };
00CD26BC2F5A877E00A07432 /* live_bottom_tool_gift_guide_animate.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_bottom_tool_gift_guide_animate.webp; sourceTree = "<group>"; };
00D25B8B2D3113CE00666959 /* FUSLiveRecordsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRecordsController.swift; sourceTree = "<group>"; }; 00D25B8B2D3113CE00666959 /* FUSLiveRecordsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRecordsController.swift; sourceTree = "<group>"; };
00D25B8D2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSUserLiveAssessHistoryModel.h; sourceTree = "<group>"; }; 00D25B8D2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSUserLiveAssessHistoryModel.h; sourceTree = "<group>"; };
00D25B8E2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSUserLiveAssessHistoryModel.m; sourceTree = "<group>"; }; 00D25B8E2D3113CE00666959 /* FUSUserLiveAssessHistoryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSUserLiveAssessHistoryModel.m; sourceTree = "<group>"; };
...@@ -8404,6 +8406,7 @@ ...@@ -8404,6 +8406,7 @@
BEF675EC2C6B156500A670FB /* live_linkmic_bgImg.png */, BEF675EC2C6B156500A670FB /* live_linkmic_bgImg.png */,
BEF675ED2C6B156500A670FB /* live_pk_background_image.png */, BEF675ED2C6B156500A670FB /* live_pk_background_image.png */,
00A1DCF62CA6B2C50000541F /* liveRoom_patAudience_pat_animate.webp */, 00A1DCF62CA6B2C50000541F /* liveRoom_patAudience_pat_animate.webp */,
00CD26BC2F5A877E00A07432 /* live_bottom_tool_gift_guide_animate.webp */,
BEF675EE2C6B156500A670FB /* live_treasure_box_bg_img.png */, BEF675EE2C6B156500A670FB /* live_treasure_box_bg_img.png */,
00E2A7C82F20B8C9003B779E /* pk_start_sound_go.mp3 */, 00E2A7C82F20B8C9003B779E /* pk_start_sound_go.mp3 */,
00E2A7C92F20B8C9003B779E /* pk_start_sound_ready.mp3 */, 00E2A7C92F20B8C9003B779E /* pk_start_sound_ready.mp3 */,
...@@ -9897,6 +9900,7 @@ ...@@ -9897,6 +9900,7 @@
BEF678092C6B156600A670FB /* box_00003.png in Resources */, BEF678092C6B156600A670FB /* box_00003.png in Resources */,
BEF6775D2C6B156600A670FB /* PK_Win_Animation_16@2x.png in Resources */, BEF6775D2C6B156600A670FB /* PK_Win_Animation_16@2x.png in Resources */,
BEF6763B2C6B156500A670FB /* 2_live_activity_first_charge_bg_18.png in Resources */, BEF6763B2C6B156500A670FB /* 2_live_activity_first_charge_bg_18.png in Resources */,
00CD26BD2F5A877E00A07432 /* live_bottom_tool_gift_guide_animate.webp in Resources */,
BEF6777D2C6B156600A670FB /* PK_Win_Animation_48@2x.png in Resources */, BEF6777D2C6B156600A670FB /* PK_Win_Animation_48@2x.png in Resources */,
00A66C3E2CCA21F600F366E9 /* PK_Cover_Animation_12.png in Resources */, 00A66C3E2CCA21F600F366E9 /* PK_Cover_Animation_12.png in Resources */,
BEF677622C6B156600A670FB /* PK_Win_Animation_21@2x.png in Resources */, BEF677622C6B156600A670FB /* PK_Win_Animation_21@2x.png in Resources */,
...@@ -19,9 +19,9 @@ typedef enum : NSInteger { ...@@ -19,9 +19,9 @@ typedef enum : NSInteger {
FUSLiveBottomToolTypeScreenShot, // 截图按钮 FUSLiveBottomToolTypeScreenShot, // 截图按钮
FUSLiveBottomToolTypeMessageBox, // 单聊消息盒子 FUSLiveBottomToolTypeMessageBox, // 单聊消息盒子
FUSLiveBottomToolTypePK, // PK按钮 FUSLiveBottomToolTypePK, // PK按钮
FUSLiveBottomToolTypeGameEntrance, // 游戏入口 FUSLiveBottomToolTypeGameEntrance, // 游戏入口,就是类似于转盘那个,需要网络请求icon的
FUSLiveBottomToolTypeInteractionGameEntrance, // 互动游戏入口 FUSLiveBottomToolTypeInteractionGameEntrance, // 互动游戏入口,就是有很多游戏的按钮
FUSLiveBottomToolTypePKGameEntrance, // PK游戏入口 FUSLiveBottomToolTypePKGameEntrance, // PK游戏入口,就是游戏pk才会突然出现那个,fusi没有
FUSLiveBottomToolTypeTask, // 任务入口 FUSLiveBottomToolTypeTask, // 任务入口
FUSLiveBottomToolTypeExchange, // 兑换入口 FUSLiveBottomToolTypeExchange, // 兑换入口
FUSLiveBottomToolTypeFirstCharge, // 首充按钮 FUSLiveBottomToolTypeFirstCharge, // 首充按钮
......
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
@property (nonatomic, strong) UIButton *inputChatBtn; @property (nonatomic, strong) UIButton *inputChatBtn;
/// pk状态改变监听器
@property (nonatomic, strong) FUSPKControlDataOCAdapter *pkControlDataAdapter;
/// 引导波纹的view /// 引导波纹的view
@property (nonatomic, strong) FUSUserGuideRippleView *inputChatGuideRippleView; @property (nonatomic, strong) FUSUserGuideRippleView *inputChatGuideRippleView;
...@@ -73,6 +76,8 @@ ...@@ -73,6 +76,8 @@
@property (nonatomic, strong) UIButton *beautyBtn; @property (nonatomic, strong) UIButton *beautyBtn;
@property (nonatomic, strong) UIButton *giftBtn; @property (nonatomic, strong) UIButton *giftBtn;
/// 礼物引导图片
@property (nonatomic, strong) YYAnimatedImageView *giftGuideImageView;
@property (nonatomic, strong) UIButton *screenShotBtn; @property (nonatomic, strong) UIButton *screenShotBtn;
...@@ -96,6 +101,9 @@ ...@@ -96,6 +101,9 @@
@property (nonatomic, strong) UIView *giftMessageTipView; @property (nonatomic, strong) UIView *giftMessageTipView;
// MARK: 通知会改变到布局的地方
@property (nonatomic, assign) BOOL gameEntranceLoaded;
@end @end
@implementation FUSLiveBottomToolView @implementation FUSLiveBottomToolView
...@@ -668,6 +676,28 @@ ...@@ -668,6 +676,28 @@
} }
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_liveInteractionGameStateDidChanged:) name:STR(ROOM_CID_liveInteractionGameStateDidChanged) object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_liveInteractionGameStateDidChanged:) name:STR(ROOM_CID_liveInteractionGameStateDidChanged) object:nil];
self.gameEntranceLoaded = NO;
MJWeakSelf
self.pkControlDataAdapter = [[FUSPKControlDataOCAdapter alloc] init];
[self.pkControlDataAdapter fus_subscribePKControlUIStateWithStateHandler:^(FUSPKControlUIState pkstate) {
// if (![weakSelf.allBtnTypes containsObject:@(FFLiveBottomToolTypePK)]) {
// return;
// }
if (pkstate == FUSPKControlUIStateInMatching || pkstate == FUSPKControlUIStateWaitingAccept) {
[weakSelf changePKBtnStateImageWithPKBtnState:FUSLiveChatToolPKBtnStateCancel];
}else {
[weakSelf changePKBtnStateImageWithPKBtnState:FUSLiveChatToolPKBtnStateStart];
}
}];
[self.pkControlDataAdapter fus_subscribePKConnectStateWithStateHandler:^(FUSPKState state) {
[weakSelf fus_switchPKGameEntraceBtn];
}];
[self.pkControlDataAdapter fus_subscribePKGameplayGameModelWithStateHandler:^(FUSLiveGameModel * _Nullable vsGameplayGameModel) {
[weakSelf fus_switchPKGameEntraceBtn];
}];
} }
...@@ -705,18 +735,30 @@ ...@@ -705,18 +735,30 @@
} else { } else {
NSInteger lastIndex = 0; NSInteger lastIndex = 0;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) { // if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance; // lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance;
} else { // } else {
//
if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) { // if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) {
if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) { // if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) {
lastIndex = FUSLiveBottomToolTypeTool2; // lastIndex = FUSLiveBottomToolTypeTool2;
} else { // } else {
lastIndex = FUSLiveBottomToolTypeRoomScope; // lastIndex = FUSLiveBottomToolTypeRoomScope;
// }
// } else {
// lastIndex = FUSLiveBottomToolTypeShare;
// }
// }
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeFirstCharge)]) {
// 有首冲就在首冲后面
NSInteger firstChargeIndex = [self.allBtnTypes indexOfObject:@(FUSLiveBottomToolTypeFirstCharge)];
if (self.allBtnTypes.count > firstChargeIndex - 1 && firstChargeIndex - 1 > 0) {
lastIndex = [self.allBtnTypes[firstChargeIndex - 1] integerValue];
} }
} else { }
lastIndex = FUSLiveBottomToolTypeShare; else {
if (self.allBtnTypes.count > 2) {
lastIndex = [self.allBtnTypes[self.allBtnTypes.count - 2] integerValue];
} }
} }
...@@ -790,10 +832,15 @@ ...@@ -790,10 +832,15 @@
NSInteger lastIndex = 0; NSInteger lastIndex = 0;
if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) { if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) {
if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) { // if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) {
lastIndex = FUSLiveBottomToolTypeTool2; // lastIndex = FUSLiveBottomToolTypeTool2;
} else { // } else {
// lastIndex = FUSLiveBottomToolTypeRoomScope;
// }
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeRoomScope)]) {
lastIndex = FUSLiveBottomToolTypeRoomScope; lastIndex = FUSLiveBottomToolTypeRoomScope;
}else {
lastIndex = FUSLiveBottomToolTypeTool2;
} }
} else { } else {
lastIndex = FUSLiveBottomToolTypeShare; lastIndex = FUSLiveBottomToolTypeShare;
...@@ -803,47 +850,127 @@ ...@@ -803,47 +850,127 @@
} }
} }
-(void)fus_switchPKGameEntraceBtn{
#pragma mark - method // 新版本不需要游戏pk中突然显示出来那个pk按钮
return;
- (void)fus_updateDivisionBtnType { FUSPKState pkState = self.pkControlDataAdapter.pkState;
FUSLiveGameModel *vsGameplayGameModel = self.pkControlDataAdapter.vsGameplayGameModel;
// FFSettingInitDataVSGameConfigModel *pkGameConfig = BFModule(CommonService).oc_settingInitData.vsGameConfig;
FUSVSTypeGetListModel *pkGamePlayModel = [[FUSSwiftLiveHelper shared].pkHelper.ocViewModel.oc_vsDataModel fus_getPKGamePlayModel];
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeFirstCharge)]) { // if (pkGameConfig == nil || [pkGameConfig.gameUrl.description length] <= 0) {
_divisionBtnType = FUSLiveBottomToolTypeFirstCharge; // return;
// }
if (pkState == FUSPKStateNone || vsGameplayGameModel == nil) {
// 不显示
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
[self fus_removeBtnWithType:FUSLiveBottomToolTypePKGameEntrance];
} }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePK)]) { return;
_divisionBtnType = FUSLiveBottomToolTypePK; }
if (pkGamePlayModel.sort != 3) {
// 不是游戏类型,则不显示
return;
}
if (![self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)]) {
[self.pkGameEntranceBtn setWebImageWithSubURLString:vsGameplayGameModel.gameIcon placeholder:nil];
if (self.allBtnTypes.count >= 2) {
NSInteger insertIndex = 0;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)]) { if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypePKGameEntrance; // 顯示在玩法按鈕後
insertIndex = [self.allBtnTypes indexOfObject:@(FUSLiveBottomToolTypePKGameEntrance)] + 1;
} }
if ([FUSSwiftLiveHelper shared].liveType == FUSLiveTypeAnchor) {
// 如果是主播
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePK)]) {
// 顯示在PK按鈕後
insertIndex = [self.allBtnTypes indexOfObject:@(FUSLiveBottomToolTypePK)] + 1;
} }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)] && [self.allBtnTypes[self.allBtnTypes.count - 2] isEqual: @(FUSLiveBottomToolTypePKGameEntrance)]) { }
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeFirstCharge)]) {
// 如果有首充icon,則顯示在首充icon前。
insertIndex = [self.allBtnTypes indexOfObject:@(FUSLiveBottomToolTypeFirstCharge)];
}
if (insertIndex == self.allBtns.count - 1) {
/// 成为倒数第二个,那么就得以它为分界
_divisionBtnType = FUSLiveBottomToolTypePKGameEntrance; _divisionBtnType = FUSLiveBottomToolTypePKGameEntrance;
} }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeLinkMicro)]) {
_divisionBtnType = FUSLiveBottomToolTypeLinkMicro;
[self fus_insertBtnWithType:FUSLiveBottomToolTypePKGameEntrance index:insertIndex];
}
}
}
#pragma mark - method
-(void)fus_reloadNewUserGuide{
if ([FUSUserGuideTipsHelper share].oc_isNewUserGuide == YES) {
self.giftGuideImageView.hidden = NO;
if (!_inputChatGuideRippleView) {
_inputChatGuideRippleView = [[FUSUserGuideRippleView alloc] init];
_inputChatGuideRippleView.frame = [self fus_getBtnFrameWithToolType:FUSLiveBottomToolTypeAudienceMessage];
[self addSubview:_inputChatGuideRippleView];
} }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeGameEntrance)]) { }else {
self.giftGuideImageView.hidden = YES;
[self.inputChatGuideRippleView removeFromSuperview];
self.inputChatGuideRippleView = nil;
}
}
- (void)fus_updateDivisionBtnType {
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeFirstCharge)]) {
_divisionBtnType = FUSLiveBottomToolTypeFirstCharge;
}
// else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePK)]) {
// _divisionBtnType = FUSLiveBottomToolTypePK;
// if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypePKGameEntrance)]) {
// _divisionBtnType = FUSLiveBottomToolTypePKGameEntrance;
// }
// }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeGameEntrance)] && [self.allBtnTypes[self.allBtnTypes.count - 2] isEqual: @(FUSLiveBottomToolTypeGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeGameEntrance; _divisionBtnType = FUSLiveBottomToolTypeGameEntrance;
} else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) { }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeLinkMicro)] && [self.allBtnTypes[self.allBtnTypes.count - 2] isEqual: @(FUSLiveBottomToolTypeLinkMicro)]) {
_divisionBtnType = FUSLiveBottomToolTypeLinkMicro;
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)] && [self.allBtnTypes[self.allBtnTypes.count - 2] isEqual: @(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeInteractionGameEntrance; _divisionBtnType = FUSLiveBottomToolTypeInteractionGameEntrance;
}else { }else {
if (_viewType == FUSLiveBottomViewTypeHost) { if (self.allBtnTypes.count >= 2) {
if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) {
_divisionBtnType = FUSLiveBottomToolTypeTool2; _divisionBtnType = [self.allBtnTypes[self.allBtnTypes.count - 2] integerValue];
} else {
if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
_divisionBtnType = FUSLiveBottomToolTypeBeautySticker;
} else {
_divisionBtnType = FUSLiveBottomToolTypeRoomScope;
}
} }
}else{ else {
_divisionBtnType = FUSLiveBottomToolTypeShare; _divisionBtnType = FUSLiveBottomToolTypeShare;
} }
// if (_viewType == FUSLiveBottomViewTypeHost) {
// if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) {
// _divisionBtnType = FUSLiveBottomToolTypeTool2;
// } else {
// if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
// _divisionBtnType = FUSLiveBottomToolTypeBeautySticker;
// } else {
// _divisionBtnType = FUSLiveBottomToolTypeRoomScope;
// }
// }
// }else{
// _divisionBtnType = FUSLiveBottomToolTypeShare;
//
// }
} }
} }
...@@ -935,17 +1062,30 @@ ...@@ -935,17 +1062,30 @@
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) { if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance; lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance;
} else { }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeRoomScope)]) {
lastIndex = FUSLiveBottomToolTypeRoomScope;
if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) { }
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeBeautySticker)]) {
lastIndex = FUSLiveBottomToolTypeRoomScope;
}
else if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeTool2)]) {
lastIndex = FUSLiveBottomToolTypeTool2; lastIndex = FUSLiveBottomToolTypeTool2;
} else {
lastIndex = FUSLiveBottomToolTypeShare;
} }
else {
lastIndex = FUSLiveBottomToolTypeShare;
} }
// else {
//
//
// if (FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeAnchor) {
//
// lastIndex = FUSLiveBottomToolTypeTool2;
// } else {
// lastIndex = FUSLiveBottomToolTypeShare;
//
// }
// }
[self fus_insertBtnWithType:FUSLiveBottomToolTypeLinkMicro [self fus_insertBtnWithType:FUSLiveBottomToolTypeLinkMicro
...@@ -1207,6 +1347,14 @@ ...@@ -1207,6 +1347,14 @@
} }
} }
- (BOOL)fus_changeFrameNotificationsHaveArrived{
if (self.gameEntranceLoaded == NO) {
return NO;
}
[self fus_reloadNewUserGuide];
return YES;
}
#pragma mark - setter #pragma mark - setter
- (void)setKeyboardWillHideHandler:(keyboardWillHide)keyboardWillHideHandler{ - (void)setKeyboardWillHideHandler:(keyboardWillHide)keyboardWillHideHandler{
_keyboardWillHideHandler = keyboardWillHideHandler; _keyboardWillHideHandler = keyboardWillHideHandler;
...@@ -1304,6 +1452,21 @@ ...@@ -1304,6 +1452,21 @@
if (!_giftBtn) { if (!_giftBtn) {
_giftBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _giftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_giftBtn.tag = FUSLiveBottomToolTypeGift; _giftBtn.tag = FUSLiveBottomToolTypeGift;
if (!_giftGuideImageView) {
NSData *resourceData = [NSData dataWithContentsOfFile:[[FUSShowRoomCenterBunble bundle] pathForResource:@"live_bottom_tool_gift_guide_animate.webp" ofType:nil]];
YYImage *yyImage = [YYImage imageWithData:resourceData];
yyImage.preloadAllAnimatedImageFrames = YES;
_giftGuideImageView = [[YYAnimatedImageView alloc] init];
_giftGuideImageView.image = yyImage;
[_giftBtn addSubview:_giftGuideImageView];
[_giftGuideImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(_giftBtn);
make.width.equalTo(_giftBtn.mas_width).offset(10);
make.height.equalTo(_giftBtn.mas_height).offset(10);
}];
_giftGuideImageView.hidden = YES;
}
} }
return _giftBtn; return _giftBtn;
} }
...@@ -1380,6 +1543,17 @@ ...@@ -1380,6 +1543,17 @@
return _beautyStickerBtn; return _beautyStickerBtn;
} }
// fusi 不需要显示这个游戏pk中的pk按钮
//- (UIButton *)pkGameEntranceBtn {
// if (!_pkGameEntranceBtn) {
// _pkGameEntranceBtn = [UIButton buttonWithType:UIButtonTypeCustom];
// _pkGameEntranceBtn.tag = FUSLiveBottomToolTypePKGameEntrance;
// _pkGameEntranceBtn.layer.cornerRadius = BTN_WIDTH / 2.0f;
// _pkGameEntranceBtn.layer.masksToBounds = YES;
// }
// return _pkGameEntranceBtn;
//}
- (FUSLiveBottomToolSubView *)bottomSubView{ - (FUSLiveBottomToolSubView *)bottomSubView{
if (!_bottomSubView) { if (!_bottomSubView) {
......
...@@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 游戏样式参数,参考之前网页与客户端约定那套样式 /// 游戏样式参数,参考之前网页与客户端约定那套样式
@property (nonatomic, copy) NSDictionary *popupStyle; @property (nonatomic, copy) NSDictionary *popupStyle;
@property (nonatomic, copy) NSString *popupStyleString;
@end @end
@interface FUSLivePlayModel : FUSBaseModel @interface FUSLivePlayModel : FUSBaseModel
......
...@@ -20,6 +20,24 @@ ...@@ -20,6 +20,24 @@
@implementation FUSLiveGameModel @implementation FUSLiveGameModel
+ (NSDictionary *)modelCustomPropertyMapper {
return @{@"popupStyleString": @"popupStyle"};
}
- (void)setPopupStyleString:(NSString *)popupStyleString {
_popupStyleString = popupStyleString;
// 1. 将 JSON 字符串转换为 NSData
NSData *jsonData = [popupStyleString dataUsingEncoding:NSUTF8StringEncoding];
// 2. 使用 NSJSONSerialization 将 JSON 数据解析为 NSDictionary
NSError *error = nil;
id jsonObject = [NSJSONSerialization JSONObjectWithData:jsonData
options:NSJSONReadingMutableContainers
error:&error];
self.popupStyle = jsonObject;
}
@end @end
@implementation FUSLivePlayModel @implementation FUSLivePlayModel
......
...@@ -57,6 +57,7 @@ class FUSPKGiftBombInfoPanelView: FUSBaseView { ...@@ -57,6 +57,7 @@ class FUSPKGiftBombInfoPanelView: FUSBaseView {
if giftBombModel.status != 1 { if giftBombModel.status != 1 {
// 系统不显示 // 系统不显示
self.isHidden = true self.isHidden = true
return
} }
self.isHidden = false self.isHidden = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment