Commit ae92fae4 by pidan

备份私享房相关的代码

parent 3ace3508
Showing with 368 additions and 344 deletions
...@@ -57,6 +57,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -57,6 +57,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL pushFlowSizeSwitch; @property (nonatomic, assign) BOOL pushFlowSizeSwitch;
/// 引导开启通知分钟数(7410起加) /// 引导开启通知分钟数(7410起加)
@property (nonatomic, assign) NSInteger guideTime; @property (nonatomic, assign) NSInteger guideTime;
/// 私享房私信默认选中礼物ID
@property (nonatomic, assign) NSInteger initRoomPrivateImGiftId;
@end @end
......
...@@ -77,12 +77,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey"; ...@@ -77,12 +77,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// App Version /// App Version
- (NSString *)appVersion { - (NSString *)appVersion {
return @"7701"; return @"7702";
} }
/// App Dot Version /// App Dot Version
- (NSString *)appDotVersion { - (NSString *)appDotVersion {
return @"7.7.0.1"; return @"7.7.0.2";
} }
/// App Id /// App Id
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
- (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face; - (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face;
- (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face jumpToGid:(NSString *)gid;
- (BOOL)conversationIsCaller; - (BOOL)conversationIsCaller;
- (NSString *)callOrderId; - (NSString *)callOrderId;
......
...@@ -23,7 +23,8 @@ typedef NS_ENUM(NSInteger, FUSChatDetailFrom) { ...@@ -23,7 +23,8 @@ typedef NS_ENUM(NSInteger, FUSChatDetailFrom) {
+ (FUSChatDetailViewController *)fus_showChatDetailVCWithRootVC:(UIViewController *)rootVC + (FUSChatDetailViewController *)fus_showChatDetailVCWithRootVC:(UIViewController *)rootVC
uid:(NSString *)uid uid:(NSString *)uid
nickName:(NSString *)nickName nickName:(NSString *)nickName
face:(NSString *)face; face:(NSString *)face
jumpToGid:(NSString *)jumpToGid;
/** /**
会话ID 会话ID
...@@ -62,7 +63,7 @@ typedef NS_ENUM(NSInteger, FUSChatDetailFrom) { ...@@ -62,7 +63,7 @@ typedef NS_ENUM(NSInteger, FUSChatDetailFrom) {
@param nickName 对方名字 @param nickName 对方名字
@return @return
*/ */
- (instancetype)initWithUid:(NSString *)uid faceUrl:(NSString *)faceUrl nickName:(NSString *)nickName; - (instancetype)initWithUid:(NSString *)uid faceUrl:(NSString *)faceUrl nickName:(NSString *)nickName jumpToGid:(NSString *)jumpToGid;
// 结束编辑状态,暴露出来的原因是为了给直播间页面强制结束键盘的弹起 // 结束编辑状态,暴露出来的原因是为了给直播间页面强制结束键盘的弹起
- (void)fus_endEditState; - (void)fus_endEditState;
......
...@@ -130,14 +130,17 @@ ...@@ -130,14 +130,17 @@
// 贴纸动效 // 贴纸动效
@property (nonatomic, strong) FUSImageFallDownFromTopView *fallDownImageView; @property (nonatomic, strong) FUSImageFallDownFromTopView *fallDownImageView;
@property (nonatomic, copy) NSString *jumpToGid;
@end @end
@implementation FUSChatDetailViewController @implementation FUSChatDetailViewController
+ (FUSChatDetailViewController *)fus_showChatDetailVCWithRootVC:(UIViewController *)rootVC + (FUSChatDetailViewController *)fus_showChatDetailVCWithRootVC:(UIViewController *)rootVC
uid:(NSString *)uid uid:(NSString *)uid
nickName:(NSString *)nickName nickName:(NSString *)nickName
face:(NSString *)face { face:(NSString *)face
jumpToGid:(NSString *)jumpToGid {
// 是从聊天界面跳转过来的 // 是从聊天界面跳转过来的
if ([FUSIMChatService shareInstance].chatDelegate) { if ([FUSIMChatService shareInstance].chatDelegate) {
...@@ -157,13 +160,13 @@ ...@@ -157,13 +160,13 @@
[[FUSIMChatService shareInstance] fus_jumpToNewChatDetailVcWithNewTalkID:uid nickname:nickName face:face]; [[FUSIMChatService shareInstance] fus_jumpToNewChatDetailVcWithNewTalkID:uid nickname:nickName face:face];
return (FUSChatDetailViewController *)([FUSIMChatService shareInstance].chatDelegate); return (FUSChatDetailViewController *)([FUSIMChatService shareInstance].chatDelegate);
} else { } else {
FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:uid faceUrl:face nickName:nickName]; FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:uid faceUrl:face nickName:nickName jumpToGid:jumpToGid];
[rootVC.navigationController pushViewController:chatDetailVC animated:YES]; [rootVC.navigationController pushViewController:chatDetailVC animated:YES];
return chatDetailVC; return chatDetailVC;
} }
} else { } else {
FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:uid faceUrl:face nickName:nickName]; FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:uid faceUrl:face nickName:nickName jumpToGid:jumpToGid];
[rootVC.navigationController pushViewController:chatDetailVC animated:YES]; [rootVC.navigationController pushViewController:chatDetailVC animated:YES];
return chatDetailVC; return chatDetailVC;
} }
...@@ -173,7 +176,7 @@ ...@@ -173,7 +176,7 @@
#pragma mark - init #pragma mark - init
- (instancetype)initWithUid:(NSString *)uid faceUrl:(NSString *)faceUrl nickName:(NSString *)nickName{ - (instancetype)initWithUid:(NSString *)uid faceUrl:(NSString *)faceUrl nickName:(NSString *)nickName jumpToGid:(NSString *)jumpToGid{
self = [super init]; self = [super init];
if (self) { if (self) {
...@@ -189,6 +192,7 @@ ...@@ -189,6 +192,7 @@
_talkID = uid; _talkID = uid;
_talkIcon = faceUrl; _talkIcon = faceUrl;
_talkName = nickName; _talkName = nickName;
_jumpToGid = jumpToGid;
_userFaceUrl = [[[FUSCacheDataShare shareStore] userDetailInfo] face]; _userFaceUrl = [[[FUSCacheDataShare shareStore] userDetailInfo] face];
} }
return self; return self;
...@@ -471,6 +475,12 @@ ...@@ -471,6 +475,12 @@
[self.view addSubview:self.fallDownImageView]; [self.view addSubview:self.fallDownImageView];
} }
[[FUSIMChatService shareInstance] fus_playCurrentTalkMessageStickerEffect]; [[FUSIMChatService shareInstance] fus_playCurrentTalkMessageStickerEffect];
if (self.jumpToGid.length != 0) {
[self fus_showSendGiftState];
[self.inputToolbar.giftView fus_setSelectedGift:self.jumpToGid];
self.jumpToGid = nil;
}
} }
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
...@@ -1480,7 +1490,7 @@ ...@@ -1480,7 +1490,7 @@
UINavigationController *rootNav = self.targetVC.navigationController; UINavigationController *rootNav = self.targetVC.navigationController;
[self fus_onClickNavBackBtn]; [self fus_onClickNavBackBtn];
FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:newTalkID faceUrl:faceUrl nickName:nickname]; FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:newTalkID faceUrl:faceUrl nickName:nickname jumpToGid:@""];
[rootNav pushViewController:chatDetailVC animated:NO]; [rootNav pushViewController:chatDetailVC animated:NO];
} }
......
...@@ -277,7 +277,7 @@ import SJAttributesStringMaker ...@@ -277,7 +277,7 @@ import SJAttributesStringMaker
} else { } else {
// 非单聊控制器 // 非单聊控制器
if let singleChatVC = FUSChatDetailViewController(uid: fid, faceUrl: self?.callOtherInfo.value?.faceUrl, nickName: self?.callOtherInfo.value?.nickname) { if let singleChatVC = FUSChatDetailViewController(uid: fid, faceUrl: self?.callOtherInfo.value?.faceUrl, nickName: self?.callOtherInfo.value?.nickname, jumpToGid: "") {
UIViewController.fus_top()?.navigationController?.pushViewController(singleChatVC, animated: true) UIViewController.fus_top()?.navigationController?.pushViewController(singleChatVC, animated: true)
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: { DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
...@@ -1184,7 +1184,7 @@ extension FUSChatCallHelper { ...@@ -1184,7 +1184,7 @@ extension FUSChatCallHelper {
} else { } else {
// 非单聊控制器 // 非单聊控制器
if let singleChatVC = FUSChatDetailViewController(uid: fid, faceUrl: self?.callOtherInfo.value?.faceUrl, nickName: self?.callOtherInfo.value?.nickname) { if let singleChatVC = FUSChatDetailViewController(uid: fid, faceUrl: self?.callOtherInfo.value?.faceUrl, nickName: self?.callOtherInfo.value?.nickname, jumpToGid: "") {
UIViewController.fus_top()?.navigationController?.pushViewController(singleChatVC, animated: true) UIViewController.fus_top()?.navigationController?.pushViewController(singleChatVC, animated: true)
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: { DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
......
...@@ -52,4 +52,9 @@ ...@@ -52,4 +52,9 @@
*/ */
- (void)fus_reloadGiftView; - (void)fus_reloadGiftView;
/**
选中礼物
*/
- (void)fus_setSelectedGift:(NSString *)gid;
@end @end
...@@ -237,6 +237,27 @@ ...@@ -237,6 +237,27 @@
} }
} }
/**
选中礼物
*/
- (void)fus_setSelectedGift:(NSString *)gid {
for (NSInteger i = 0; i < self.dataSource.count; i++) {
FUSChatGiftDataModel *giftModel = [self.dataSource objectAtIndex:i];
NSInteger currentGidInt = giftModel.gid.integerValue;
NSInteger jumpGidInt = gid.integerValue;
if (currentGidInt == jumpGidInt) {
_selectedIndex = i;
// 取出 model
self.currentSelectedGiftModel = giftModel;
self.giftDesLabel.attributedText = [self handleGiftDescription:self.currentSelectedGiftModel];
[self.giftCollectionView reloadData];
return;
}
}
}
#pragma mark - Collection Delegate #pragma mark - Collection Delegate
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
- (void)fus_initChatView - (void)fus_initChatView
{ {
FUSZoneInfosModel *userInfo = [FUSRouter.userRouter selectZoneInfosTableWithUid:_uid]; FUSZoneInfosModel *userInfo = [FUSRouter.userRouter selectZoneInfosTableWithUid:_uid];
_chatVC = [[FUSChatDetailViewController alloc] initWithUid:_uid faceUrl:userInfo.face nickName:userInfo.nickname]; _chatVC = [[FUSChatDetailViewController alloc] initWithUid:_uid faceUrl:userInfo.face nickName:userInfo.nickname jumpToGid:@""];
_chatVC.pushFrom = FUSChatDetailFromLive; _chatVC.pushFrom = FUSChatDetailFromLive;
CGRect chatVCFrame = self.bounds; CGRect chatVCFrame = self.bounds;
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
FUSIntimatesFriendModel *model = self.friendsDataList[indexPath.row]; FUSIntimatesFriendModel *model = self.friendsDataList[indexPath.row];
FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:model.uid faceUrl:model.face nickName:model.nickname]; FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:model.uid faceUrl:model.face nickName:model.nickname jumpToGid:@""];
if (self.didSelectedCellBlock) { if (self.didSelectedCellBlock) {
self.didSelectedCellBlock(model); self.didSelectedCellBlock(model);
} }
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
[FUSRouter.chatRouter fus_pushToServiceControllerWithUID:model.uid face:model.face nikename:model.nickname welcome:nil animate:YES]; [FUSRouter.chatRouter fus_pushToServiceControllerWithUID:model.uid face:model.face nikename:model.nickname welcome:nil animate:YES];
}else{ }else{
[FUSTalkingData fus_trackEvent:FUSChatEventTrackParams.fus_EVENT_MESSAGE_CHATPAGE]; [FUSTalkingData fus_trackEvent:FUSChatEventTrackParams.fus_EVENT_MESSAGE_CHATPAGE];
FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:model.uid faceUrl:model.face nickName:model.nickname]; FUSChatDetailViewController *chatDetailVC = [[FUSChatDetailViewController alloc] initWithUid:model.uid faceUrl:model.face nickName:model.nickname jumpToGid:@""];
[self.viewController.navigationController pushViewController:chatDetailVC animated:YES]; [self.viewController.navigationController pushViewController:chatDetailVC animated:YES];
} }
} else if ([model.typeId hasPrefix:FUSChatPublicDefine.fus_officialMsgType]) { } else if ([model.typeId hasPrefix:FUSChatPublicDefine.fus_officialMsgType]) {
......
...@@ -535,7 +535,7 @@ ...@@ -535,7 +535,7 @@
break; break;
case 8: // 跳转聊天界面 case 8: // 跳转聊天界面
{ {
FUSChatDetailViewController *chatDetailVc = [[FUSChatDetailViewController alloc]initWithUid:msgModel.clickdata faceUrl:nil nickName:nil]; FUSChatDetailViewController *chatDetailVc = [[FUSChatDetailViewController alloc]initWithUid:msgModel.clickdata faceUrl:nil nickName:nil jumpToGid:@""];
[self.navigationController pushViewController:chatDetailVc animated:YES]; [self.navigationController pushViewController:chatDetailVc animated:YES];
} }
break; break;
......
...@@ -82,14 +82,18 @@ ...@@ -82,14 +82,18 @@
} }
- (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face { - (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face {
[self fus_chatWithUser:userId nickname:nickname face:face jumpToGid:@""];
}
- (void)fus_chatWithUser:(NSString *)userId nickname:(NSString *)nickname face:(NSString *)face jumpToGid:(NSString *)gid {
if ([EMClient sharedClient].isLoggedIn) { if ([EMClient sharedClient].isLoggedIn) {
[FUSChatDetailViewController fus_showChatDetailVCWithRootVC:[UIViewController fus_topViewController] uid:userId nickName:nickname face:face]; [FUSChatDetailViewController fus_showChatDetailVCWithRootVC:[UIViewController fus_topViewController] uid:userId nickName:nickname face:face jumpToGid:gid];
} else { } else {
[FUSIMUserService shareInstance].imLoginSucceedHandler = ^{ [FUSIMUserService shareInstance].imLoginSucceedHandler = ^{
[FUSChatDetailViewController fus_showChatDetailVCWithRootVC:[UIViewController fus_topViewController] uid:userId nickName:nickname face:face]; [FUSChatDetailViewController fus_showChatDetailVCWithRootVC:[UIViewController fus_topViewController] uid:userId nickName:nickname face:face jumpToGid:gid];
}; };
} }
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "live_startv2_openScope_cell@2x.png", "filename" : "live_start_openScope_cell@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "live_startv2_openScope_cell@3x.png", "filename" : "live_start_openScope_cell@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "live_start_openScope_img@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "live_startv2_openScope_img@3x.png", "filename" : "live_start_openScope_img@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "親密圈(選中)@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "親密圈(選中)@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "全公開@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "全公開@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "全公開(選中)@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "全公開(選中)@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "live_start_passwordScope_cell@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "live_startv2_followScope_img@3x.png", "filename" : "live_start_passwordScope_cell@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "live_startv2_followScope_cell@2x.png", "filename" : "live_start_passwordScope_img@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "live_startv2_followScope_cell@3x.png", "filename" : "live_start_passwordScope_img@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "關注圈@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "關注圈@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "關注圈@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "關注圈@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "親密圈@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "親密圈@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "親密圈@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "親密圈@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "全公开@2x.png", "filename" : "live_RoomScope_normal@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "全公开@3x.png", "filename" : "live_RoomScope_normal@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "live_startv2_intimacyScope_cell@2x.png", "filename" : "live_RoomScope_password@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "live_startv2_intimacyScope_cell@3x.png", "filename" : "live_RoomScope_password@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "全公开@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "全公开@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_push_live_time_bg_follow_scope@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_push_live_time_bg_follow_scope@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_push_live_time_bg_intimate_scope@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_push_live_time_bg_intimate_scope@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "追蹤圈@2x.png", "filename" : "live_push_live_time_bg_password_scope@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "追蹤圈@3x.png", "filename" : "live_push_live_time_bg_password_scope@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "追蹤圈(選中)@2x.png", "filename" : "live_room_password_room_icon@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "追蹤圈(選中)@3x.png", "filename" : "live_room_password_room_icon@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "親密圈@2x.png", "filename" : "live_start_view_password_btn@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "親密圈@3x.png", "filename" : "live_start_view_password_btn@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -170,6 +170,10 @@ typedef enum : NSUInteger { ...@@ -170,6 +170,10 @@ typedef enum : NSUInteger {
- (NSString *)fus_getLiveBitrate; - (NSString *)fus_getLiveBitrate;
- (void)fus_showPasswordBlurView;
- (void)fus_hidePasswordBlurView;
@end @end
@interface FUSLiveMainViewController(Pip) @interface FUSLiveMainViewController(Pip)
......
...@@ -134,6 +134,9 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -134,6 +134,9 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
@property (nonatomic, strong) VELPictureInPictureController *pipController; @property (nonatomic, strong) VELPictureInPictureController *pipController;
@property (nonatomic, strong) UIVisualEffectView *passwordBlurView;
@end @end
@implementation FUSLiveMainViewController @implementation FUSLiveMainViewController
...@@ -687,7 +690,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -687,7 +690,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
[self.liveFunctionView.chatTableView fus_addEnterRoomSystemTipMessage]; [self.liveFunctionView.chatTableView fus_addEnterRoomSystemTipMessage];
[FUSLiveHttpHelper fus_enterRoomWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId vdoid:[FUSLiveHelper shareInstance].streamModel.vdoid success:^(FUSRoomInfoModel *roomInfoModel,BOOL micMode, NSString *streamUrl, NSString *pkInfo) { [FUSLiveHttpHelper fus_enterRoomWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId vdoid:[FUSLiveHelper shareInstance].streamModel.vdoid password:@"" success:^(FUSRoomInfoModel *roomInfoModel,BOOL micMode, NSString *streamUrl, NSString *pkInfo) {
if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) { if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) {
FUSLogInfo(@"不是当前包房"); FUSLogInfo(@"不是当前包房");
...@@ -2089,6 +2092,22 @@ typedef NS_ENUM(NSInteger, FUSStreamState) { ...@@ -2089,6 +2092,22 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
return nil; return nil;
} }
- (void)fus_showPasswordBlurView {
self.passwordBlurView = [[UIVisualEffectView alloc] initWithFrame:self.view.bounds];
self.passwordBlurView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
self.passwordBlurView.alpha = 1;
[self.view addSubview:self.passwordBlurView];
}
- (void)fus_hidePasswordBlurView {
[self.passwordBlurView removeFromSuperview];
self.passwordBlurView = nil;
}
#pragma mark - ScrollView Delegate #pragma mark - ScrollView Delegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView - (void)scrollViewDidScroll:(UIScrollView *)scrollView
{ {
......
...@@ -1199,6 +1199,7 @@ ...@@ -1199,6 +1199,7 @@
} }
if ([NSString isNull:originalStreamUrl]) { if ([NSString isNull:originalStreamUrl]) {
// 播放live // 播放live
[[[FUSLiveHelper shareInstance] liveVC] initPlayView];
[[[self liveVC] playView] fus_playWithUID:currentRoomId Url:pullUrl]; [[[self liveVC] playView] fus_playWithUID:currentRoomId Url:pullUrl];
} }
...@@ -1207,11 +1208,38 @@ ...@@ -1207,11 +1208,38 @@
} }
[self.roomInfoModel fus_setValueWithDict:roomInfo];
self.roomInfoModel.reminderKeys = reminderKey;
[self.currentFunctionView.chatTableView fus_addEnterRoomSystemTipMessage];
[self fus_audienceJoinRoomWithRoomId:currentRoomId]; /// 密码房(0:否、1:是)
NSInteger encryption = [roomInfo[@"encryption"] integerValue];
if (encryption == 1) {
[self.liveVC fus_showPasswordBlurView];
[FUSLiveStartSetPasswordView fus_createForAudienceWithClickHandler:^(BOOL succeed, NSString *password) {
if (succeed == false) {
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
} else {
[self.liveVC fus_hidePasswordBlurView];
[self.roomInfoModel fus_setValueWithDict:roomInfo];
self.roomInfoModel.reminderKeys = reminderKey;
[self.currentFunctionView.chatTableView fus_addEnterRoomSystemTipMessage];
[self fus_audienceJoinRoomWithRoomId:currentRoomId password:password];
}
}];
} else {
[self.roomInfoModel fus_setValueWithDict:roomInfo];
self.roomInfoModel.reminderKeys = reminderKey;
[self.currentFunctionView.chatTableView fus_addEnterRoomSystemTipMessage];
[self fus_audienceJoinRoomWithRoomId:currentRoomId password:@""];
}
} failure:^(NSDictionary * _Nonnull errorDict, NSString * _Nonnull msg, int code) { } failure:^(NSDictionary * _Nonnull errorDict, NSString * _Nonnull msg, int code) {
...@@ -1241,11 +1269,11 @@ ...@@ -1241,11 +1269,11 @@
2. 调用 JoinRoom 接口 2. 调用 JoinRoom 接口
*/ */
- (void)fus_audienceJoinRoomWithRoomId:(NSString *)currentRoomId { - (void)fus_audienceJoinRoomWithRoomId:(NSString *)currentRoomId password:(NSString *)password {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_enterRoomWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId vdoid:[FUSLiveHelper shareInstance].streamModel.vdoid success:^(FUSRoomInfoModel *roomInfoModel,BOOL micMode, NSString *streamUrl, NSString *pkInfo) { [FUSLiveHttpHelper fus_enterRoomWithRoomId:[FUSLiveHelper shareInstance].roomInfoModel.roomId vdoid:[FUSLiveHelper shareInstance].streamModel.vdoid password:password ?: @"" success:^(FUSRoomInfoModel *roomInfoModel,BOOL micMode, NSString *streamUrl, NSString *pkInfo) {
if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) { if (![roomInfoModel.roomId isEqualToString:[FUSLiveHelper shareInstance].roomInfoModel.roomId]) {
FUSLogInfo(@"不是当前包房"); FUSLogInfo(@"不是当前包房");
...@@ -1413,7 +1441,7 @@ ...@@ -1413,7 +1441,7 @@
[FUSAlertView showAlertWithTitle:nil message:[NSString fus_localString:@"网络出错,是否重新进入包房?"] cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_localString:@"确定"], [NSString fus_localString:@"退出"]] clickBlock:^(NSInteger buttonIndex) { [FUSAlertView showAlertWithTitle:nil message:[NSString fus_localString:@"网络出错,是否重新进入包房?"] cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_localString:@"确定"], [NSString fus_localString:@"退出"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 0) { if (buttonIndex == 0) {
[self fus_audienceJoinRoomWithRoomId:currentRoomId]; [self fus_audienceJoinRoomWithRoomId:currentRoomId password:password];
}else{ }else{
[FUSLiveHelper fus_quitLiveWithCompletion:nil]; [FUSLiveHelper fus_quitLiveWithCompletion:nil];
} }
......
...@@ -88,8 +88,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -88,8 +88,8 @@ NS_ASSUME_NONNULL_BEGIN
@param failure 失败回调 @param failure 失败回调
*/ */
+ (void)fus_enterRoomGetPredataWithRoomId:(NSString *)roomId + (void)fus_enterRoomGetPredataWithRoomId:(NSString *)roomId
success:(void(^)(NSDictionary *dataDict))success success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure; failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure;
/** /**
加入直播间 加入直播间
v3.9.0 v3.9.0
...@@ -101,6 +101,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -101,6 +101,7 @@ NS_ASSUME_NONNULL_BEGIN
*/ */
+ (void)fus_enterRoomWithRoomId:(NSString *)roomId + (void)fus_enterRoomWithRoomId:(NSString *)roomId
vdoid:(NSString *)vdoid vdoid:(NSString *)vdoid
password:(NSString *)password
success:(void(^)(FUSRoomInfoModel *roomInfoModel, BOOL micMode,NSString *streamUrl, NSString *pkInfo))success success:(void(^)(FUSRoomInfoModel *roomInfoModel, BOOL micMode,NSString *streamUrl, NSString *pkInfo))success
failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure; failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure;
...@@ -186,10 +187,22 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -186,10 +187,22 @@ NS_ASSUME_NONNULL_BEGIN
/// @param success 成功回调 /// @param success 成功回调
/// @param failure 失败回调 /// @param failure 失败回调
+ (void)fus_requestChangedPassword:(NSInteger)cancel + (void)fus_requestChangedPassword:(NSInteger)cancel
fid:(NSInteger)fid fid:(NSInteger)fid
password:(NSString *)password password:(NSString *)password
success:(void (^)(void))success success:(void (^)(void))success
failure:(void (^)(NSString *msg, int code))failure; failure:(void (^)(NSString *msg, int code))failure;
/**
验证私享房密码
@param roomId 直播间 ID
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_verifyPasswordWithRoomId:(NSString *)roomId
password:(NSString *)password
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure;
/// 更改直播间的类型 /// 更改直播间的类型
...@@ -750,9 +763,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -750,9 +763,9 @@ NS_ASSUME_NONNULL_BEGIN
@param failure 失败回调 @param failure 失败回调
*/ */
+ (void)fus_requestPopularDataWithRoomID:(NSString *)roomID + (void)fus_requestPopularDataWithRoomID:(NSString *)roomID
channelId:(NSString *)channelId channelId:(NSString *)channelId
success:(void(^)(NSArray<FUSLivePopularRankModel *> *popularArr))success success:(void(^)(NSArray<FUSLivePopularRankModel *> *popularArr))success
failure:(void(^)(NSString *, int))failure; failure:(void(^)(NSString *, int))failure;
/** /**
请求直播间游戏配置 请求直播间游戏配置
...@@ -780,8 +793,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -780,8 +793,8 @@ NS_ASSUME_NONNULL_BEGIN
/// @param succeed 成功回调 /// @param succeed 成功回调
/// @param failure 失败回调 /// @param failure 失败回调
+ (void)fus_getIMSendChatResult:(NSArray *)userIds + (void)fus_getIMSendChatResult:(NSArray *)userIds
succeed:(void(^)(NSArray<NSString *> *notList))succeed succeed:(void(^)(NSArray<NSString *> *notList))succeed
failure:(void(^)(NSString *msg,NSInteger code))failure; failure:(void(^)(NSString *msg,NSInteger code))failure;
/// 回撩 /// 回撩
/// @param roomId 房间id /// @param roomId 房间id
...@@ -879,7 +892,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -879,7 +892,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param succeed 成功回调 /// @param succeed 成功回调
/// @param failure 失败回调 /// @param failure 失败回调
+ (void)fus_updateLiveTheme:(NSString *)roomId + (void)fus_updateLiveTheme:(NSString *)roomId
channelId:(NSString *)channelId channelId:(NSString *)channelId
themeId:(NSInteger)themeId themeId:(NSInteger)themeId
content:(NSString *)content content:(NSString *)content
succeed:(void (^)(NSDictionary *dataDict, int code))succeed succeed:(void (^)(NSDictionary *dataDict, int code))succeed
...@@ -890,7 +903,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -890,7 +903,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param succeed 成功回调 /// @param succeed 成功回调
/// @param failure 失败回调 /// @param failure 失败回调
+ (void)fus_requestLiveBeforeReadyWithSucceed:(void (^)(FUSLiveBeforeReadyModel *model))succeed + (void)fus_requestLiveBeforeReadyWithSucceed:(void (^)(FUSLiveBeforeReadyModel *model))succeed
failure:(void (^)(NSString *, int))failure; failure:(void (^)(NSString *, int))failure;
/// 主播直播清晰度上报,可以取存储的,但是这里最好直接使用赋值的 /// 主播直播清晰度上报,可以取存储的,但是这里最好直接使用赋值的
/// @param bid 选中的质量id /// @param bid 选中的质量id
...@@ -984,9 +997,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -984,9 +997,9 @@ NS_ASSUME_NONNULL_BEGIN
/// @param succeed 成功回调 /// @param succeed 成功回调
/// @param failure 失败回调 /// @param failure 失败回调
+ (void)fus_requestLiveContributeList:(NSString *)roomId + (void)fus_requestLiveContributeList:(NSString *)roomId
channelId:(NSString *)channelId channelId:(NSString *)channelId
page:(NSInteger)page page:(NSInteger)page
succeed:(void (^)(NSDictionary *dataDict, int code))succeed succeed:(void (^)(NSDictionary *dataDict, int code))succeed
failure:(void (^)(NSString *, NSInteger))failure; failure:(void (^)(NSString *, NSInteger))failure;
@end @end
......
...@@ -361,6 +361,44 @@ ...@@ -361,6 +361,44 @@
}]; }];
} }
/**
验证私享房密码
@param roomId 直播间 ID
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_verifyPasswordWithRoomId:(NSString *)roomId
password:(NSString *)password
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure {
// 空值校验
if ([NSString isNullWithString:roomId]) {
if (failure) {
failure(nil, @"参数错误", ERROR_CODE);
}
return;
}
NSDictionary *params = @{@"fid":roomId,
@"password":password};
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_LIVE_ROOM_VERIFY_PASSWORD params:params success:^(NSDictionary *dataDict, int code) {
if (success) {
success(dataDict);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(dataDict, FAILURE_MESSAGE, code);
}
}];
}
/** /**
...@@ -374,6 +412,7 @@ ...@@ -374,6 +412,7 @@
*/ */
+ (void)fus_enterRoomWithRoomId:(NSString *)roomId + (void)fus_enterRoomWithRoomId:(NSString *)roomId
vdoid:(NSString *)vdoid vdoid:(NSString *)vdoid
password:(NSString *)password
success:(void(^)(FUSRoomInfoModel *roomInfoModel, BOOL micMode, NSString *streamUrl, NSString *pkInfo))success success:(void(^)(FUSRoomInfoModel *roomInfoModel, BOOL micMode, NSString *streamUrl, NSString *pkInfo))success
failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure failure:(void(^)(NSDictionary *errorDict, NSString *msg, int code))failure
{ {
...@@ -390,7 +429,8 @@ ...@@ -390,7 +429,8 @@
} }
NSDictionary *params = @{@"roomid":roomId, NSDictionary *params = @{@"roomid":roomId,
@"vdoid":vdoid @"vdoid":vdoid,
@"password":password
}; };
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_LIVE_ENTER_ROOM params:params success:^(NSDictionary *dataDict, int code) { [FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_LIVE_ENTER_ROOM params:params success:^(NSDictionary *dataDict, int code) {
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
break; break;
case FUSLiveBottomToolTypeRoomScope: case FUSLiveBottomToolTypeRoomScope:
if (isSelect) { if (isSelect) {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_preesed"]; // image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_preesed"];
} else { } else {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"]; image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"];
} }
......
...@@ -125,7 +125,6 @@ ...@@ -125,7 +125,6 @@
@(FUSLiveBottomToolTypeShare), @(FUSLiveBottomToolTypeShare),
@(FUSLiveBottomToolTypeTool2), @(FUSLiveBottomToolTypeTool2),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeGift)]];
_divisionBtnType = FUSLiveBottomToolTypeTool2;
} else { } else {
if (FUSConfig.sharedInstanced.devConfigs.appStatus) { if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
...@@ -134,7 +133,6 @@ ...@@ -134,7 +133,6 @@
@(FUSLiveBottomToolTypeBeautySticker), @(FUSLiveBottomToolTypeBeautySticker),
// @(FUSLiveBottomToolTypeRoomScope), // @(FUSLiveBottomToolTypeRoomScope),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeGift)]];
_divisionBtnType = FUSLiveBottomToolTypeBeautySticker;
}else{ }else{
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeTool), _allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeTool),
@(FUSLiveBottomToolTypeShare), @(FUSLiveBottomToolTypeShare),
...@@ -142,21 +140,26 @@ ...@@ -142,21 +140,26 @@
@(FUSLiveBottomToolTypeBeautySticker), @(FUSLiveBottomToolTypeBeautySticker),
@(FUSLiveBottomToolTypeRoomScope), @(FUSLiveBottomToolTypeRoomScope),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeGift)]];
_divisionBtnType = FUSLiveBottomToolTypeRoomScope;
} }
} }
if (!isHaveGiftBtn) { if (!isHaveGiftBtn) {
[_allBtnTypes removeObject:@(FUSLiveBottomToolTypeGift)]; [_allBtnTypes removeObject:@(FUSLiveBottomToolTypeGift)];
} }
[self initBtnsWithTypes:_allBtnTypes]; [self initBtnsWithTypes:_allBtnTypes];
}else{ }else{
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage),
@(FUSLiveBottomToolTypeTool), if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
@(FUSLiveBottomToolTypeShare), _allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeTool),
_divisionBtnType = FUSLiveBottomToolTypeShare; // @(FUSLiveBottomToolTypeShare),
@(FUSLiveBottomToolTypeGift)]];
} else {
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage),
@(FUSLiveBottomToolTypeTool),
@(FUSLiveBottomToolTypeShare),
@(FUSLiveBottomToolTypeGift)]];
}
[self initBtnsWithTypes:_allBtnTypes]; [self initBtnsWithTypes:_allBtnTypes];
} }
...@@ -257,6 +260,7 @@ ...@@ -257,6 +260,7 @@
[btn removeFromSuperview]; [btn removeFromSuperview];
[_allBtnTypes removeObjectAtIndex:index]; [_allBtnTypes removeObjectAtIndex:index];
[_allBtns removeObjectAtIndex:index]; [_allBtns removeObjectAtIndex:index];
[self fus_updateDivisionBtnType];
[self fus_layoutBtnFrame]; [self fus_layoutBtnFrame];
} }
} }
...@@ -532,14 +536,25 @@ ...@@ -532,14 +536,25 @@
- (void)fus_updateRoomScoreType { - (void)fus_updateRoomScoreType {
UIImage *image;
//TODO: 修改图片 if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_intimate_normal"]; UIImage *image;
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_password"];
} else {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"];
}
[self.roomScopeBtn setImage:image forState:UIControlStateNormal];
} else { } else {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"];
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
[self fus_removeBtnWithType:FUSLiveBottomToolTypeShare];
} else {
[self fus_insertBtnWithType:FUSLiveBottomToolTypeShare index:self.divisionBtnType];
}
[self fus_layoutBtnFrame];
} }
[self.roomScopeBtn setImage:image forState:UIControlStateNormal];
} }
- (void)fus_updateBtnImageWithType:(FUSLiveBottomToolType)type image:(UIImage *)image state:(UIControlState *)state{ - (void)fus_updateBtnImageWithType:(FUSLiveBottomToolType)type image:(UIImage *)image state:(UIControlState *)state{
...@@ -662,8 +677,6 @@ ...@@ -662,8 +677,6 @@
if (_gameEntranceModel.type == 1) { if (_gameEntranceModel.type == 1) {
} else { } else {
_divisionBtnType = FUSLiveBottomToolTypeGameEntrance;
NSInteger lastIndex = 0; NSInteger lastIndex = 0;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) { if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance; lastIndex = FUSLiveBottomToolTypeInteractionGameEntrance;
...@@ -687,7 +700,6 @@ ...@@ -687,7 +700,6 @@
}else{ }else{
if (_viewType == FUSLiveBottomViewTypeGuest) { if (_viewType == FUSLiveBottomViewTypeGuest) {
_divisionBtnType = FUSLiveBottomToolTypeShare;
[self fus_removeBtnWithType:FUSLiveBottomToolTypeGameEntrance]; [self fus_removeBtnWithType:FUSLiveBottomToolTypeGameEntrance];
return; return;
} }
...@@ -749,17 +761,12 @@ ...@@ -749,17 +761,12 @@
if (shown && ![self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) { if (shown && ![self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeInteractionGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeInteractionGameEntrance;
if ([self.allBtnTypes containsObject:@(FUSLiveBottomToolTypeGameEntrance)]) {
_divisionBtnType = FUSLiveBottomToolTypeGameEntrance;
}
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 = FUSLiveBottomToolTypeBeautySticker; lastIndex = FUSLiveBottomToolTypeRoomScope;
} }
} else { } else {
lastIndex = FUSLiveBottomToolTypeShare; lastIndex = FUSLiveBottomToolTypeShare;
...@@ -789,7 +796,13 @@ ...@@ -789,7 +796,13 @@
_divisionBtnType = FUSLiveBottomToolTypeRoomScope; _divisionBtnType = FUSLiveBottomToolTypeRoomScope;
} }
}else{ }else{
_divisionBtnType = FUSLiveBottomToolTypeShare;
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
_divisionBtnType = FUSLiveBottomToolTypeTool;
} else {
_divisionBtnType = FUSLiveBottomToolTypeShare;
}
} }
} }
} }
...@@ -952,7 +965,6 @@ ...@@ -952,7 +965,6 @@
@(FUSLiveBottomToolTypeShare), @(FUSLiveBottomToolTypeShare),
@(FUSLiveBottomToolTypeTool2), @(FUSLiveBottomToolTypeTool2),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeGift)]];
_divisionBtnType = FUSLiveBottomToolTypeTool2;
} else { } else {
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeTool), _allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeTool),
@(FUSLiveBottomToolTypeShare), @(FUSLiveBottomToolTypeShare),
...@@ -960,15 +972,21 @@ ...@@ -960,15 +972,21 @@
@(FUSLiveBottomToolTypeBeautySticker), @(FUSLiveBottomToolTypeBeautySticker),
@(FUSLiveBottomToolTypeRoomScope), @(FUSLiveBottomToolTypeRoomScope),
@(FUSLiveBottomToolTypeGift)]]; @(FUSLiveBottomToolTypeGift)]];
_divisionBtnType = FUSLiveBottomToolTypeRoomScope;
} }
} else { } else {
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage), if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
@(FUSLiveBottomToolTypeTool), _allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage),
@(FUSLiveBottomToolTypeShare), @(FUSLiveBottomToolTypeTool),
@(FUSLiveBottomToolTypeGift)]]; // @(FUSLiveBottomToolTypeShare),
_divisionBtnType = FUSLiveBottomToolTypeShare; @(FUSLiveBottomToolTypeGift)]];
} else {
_allBtnTypes = [NSMutableArray arrayWithArray:@[@(FUSLiveBottomToolTypeAudienceMessage),
@(FUSLiveBottomToolTypeTool),
@(FUSLiveBottomToolTypeShare),
@(FUSLiveBottomToolTypeGift)]];
}
} }
[self.chatTextView resetBulletsSelected]; [self.chatTextView resetBulletsSelected];
self.chatTextView.textView.text = nil; self.chatTextView.textView.text = nil;
......
...@@ -336,12 +336,12 @@ public class FUSLiveChatInputToolView: UIView { ...@@ -336,12 +336,12 @@ public class FUSLiveChatInputToolView: UIView {
switch FUSLiveHelper.shareInstance()?.roomScopeType { switch FUSLiveHelper.shareInstance()?.roomScopeType {
case .open: case .open:
itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_normal"), for: UIControl.State.normal) itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_normal"), for: UIControl.State.normal)
itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_preesed"), for: UIControl.State.highlighted) // itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_preesed"), for: UIControl.State.highlighted)
titleLb.text = NSString.fus_localString("公开屋") titleLb.text = NSString.fus_localString("公开屋")
break break
case .password: case .password:
itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_focus_normal"), for: UIControl.State.normal) itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_password"), for: UIControl.State.normal)
itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_focus_preesed"), for: UIControl.State.highlighted) // itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_focus_preesed"), for: UIControl.State.highlighted)
titleLb.text = NSString.fus_localString("私享屋") titleLb.text = NSString.fus_localString("私享屋")
break break
// case .intimacy: // case .intimacy:
......
...@@ -1719,11 +1719,11 @@ ...@@ -1719,11 +1719,11 @@
} }
break; break;
case FUSLiveChatToolTypeRoomScope: case FUSLiveChatToolTypeRoomScope:
if (isSelect) { // if (isSelect) {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_preesed"]; // image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_preesed"];
} else { // } else {
image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"]; image = [FUSShowRoomCenterBunble imageNamed:@"live_RoomScope_normal"];
} // }
break; break;
default: default:
break; break;
......
...@@ -30,6 +30,10 @@ var isShowShareToolSheetView = true ...@@ -30,6 +30,10 @@ var isShowShareToolSheetView = true
private let shareTitleLabel = UILabel() private let shareTitleLabel = UILabel()
private let passwordDescLabel = UILabel()
private let passwordLabel = UILabel()
private let topShareView = FUSShareToolSheetSubView(frame: .zero) private let topShareView = FUSShareToolSheetSubView(frame: .zero)
private let bottomShareView = FUSShareToolSheetSubView(frame: .zero) private let bottomShareView = FUSShareToolSheetSubView(frame: .zero)
...@@ -105,6 +109,16 @@ var isShowShareToolSheetView = true ...@@ -105,6 +109,16 @@ var isShowShareToolSheetView = true
shareTitleLabel.textColor = .fus_textColorRich() shareTitleLabel.textColor = .fus_textColorRich()
shareTitleLabel.textAlignment = .center shareTitleLabel.textAlignment = .center
passwordDescLabel.text = String.fus_versionLocalString("私享屋-密码:")
passwordDescLabel.font = .fus_themeFont(12)
passwordDescLabel.textColor = .fus_textColorRich()
passwordDescLabel.isHidden = true
passwordLabel.font = .fus_themeFont(12)
passwordLabel.textColor = .fus_theme()
passwordLabel.isHidden = true
topLineView.backgroundColor = .fus_separatorLine() topLineView.backgroundColor = .fus_separatorLine()
bottomLineView.backgroundColor = .fus_separatorLine() bottomLineView.backgroundColor = .fus_separatorLine()
...@@ -128,6 +142,8 @@ var isShowShareToolSheetView = true ...@@ -128,6 +142,8 @@ var isShowShareToolSheetView = true
addSubview(bgView) addSubview(bgView)
addSubview(topBgView) addSubview(topBgView)
topBgView.addSubview(shareTitleLabel) topBgView.addSubview(shareTitleLabel)
topBgView.addSubview(passwordDescLabel)
topBgView.addSubview(passwordLabel)
topBgView.addSubview(topLineView) topBgView.addSubview(topLineView)
topBgView.addSubview(topShareView) topBgView.addSubview(topShareView)
topBgView.addSubview(bottomShareView) topBgView.addSubview(bottomShareView)
...@@ -145,10 +161,20 @@ var isShowShareToolSheetView = true ...@@ -145,10 +161,20 @@ var isShowShareToolSheetView = true
} }
shareTitleLabel.snp.makeConstraints { make in shareTitleLabel.snp.makeConstraints { make in
make.left.right.top.equalToSuperview() make.centerX.equalToSuperview()
make.top.equalToSuperview()
make.height.equalTo(43) make.height.equalTo(43)
} }
passwordLabel.snp.makeConstraints { make in
make.centerY.equalTo(shareTitleLabel.snp.centerY)
make.right.equalToSuperview().offset(-15)
}
passwordDescLabel.snp.makeConstraints { make in
make.centerY.equalTo(passwordLabel.snp.centerY)
make.right.equalTo(passwordLabel.snp.left)
}
topLineView.snp.makeConstraints { make in topLineView.snp.makeConstraints { make in
make.top.equalTo(shareTitleLabel.snp.bottom).offset(0) make.top.equalTo(shareTitleLabel.snp.bottom).offset(0)
make.left.equalTo(topBgView).offset(15) make.left.equalTo(topBgView).offset(15)
...@@ -195,8 +221,19 @@ var isShowShareToolSheetView = true ...@@ -195,8 +221,19 @@ var isShowShareToolSheetView = true
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
isShowShareToolSheetView = true isShowShareToolSheetView = true
} }
guard self.superview == nil else { return } guard self.superview == nil else { return }
view.addSubview(self) view.addSubview(self)
if FUSLiveHelper.shareInstance().roomScopeType == .password {
self.passwordLabel.isHidden = false
self.passwordDescLabel.isHidden = false
self.passwordLabel.text = FUSLiveHelper.shareInstance().roomInfoModel?.encryptionData.password
} else {
self.passwordLabel.isHidden = true
self.passwordDescLabel.isHidden = true
}
self.frame = view.bounds; self.frame = view.bounds;
if animated { if animated {
// 设置初始状态 // 设置初始状态
......
...@@ -331,6 +331,8 @@ UIGestureRecognizerDelegate ...@@ -331,6 +331,8 @@ UIGestureRecognizerDelegate
/// 点赞需要请求的次数 /// 点赞需要请求的次数
@property (nonatomic, copy) NSArray<NSNumber *> *sendLikeSendConditionList; @property (nonatomic, copy) NSArray<NSNumber *> *sendLikeSendConditionList;
@property (nonatomic, strong) UIImageView *passwordRoomIconImageView;
@end @end
@implementation FUSLiveFunctionView @implementation FUSLiveFunctionView
...@@ -381,6 +383,7 @@ UIGestureRecognizerDelegate ...@@ -381,6 +383,7 @@ UIGestureRecognizerDelegate
[self initPushContentView]; [self initPushContentView];
} }
[self initContentView]; [self initContentView];
[self initCloseButton]; [self initCloseButton];
...@@ -394,6 +397,8 @@ UIGestureRecognizerDelegate ...@@ -394,6 +397,8 @@ UIGestureRecognizerDelegate
[self fus_initVolumnView]; [self fus_initVolumnView];
[self fus_initTreasureBoxListIcon]; [self fus_initTreasureBoxListIcon];
[self fus_setupPopularView];
} }
/** /**
...@@ -604,12 +609,28 @@ UIGestureRecognizerDelegate ...@@ -604,12 +609,28 @@ UIGestureRecognizerDelegate
_headView.delegate = self; _headView.delegate = self;
[[self fus_viewWithLayer:FUSLiveFunctionLayerRoomInfos] addSubview:_headView]; [[self fus_viewWithLayer:FUSLiveFunctionLayerRoomInfos] addSubview:_headView];
self.popularView = [[FUSPopularProgressView alloc] initWithFrame:CGRectMake(12, self.headView.bottom, 75, 75)]; }
- (void)fus_setupPopularView {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
self.popularView.tapPopularViewHandler = ^{ if (self.popularView == nil) {
[weakSelf fus_headViewClickHeatPower]; self.popularView = [[FUSPopularProgressView alloc] initWithFrame:CGRectMake(12, self.headView.bottom, 75, 75)];
}; self.popularView.tapPopularViewHandler = ^{
[[self fus_viewWithLayer:FUSLiveFunctionLayerRoomInfos] addSubview:self.popularView]; [weakSelf fus_headViewClickHeatPower];
};
[[self fus_viewWithLayer:FUSLiveFunctionLayerRoomInfos] addSubview:self.popularView];
}
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) {
if (self.pusherPopularView == nil) {
self.pusherPopularView = [[FUSPopularProgressView alloc] initWithFrame:CGRectMake(12, self.pusherHeadView.bottom, 75, 75)];
self.pusherPopularView.tapPopularViewHandler = ^{
[weakSelf fus_headViewClickHeatPower];
};
[self.pusherContentView addSubview:self.pusherPopularView];
}
}
} }
/** /**
...@@ -1074,13 +1095,6 @@ UIGestureRecognizerDelegate ...@@ -1074,13 +1095,6 @@ UIGestureRecognizerDelegate
[_pusherHeadView setHeatPowerClickHandler:^{ [_pusherHeadView setHeatPowerClickHandler:^{
[weakSelf fus_headViewClickHeatPower]; [weakSelf fus_headViewClickHeatPower];
}]; }];
self.pusherPopularView = [[FUSPopularProgressView alloc] initWithFrame:CGRectMake(12, self.pusherHeadView.bottom, 75, 75)];
self.pusherPopularView.tapPopularViewHandler = ^{
[weakSelf fus_headViewClickHeatPower];
};
[self.pusherContentView addSubview:self.pusherPopularView];
} }
/** /**
...@@ -4712,6 +4726,9 @@ UIGestureRecognizerDelegate ...@@ -4712,6 +4726,9 @@ UIGestureRecognizerDelegate
[self.listView removeFromSuperview]; [self.listView removeFromSuperview];
self.listView = nil; self.listView = nil;
[self.passwordRoomIconImageView removeFromSuperview];
self.passwordRoomIconImageView = nil;
[self.chatFastInputView fus_endTimer]; [self.chatFastInputView fus_endTimer];
[self.chatFastInputView removeFromSuperview]; [self.chatFastInputView removeFromSuperview];
self.chatFastInputView = nil; self.chatFastInputView = nil;
...@@ -5759,27 +5776,48 @@ UIGestureRecognizerDelegate ...@@ -5759,27 +5776,48 @@ UIGestureRecognizerDelegate
- (void)fus_updateRoomScoreType { - (void)fus_updateRoomScoreType {
if (FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAnchor) {
return;
}
switch (FUSLiveHelper.shareInstance.roomScopeType) { switch (FUSLiveHelper.shareInstance.roomScopeType) {
case FUSLiveRoomScopeTypeOpen: case FUSLiveRoomScopeTypeOpen:
[_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_open_scope"]];
if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) {
[_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_open_scope"]];
}
[self fus_updateRewardViewIfNeeded]; [self fus_updateRewardViewIfNeeded];
[self fus_setupPopularView];
[self.passwordRoomIconImageView removeFromSuperview];
self.passwordRoomIconImageView = nil;
break; break;
case FUSLiveRoomScopeTypePassword: case FUSLiveRoomScopeTypePassword:
[_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_follow_scope"]];
if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor) {
[_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_password_scope"]];
}
[self.anchorRewardView removeFromSuperview]; [self.anchorRewardView removeFromSuperview];
self.anchorRewardView = nil; self.anchorRewardView = nil;
[self.popularView removeFromSuperview];
self.popularView = nil;
[self.pusherPopularView removeFromSuperview];
self.pusherPopularView = nil;
[self fus_showPasswordAnim];
break; break;
// case FUSLiveRoomScopeTypeIntimacy:
// [_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_intimate_scope"]];
// break;
} }
[self.bottomToolView fus_updateRoomScoreType]; [self.bottomToolView fus_updateRoomScoreType];
}
- (void)fus_showPasswordAnim {
[self.passwordRoomIconImageView removeFromSuperview];
self.passwordRoomIconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(12, self.headView.bottom, 49, 49)];
self.passwordRoomIconImageView.image = [FUSShowRoomCenterBunble imageNamed:@"live_room_password_room_icon"];
[[self fus_viewWithLayer:FUSLiveFunctionLayerRoomInfos] addSubview:self.passwordRoomIconImageView];
} }
......
...@@ -44,7 +44,7 @@ import FUSCommon ...@@ -44,7 +44,7 @@ import FUSCommon
self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_openScope_img") self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_openScope_img")
self.privacyLabel.text = .fus_versionLocalString("公开屋") self.privacyLabel.text = .fus_versionLocalString("公开屋")
case .password: case .password:
self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_followScope_img") self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_passwordScope_img")
self.privacyLabel.text = .fus_versionLocalString("私享屋") self.privacyLabel.text = .fus_versionLocalString("私享屋")
// case .intimacy: // case .intimacy:
// //
...@@ -77,9 +77,9 @@ import FUSCommon ...@@ -77,9 +77,9 @@ import FUSCommon
privacyImageView.contentMode = .scaleAspectFit privacyImageView.contentMode = .scaleAspectFit
privacyBtn.addSubview(privacyImageView) privacyBtn.addSubview(privacyImageView)
privacyImageView.snp.makeConstraints { make in privacyImageView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(8) make.left.equalToSuperview().offset(10)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(23, 16)) make.size.equalTo(CGSizeMake(16, 16))
} }
privacyLabel.textColor = .white privacyLabel.textColor = .white
......
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