Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3ace3508
authored
Jun 16, 2025
by
pidan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备份代码
parent
0fe6d701
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
354 additions
and
76 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageDelegate.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLiveRouterProtocol.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.m
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/HomePage/View/FUSHomeView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/AnchorReward/FusAnchorRewardView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputToolView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShareToChat/FUSLiveShareToChatView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartContentPrivacyView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPasswordView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Router/FUSShowRoomRouter.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageDelegate.h
View file @
3ace3508
...
...
@@ -82,7 +82,7 @@
#define ROOM_CID_LIKE 11003 // 点赞
#define ROOM_CID_LIVE_STATU 11004 // 直播状态改变
#define ROOM_CID_RECOMMEND_ANCHOR_LIVE_STATU 11005 // 推荐的主播直播状态
#define ROOM_CID_LIVE_SCOPE_DID_CHANGED 110
08
// 切换直播范围
#define ROOM_CID_LIVE_SCOPE_DID_CHANGED 110
17
// 切换直播范围
#define ROOM_CID_LIVE_ROOM_TYPE_CHANGED 11009 // 切换直播类型
#define ROOM_CID_BECOME_FANS_GROUP_MEMBER 11010 // 用户成为粉丝团成员
#define ROOM_CID_RoomPopularChanged 11019 // 人气值变化消息
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.h
View file @
3ace3508
...
...
@@ -141,6 +141,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 上一次开播的标题
+
(
NSString
*
)
fus_lastLiveTitleUDKey
;
/// 上一次设置的开播密码
+
(
NSString
*
)
fus_lastLivePasswordUDKEY
;
@end
@interface
FUSLiveNotificationKeys
:
NSObject
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLivePublicDefine.m
View file @
3ace3508
...
...
@@ -230,6 +230,11 @@
return
@"fus_lastLiveTitleUDKey"
;
}
/// 上一次设置的开播密码
+
(
NSString
*
)
fus_lastLivePasswordUDKEY
{
return
@"fus_lastLivePasswordUDKEY"
;
}
@end
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSLiveRouterProtocol.h
View file @
3ace3508
...
...
@@ -48,6 +48,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 封面地址的icon
-
(
UIImage
*
)
liveSmallCellAdressIcon
;
-
(
NSString
*
)
liveRoomPassword
;
#pragma mark - Views
-
(
FUSPublicLiveGiftSendView
*
)
fus_createLiveGiftSendViewWithFrame
:(
CGRect
)
frame
;
-
(
FUSPublicVideoChatUserInfoView
*
)
fus_createVideoChatUserInfoView
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
View file @
3ace3508
...
...
@@ -17,6 +17,21 @@
@end
@interface
FUSRoomEncryptionData
:
FUSBaseModel
/// 初始密码
@property
(
nonatomic
,
copy
)
NSString
*
password
;
/// 初始密码描述
@property
(
nonatomic
,
copy
)
NSString
*
passwordShow
;
/// 开启公开房(-1:受限)
@property
(
nonatomic
,
copy
)
NSString
*
liveScopeOpen
;
/// 受限提示文案
@property
(
nonatomic
,
copy
)
NSString
*
liveScopeOpenShow
;
@end
@interface
FUSRoomInfoModel
:
FUSBaseModel
@property
(
nonatomic
,
copy
)
NSString
*
bonds
;
// 主播的萤火
...
...
@@ -91,6 +106,9 @@
/// 直播主题信息
@property
(
nonatomic
,
strong
)
FUSLiveThemeModel
*
theme
;
/// 私享房信息
@property
(
nonatomic
,
strong
)
FUSRoomEncryptionData
*
encryptionData
;
@property
(
nonatomic
,
copy
)
NSArray
<
NSString
*>
*
reminderKeys
;
-
(
void
)
fus_setModelWithMyRoomInfos
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.m
View file @
3ace3508
...
...
@@ -38,7 +38,7 @@
//嵌套的 model
+
(
NSDictionary
*
)
modelContainerPropertyGenericClass
{
return
@{
@"stateSwitch"
:
[
FUSLiveRoomStateSwitchModel
class
],
@"theme"
:
[
FUSLiveThemeModel
class
]};
return
@{
@"stateSwitch"
:
[
FUSLiveRoomStateSwitchModel
class
],
@"theme"
:
[
FUSLiveThemeModel
class
]
,
@"encryptionData"
:
[
FUSRoomEncryptionData
class
]
};
}
...
...
@@ -47,3 +47,7 @@
@implementation
FUSLiveRoomStateSwitchModel
@end
@implementation
FUSRoomEncryptionData
@end
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
View file @
3ace3508
...
...
@@ -1414,6 +1414,7 @@
BEF678162C6B156600A670FB
/* live_treasure_box_bg_img.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEF675EE2C6B156500A670FB
/* live_treasure_box_bg_img.png */
;
};
BEF678172C6B156600A670FB
/* live_userinfo_level_secrect.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEF675EF2C6B156500A670FB
/* live_userinfo_level_secrect.png */
;
};
C50E4ED36D48026661F4283F
/* Pods_FUSShowRoomModule.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
B8B2CC1956F16144828BF43D
/* Pods_FUSShowRoomModule.framework */
;
};
D2C6D57E2DFAB63200FB58E0
/* FUSLiveStartSetPasswordView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
D2C6D57D2DFAB63200FB58E0
/* FUSLiveStartSetPasswordView.swift */
;
};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
...
...
@@ -2830,6 +2831,7 @@
BEF675ED2C6B156500A670FB
/* live_pk_background_image.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
live_pk_background_image.png
;
sourceTree
=
"<group>"
;
};
BEF675EE2C6B156500A670FB
/* live_treasure_box_bg_img.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
live_treasure_box_bg_img.png
;
sourceTree
=
"<group>"
;
};
BEF675EF2C6B156500A670FB
/* live_userinfo_level_secrect.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
live_userinfo_level_secrect.png
;
sourceTree
=
"<group>"
;
};
D2C6D57D2DFAB63200FB58E0
/* FUSLiveStartSetPasswordView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FUSLiveStartSetPasswordView.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -3368,6 +3370,7 @@
BEEAB25F2D34CC60008CD059
/* FUSLiveStartContentThemeEditView.swift */
,
BEEAB2602D34CC60008CD059
/* FUSLiveStartContentWarningView.swift */
,
BEEAB2612D34CC60008CD059
/* FUSLiveStartSetPrivacyView.swift */
,
D2C6D57D2DFAB63200FB58E0
/* FUSLiveStartSetPasswordView.swift */
,
BEEAB2622D34CC60008CD059
/* FUSLiveStartView.swift */
,
BEB5043C2D2E53E300EA6E6F
/* FUSVideoStartSetThemeItemCell.h */
,
BEB5043D2D2E53E300EA6E6F
/* FUSVideoStartSetThemeItemCell.m */
,
...
...
@@ -6899,6 +6902,7 @@
00A3AB712CB665EA007646E1
/* FUSLiveQuickChatSetCell.m in Sources */
,
00B90AD22CA5072100BE935B
/* FUSPatAudienceGiftCell.swift in Sources */
,
BED6590D2C5B745E00668116
/* FUSLiveChatToolGiftTipView.m in Sources */
,
D2C6D57E2DFAB63200FB58E0
/* FUSLiveStartSetPasswordView.swift in Sources */
,
BE189DBE2C733B460008418B
/* FSRShowRoomEffectRecommondModel.m in Sources */
,
BED65A082C5B745F00668116
/* FUSPKEmptyView.m in Sources */
,
BED659D32C5B745F00668116
/* FUSPKInfoModel.m in Sources */
,
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/HomePage/View/FUSHomeView.m
View file @
3ace3508
...
...
@@ -290,6 +290,7 @@
BOOL
isSelected
=
[
naviView
fus_isButtonSelected
:
FUSHomeNaviViewClickTypeFollow
];
FUSHomeViewAnchorListType
turnToType
=
isSelected
?
FUSHomeViewAnchorListTypeNormal
:
FUSHomeViewAnchorListTypeFollow
;
//如果跳转到的状态被判定为必须刷新的,那么就直接刷新,后续如果需要刷新普通列表的也在这里添加||判定就好
if
(
turnToType
==
FUSHomeViewAnchorListTypeFollow
&&
self
.
followNeedUpdate
)
{
...
...
@@ -399,6 +400,12 @@
}
}
}
else
if
(
type
==
FUSHomeViewAnchorListTypeFollow
&&
isLastSelected
==
NO
)
{
//上一次是普通,然后点了追踪
[
FUSDialogView
fus_showDialog
:[
NSString
fus_versionLocalString
:
@"您已切换至关注主播再次点击可恢复全部"
]];
}
else
if
(
type
==
FUSHomeViewAnchorListTypeNormal
&&
isLastSelected
==
YES
)
{
//上一次是追踪,然后点了普通
[
FUSDialogView
fus_showDialog
:[
NSString
fus_versionLocalString
:
@"您已切换至全部主播再次点击可恢复关注"
]];
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.h
View file @
3ace3508
...
...
@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 直播预告状态 0:未设置 1:已设置
@property
(
nonatomic
,
assign
)
NSInteger
previewLive
;
@property
(
nonatomic
,
strong
)
FUSRoomEncryptionData
*
encryptionData
;
@end
NS_ASSUME_NONNULL_END
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.m
View file @
3ace3508
...
...
@@ -10,7 +10,7 @@
@implementation
FUSLiveBeforeReadyModel
+
(
NSDictionary
*
)
modelContainerPropertyGenericClass
{
return
@{
@"beforeLiveCond"
:
[
FUSBeforeLiveCondModel
class
]};
return
@{
@"beforeLiveCond"
:
[
FUSBeforeLiveCondModel
class
]
,
@"encryptionData"
:
[
FUSRoomEncryptionData
class
]
};
}
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.h
View file @
3ace3508
...
...
@@ -63,9 +63,10 @@ typedef NS_ENUM(NSInteger,FUSbarrageType) {
};
typedef
NS_ENUM
(
NSInteger
,
FUSLiveRoomScopeType
)
{
FUSLiveRoomScopeTypeOpen
=
0
,
// 全公开
FUSLiveRoomScopeTypeFollow
,
// 追踪圈
FUSLiveRoomScopeTypeIntimacy
,
// 亲密圈
FUSLiveRoomScopeTypeOpen
=
0
,
// 公开屋
FUSLiveRoomScopeTypePassword
=
4
,
// 私享屋
// FUSLiveRoomScopeTypeFollow, // 追踪圈
// FUSLiveRoomScopeTypeIntimacy, // 亲密圈
};
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
3ace3508
...
...
@@ -132,9 +132,10 @@
NSString
*
roomId
=
dict
[
@"roomId"
];
if
(
roomId
.
integerValue
==
self
.
roomInfoModel
.
roomId
.
integerValue
)
{
NSInteger
liveScope
=
[
dict
[
@"
liveScop
e"
]
integerValue
];
self
.
roomScopeType
=
liveScope
;
NSInteger
liveScope
=
[
dict
[
@"
mod
e"
]
integerValue
];
self
.
roomScopeType
=
liveScope
==
1
?
FUSLiveRoomScopeTypePassword
:
FUSLiveRoomScopeTypeOpen
;
}
}
/**
...
...
@@ -445,6 +446,10 @@
[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
fus_setModelWithMyRoomInfos
];
}
FUSRoomEncryptionData
*
data
=
model
.
encryptionData
;
[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
encryptionData
=
data
;
[[
FUSLiveHelper
shareInstance
]
initLiveViewController
];
[[[
FUSLiveHelper
shareInstance
]
liveVC
]
initPushPrepareView
];
[
self
fus_showLiveMainVCAnimation
:
YES
Completion
:
nil
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
3ace3508
...
...
@@ -169,13 +169,25 @@ NS_ASSUME_NONNULL_BEGIN
success
:(
void
(
^
)(
void
))
success
failure
:(
void
(
^
)(
NSString
*
,
int
))
failure
;
///// 切换直播范围
///// @param fid 当前主播的id
///// @param liveScope 直播范围 0:全公开、1:追踪圈、2:亲密圈
///// @param success 成功回调
///// @param failure 失败回调
//+ (void)fus_requestChangeLiveScope:(NSInteger)liveScope
// liveId:(NSInteger)liveId
// success:(void (^)(void))success
// failure:(void (^)(NSString *msg, int code))failure;
/// 切换直播范围
/// @param fid 当前主播的id
/// @param liveScope 直播范围 0:全公开、1:追踪圈、2:亲密圈
/// @param cancel 取消状态 0:否 1:是
/// @param password 密码(cancel=0必传)
/// @param success 成功回调
/// @param failure 失败回调
+
(
void
)
fus_requestChangeLiveScope
:(
NSInteger
)
liveScope
liveId
:(
NSInteger
)
liveId
+
(
void
)
fus_requestChangedPassword
:(
NSInteger
)
cancel
fid
:(
NSInteger
)
fid
password
:(
NSString
*
)
password
success
:(
void
(
^
)(
void
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
3ace3508
...
...
@@ -577,10 +577,16 @@
return
;
}
NSString
*
password
=
@""
;
if
(
liveScope
==
4
)
{
password
=
FUSRouter
.
liveRouter
.
liveRoomPassword
;
}
NSDictionary
*
params
=
@{
@"vdoid"
:
vdoid
,
@"livingType"
:
@"0"
,
@"liveWay"
:
livingWay
,
@"liveScope"
:
@
(
liveScope
),
@"password"
:
password
,
@"roomid"
:
roomId
};
// params = [self addSocketParameterForDict:params];
...
...
@@ -2141,19 +2147,45 @@
}
///// 切换直播范围
///// @param fid 当前主播的id
///// @param liveScope 直播范围 0:全公开、1:追踪圈、2:亲密圈
///// @param success 成功回调
///// @param failure 失败回调
//+ (void)fus_requestChangeLiveScope:(NSInteger)liveScope
// liveId:(NSInteger)liveId
// success:(void (^)(void))success
// failure:(void (^)(NSString *msg, int code))failure {
//
// NSDictionary *params = @{@"fid":@(liveId),@"liveScope":@(liveScope)};
//
// [FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_LIVE_CHANGE_LIVE_SCOPE params:params success:^(NSDictionary *dataDict, int code) {
// [[FUSLiveHelper shareInstance].currentFunctionView fus_startRecordLiveTimeWithTime:dataDict[@"livetime"]];
// if (success) {
// success();
// }
// } failure:^(NSDictionary *dataDict, int code) {
// if (failure) {
// failure(dataDict[@"msg"],code);
// }
// }];
//}
/// 切换直播范围
/// @param fid 当前主播的id
/// @param liveScope 直播范围 0:全公开、1:追踪圈、2:亲密圈
/// @param cancel 取消状态 0:否 1:是
/// @param password 密码(cancel=0必传)
/// @param success 成功回调
/// @param failure 失败回调
+
(
void
)
fus_requestChangeLiveScope
:
(
NSInteger
)
liveScope
liveId
:
(
NSInteger
)
liveId
+
(
void
)
fus_requestChangedPassword
:
(
NSInteger
)
cancel
fid
:
(
NSInteger
)
fid
password
:
(
NSString
*
)
password
success
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
{
NSDictionary
*
params
=
@{
@"fid"
:
@
(
liveId
),
@"liveScope"
:
@
(
liveScope
)
};
NSDictionary
*
params
=
@{
@"fid"
:
@
(
fid
),
@"cancel"
:
@
(
cancel
),
@"password"
:
password
};
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_LIVE_CHANGE_
LIVE_SCOPE
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_LIVE_CHANGE_
Password
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_startRecordLiveTimeWithTime
:
dataDict
[
@"livetime"
]];
if
(
success
)
{
success
();
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/AnchorReward/FusAnchorRewardView.m
View file @
3ace3508
...
...
@@ -34,6 +34,10 @@
return
;
}
if
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
!=
FUSLiveRoomScopeTypeOpen
)
{
return
;
}
[
FUSLiveHttpHelper
fus_getLiveBeforeInfosWithSucceed
:
^
(
NSDictionary
*
_Nonnull
publicizeConfig
,
NSDictionary
*
_Nonnull
gasStationConfig
)
{
if
([
NSDictionary
isNull
:
gasStationConfig
])
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
View file @
3ace3508
...
...
@@ -516,9 +516,13 @@
-
(
void
)
ffupdateToolView2TypesPKState
:
(
FUSPKLiveState
)
pkState
{
if
(
FUSLiveHelper
.
shareInstance
.
liveRoomType
==
FUSRoomTypeLinkMic
)
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
@
(
FUSLiveBottomToolTypeRoomScope
)
/*
, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
)
/*,@(FUSLiveBottomToolTypeRoomScope)
, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
else
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
@
(
FUSLiveBottomToolTypeRoomScope
),
@
(
FUSLiveBottomToolTypePK
)
/*, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
if
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
==
FUSLiveRoomScopeTypePassword
)
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),@(FUSLiveBottomToolTypePK), @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
else
{
[
self
.
toolView2
showItemWithTypesWithToolTypes
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
/*@(FUSLiveBottomToolTypeRoomScope),*/
@
(
FUSLiveBottomToolTypePK
)
/*, @(FUSLiveBottomToolTypeNovaBuild)*/
]];
}
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.h
View file @
3ace3508
...
...
@@ -192,6 +192,8 @@ typedef NS_ENUM(NSUInteger, FUSLiveChatToolBeautyType) { //美颜工具按钮
-
(
void
)
fus_cleanBottomToolView
;
-
(
void
)
fus_updateRoomScoreType
;
@end
NS_ASSUME_NONNULL_END
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.m
View file @
3ace3508
...
...
@@ -57,6 +57,8 @@
@property
(
nonatomic
,
strong
)
UIButton
*
inputChatBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
roomScopeBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
linkMicroBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
msgBoxBtn
;
...
...
@@ -130,6 +132,7 @@
_allBtnTypes
=
[
NSMutableArray
arrayWithArray
:@[
@
(
FUSLiveBottomToolTypeMessage
),
@
(
FUSLiveBottomToolTypeBeauty
),
@
(
FUSLiveBottomToolTypeBeautySticker
),
// @(FUSLiveBottomToolTypeRoomScope),
@
(
FUSLiveBottomToolTypeGift
)]];
_divisionBtnType
=
FUSLiveBottomToolTypeBeautySticker
;
}
else
{
...
...
@@ -137,8 +140,9 @@
@
(
FUSLiveBottomToolTypeShare
),
@
(
FUSLiveBottomToolTypeTool2
),
@
(
FUSLiveBottomToolTypeBeautySticker
),
@
(
FUSLiveBottomToolTypeRoomScope
),
@
(
FUSLiveBottomToolTypeGift
)]];
_divisionBtnType
=
FUSLiveBottomToolType
BeautySticker
;
_divisionBtnType
=
FUSLiveBottomToolType
RoomScope
;
}
...
...
@@ -168,6 +172,7 @@
if
(
self
.
viewType
==
FUSLiveBottomViewTypeHost
)
{
[
self
fus_removeBtnWithType
:
FUSLiveBottomToolTypeBeautySticker
];
[
self
fus_removeBtnWithType
:
FUSLiveBottomToolTypeRoomScope
];
}
...
...
@@ -512,12 +517,31 @@
btn
=
self
.
interactionGameBtn
;
break
;
case
FUSLiveBottomToolTypeRoomScope
:
[
self
fus_updateRoomScoreType
];
btn
=
self
.
roomScopeBtn
;
break
;
default
:
break
;
}
return
btn
;
}
-
(
void
)
fus_updateRoomScoreType
{
UIImage
*
image
;
//TODO: 修改图片
if
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
==
FUSLiveRoomScopeTypePassword
)
{
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_RoomScope_intimate_normal"
];
}
else
{
image
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_RoomScope_normal"
];
}
[
self
.
roomScopeBtn
setImage
:
image
forState
:
UIControlStateNormal
];
}
-
(
void
)
fus_updateBtnImageWithType
:
(
FUSLiveBottomToolType
)
type
image
:
(
UIImage
*
)
image
state
:
(
UIControlState
*
)
state
{
for
(
UIButton
*
btn
in
_allBtns
)
{
...
...
@@ -649,7 +673,7 @@
if
(
FUSLiveHelper
.
shareInstance
.
liveRoomType
==
FUSRoomTypeLinkMic
)
{
lastIndex
=
FUSLiveBottomToolTypeTool2
;
}
else
{
lastIndex
=
FUSLiveBottomToolType
BeautySticker
;
lastIndex
=
FUSLiveBottomToolType
RoomScope
;
}
}
else
{
lastIndex
=
FUSLiveBottomToolTypeShare
;
...
...
@@ -762,7 +786,7 @@
if
(
FUSLiveHelper
.
shareInstance
.
liveRoomType
==
FUSRoomTypeLinkMic
)
{
_divisionBtnType
=
FUSLiveBottomToolTypeTool2
;
}
else
{
_divisionBtnType
=
FUSLiveBottomToolType
BeautySticker
;
_divisionBtnType
=
FUSLiveBottomToolType
RoomScope
;
}
}
else
{
_divisionBtnType
=
FUSLiveBottomToolTypeShare
;
...
...
@@ -934,8 +958,9 @@
@
(
FUSLiveBottomToolTypeShare
),
@
(
FUSLiveBottomToolTypeTool2
),
@
(
FUSLiveBottomToolTypeBeautySticker
),
@
(
FUSLiveBottomToolTypeRoomScope
),
@
(
FUSLiveBottomToolTypeGift
)]];
_divisionBtnType
=
FUSLiveBottomToolType
BeautySticker
;
_divisionBtnType
=
FUSLiveBottomToolType
RoomScope
;
}
}
else
{
...
...
@@ -1110,6 +1135,17 @@
}
-
(
UIButton
*
)
roomScopeBtn
{
if
(
!
_roomScopeBtn
)
{
_roomScopeBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
_roomScopeBtn
.
tag
=
FUSLiveBottomToolTypeRoomScope
;
}
return
_roomScopeBtn
;
}
-
(
UIButton
*
)
taskBtn
{
if
(
!
_taskBtn
)
{
_taskBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputToolView.swift
View file @
3ace3508
...
...
@@ -121,7 +121,7 @@ public class FUSLiveChatInputToolView: UIView {
// 房间类型
roomTypeView
=
fus_createItemViewWithToolType
(
toolType
:
FUSLiveBottomToolTypeRoomScope
,
withSize
:
CGSize
(
width
:
itemWith
,
height
:
buttomViewHeight
))
roomTypeView
.
x
=
liveSettingView
.
frame
.
maxX
toolViews
.
append
(
roomTypeView
)
//
toolViews.append(roomTypeView)
// pk
pkView
=
fus_createItemViewWithToolType
(
toolType
:
FUSLiveBottomToolTypePK
,
withSize
:
CGSize
(
width
:
itemWith
,
height
:
buttomViewHeight
))
...
...
@@ -196,9 +196,9 @@ public class FUSLiveChatInputToolView: UIView {
@objc
public
func
fus_showToolViewWithClickHandler
(
handler
:(
@escaping
(
_
type
:
FUSLiveBottomToolType
)
->
Void
))
{
if
toolViewType
==
FUSLiveBottomToolTypeTool2
{
fus_updateRoomTypeView
()
}
//
if toolViewType == FUSLiveBottomToolTypeTool2 {
//
fus_updateRoomTypeView()
//
}
UIView
.
animate
(
withDuration
:
0.1
)
{
self
.
buttomView
?
.
y
=
self
.
height
-
(
self
.
buttomView
?
.
height
??
buttomViewHeight
)
...
...
@@ -337,18 +337,18 @@ public class FUSLiveChatInputToolView: UIView {
case
.
open
:
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_normal"
),
for
:
UIControl
.
State
.
normal
)
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_preesed"
),
for
:
UIControl
.
State
.
highlighted
)
titleLb
.
text
=
NSString
.
fus_localString
(
"
全公开
"
)
titleLb
.
text
=
NSString
.
fus_localString
(
"
公开屋
"
)
break
case
.
follow
:
case
.
password
:
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_focus_normal"
),
for
:
UIControl
.
State
.
normal
)
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_focus_preesed"
),
for
:
UIControl
.
State
.
highlighted
)
titleLb
.
text
=
NSString
.
fus_localString
(
"追踪圈"
)
break
case
.
intimacy
:
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_intimate_normal"
),
for
:
UIControl
.
State
.
normal
)
itemBtn
.
setImage
(
FUSShowRoomCenterBunble
.
imageNamed
(
"live_RoomScope_intimate_preesed"
),
for
:
UIControl
.
State
.
highlighted
)
titleLb
.
text
=
NSString
.
fus_localString
(
"亲密圈"
)
titleLb
.
text
=
NSString
.
fus_localString
(
"私享屋"
)
break
// case .intimacy:
// itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_intimate_normal"), for: UIControl.State.normal)
// itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_intimate_preesed"), for: UIControl.State.highlighted)
// titleLb.text = NSString.fus_localString("亲密圈")
// break
default
:
break
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
View file @
3ace3508
...
...
@@ -313,6 +313,8 @@ UIGestureRecognizerDelegate
@property
(
nonatomic
,
strong
)
FUSLiveEndChangeLinkMicModeView
*
changeView
;
@property
(
nonatomic
,
weak
)
FusAnchorRewardView
*
anchorRewardView
;
@property
(
nonatomic
,
assign
)
CGRect
activityChangeFrame
;
/// 半屏网页的管理,内部全是弱引用,放心添加网页
...
...
@@ -1036,9 +1038,15 @@ UIGestureRecognizerDelegate
[
self
initPusherActivityView
];
[
self
initPusherTableView
];
[
self
fus_updateRewardViewIfNeeded
];
}
-
(
void
)
fus_updateRewardViewIfNeeded
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
FusAnchorRewardView
fus_showAnchorRewardViewIfNeeded
:
^
(
FusAnchorRewardView
*
_Nonnull
view
)
{
view
.
y
=
weakSelf
.
pusherPopularView
.
bottom
;
weakSelf
.
anchorRewardView
=
view
;
}];
}
...
...
@@ -5758,14 +5766,21 @@ UIGestureRecognizerDelegate
switch
(
FUSLiveHelper
.
shareInstance
.
roomScopeType
)
{
case
FUSLiveRoomScopeTypeOpen
:
[
_liveTimeRecordView
fus_updateRoomScopeTypeImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_push_live_time_bg_open_scope"
]];
[
self
fus_updateRewardViewIfNeeded
];
break
;
case
FUSLiveRoomScopeType
Follow
:
case
FUSLiveRoomScopeType
Password
:
[
_liveTimeRecordView
fus_updateRoomScopeTypeImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_push_live_time_bg_follow_scope"
]];
[
self
.
anchorRewardView
removeFromSuperview
];
self
.
anchorRewardView
=
nil
;
break
;
case
FUSLiveRoomScopeTypeIntimacy
:
[
_liveTimeRecordView
fus_updateRoomScopeTypeImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_push_live_time_bg_intimate_scope"
]];
break
;
//
case FUSLiveRoomScopeTypeIntimacy:
//
[_liveTimeRecordView fus_updateRoomScopeTypeImage:[FUSShowRoomCenterBunble imageNamed:@"live_push_live_time_bg_intimate_scope"]];
//
break;
}
[
self
.
bottomToolView
fus_updateRoomScoreType
];
}
-
(
void
)
fus_setAnchorAudioClose
:
(
BOOL
)
closed
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShareToChat/FUSLiveShareToChatView.m
View file @
3ace3508
...
...
@@ -118,8 +118,8 @@
case
FUSLiveRoomScopeTypeOpen
:
[
self
fus_requestRecentlyChat
];
break
;
case
FUSLiveRoomScopeType
Follow
:
case
FUSLiveRoomScopeTypeIntimacy
:
case
FUSLiveRoomScopeType
Password
:
//
case FUSLiveRoomScopeTypeIntimacy:
[
self
fus_refreshFriendDatas
];
break
;
}
...
...
@@ -129,8 +129,8 @@
switch
([
FUSLiveHelper
shareInstance
].
roomScopeType
)
{
case
FUSLiveRoomScopeTypeOpen
:
break
;
case
FUSLiveRoomScopeType
Follow
:
case
FUSLiveRoomScopeTypeIntimacy
:
case
FUSLiveRoomScopeType
Password
:
//
case FUSLiveRoomScopeTypeIntimacy:
[
self
fus_loadMoreFriendDatas
];
break
;
}
...
...
@@ -214,12 +214,12 @@
}
switch
([
FUSLiveHelper
shareInstance
].
roomScopeType
)
{
case
FUSLiveRoomScopeType
Follow
:
[
FUSLiveShareHttpHelper
fus_requestShareUserLikeFollowListWithPage
:
self
.
page
success
:
success
failure
:
failure
];
break
;
case
FUSLiveRoomScopeTypeIntimacy
:
case
FUSLiveRoomScopeType
Password
:
//
[FUSLiveShareHttpHelper fus_requestShareUserLikeFollowListWithPage:self.page
//
success:success
//
failure:failure];
//
break;
//
case FUSLiveRoomScopeTypeIntimacy:
[
FUSLiveShareHttpHelper
fus_requestShareIntimateFriendListWithPage
:
self
.
page
success
:
success
failure
:
failure
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartContentPrivacyView.swift
View file @
3ace3508
...
...
@@ -42,15 +42,14 @@ import FUSCommon
switch
type
{
case
.
open
:
self
.
privacyImageView
.
image
=
FUSShowRoomCenterBunble
.
imageNamed
(
"live_start_openScope_img"
)
self
.
privacyLabel
.
text
=
.
fus_localString
(
"全公开"
)
case
.
follow
:
self
.
privacyLabel
.
text
=
.
fus_versionLocalString
(
"公开屋"
)
case
.
password
:
self
.
privacyImageView
.
image
=
FUSShowRoomCenterBunble
.
imageNamed
(
"live_start_followScope_img"
)
self
.
privacyLabel
.
text
=
.
fus_
localString
(
"追踪圈
"
)
case
.
intimacy
:
self
.
privacyImageView
.
image
=
FUSShowRoomCenterBunble
.
imageNamed
(
"live_start_intimacyScope_img"
)
self
.
privacyLabel
.
text
=
.
fus_localString
(
"私密圈"
)
self
.
privacyLabel
.
text
=
.
fus_
versionLocalString
(
"私享屋
"
)
//
case .intimacy:
//
//
self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_intimacyScope_img")
//
self.privacyLabel.text = .fus_localString("私密圈")
@unknown
default
:
break
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPasswordView.swift
0 → 100644
View file @
3ace3508
This diff is collapsed.
Click to expand it.
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
View file @
3ace3508
...
...
@@ -106,18 +106,23 @@ import FUSCommon
}
//这里特殊用户有不一样的逻辑
let
iconImagesList
=
[
"live_start_openScope_cell"
,
"live_start_followScope_cell"
,
"live_start_intimacyScope_cell"
]
let
titlesList
=
[
String
.
fus_
localString
(
"全公开"
),
.
fus_localString
(
"追踪圈"
),
.
fus_localString
(
"亲密圈"
)
]
let
subTitlesList
=
[
String
.
fus_localString
(
"所有人可进入房间"
),
.
fus_
localString
(
"仅追踪主播超过24小的粉丝可进入房间"
),
.
fus_localString
(
"仅亲密好友可进入房间"
)
]
let
iconImagesList
=
[
"live_start_openScope_cell"
,
"live_start_followScope_cell"
/*,"live_start_intimacyScope_cell"*/
]
let
titlesList
=
[
String
.
fus_
versionLocalString
(
"公开屋"
),
.
fus_versionLocalString
(
"私享屋"
)
/*, .fus_localString("亲密圈")*/
]
let
subTitlesList
=
[
String
.
fus_localString
(
"所有人可进入房间"
),
.
fus_
versionLocalString
(
"已关闭窗帘,玩家输入密码打开"
)
/*, .fus_localString("仅亲密好友可进入房间")*/
]
let
selectIndex
=
fus_getIndexWithScopeType
()
for
(
index
,
iconStr
)
in
iconImagesList
.
enumerated
()
{
let
itemView
=
FUSLiveStartSetPrivacyItemView
.
fus_create
(
icon
:
iconStr
,
title
:
titlesList
[
index
],
subTitle
:
subTitlesList
[
index
])
var
canSelect
=
true
if
index
==
0
{
if
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
liveScopeOpen
.
intValue
==
-
1
{
canSelect
=
false
}
}
let
itemView
=
FUSLiveStartSetPrivacyItemView
.
fus_create
(
icon
:
iconStr
,
title
:
titlesList
[
index
],
subTitle
:
subTitlesList
[
index
],
canSelect
:
canSelect
)
itemView
.
selected
=
selectIndex
==
index
self
.
privacyContentView
.
addArrangedSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
make
.
size
.
equalTo
(
CGSizeMake
(
UIView
.
fus_screenW
()
-
18.0
*
2.0
,
56
))
make
.
size
.
equalTo
(
CGSizeMake
(
UIView
.
fus_screenW
()
-
18.0
*
2.0
,
85
))
}
itemView
.
bgTapBtn
.
rx
.
tap
.
subscribe
(
onNext
:
{[
weak
self
]
in
self
?
.
fus_itemDidSelected
(
index
:
index
)
...
...
@@ -139,8 +144,22 @@ import FUSCommon
self
.
clickHandler
?(
self
.
scopeType
)
self
.
fus_dismissWithAnimation
()
}
else
if
self
.
requestType
==
1
{
if
self
.
scopeType
==
.
open
{
self
.
fus_changeScopeRequest
(
scopeType
:
self
.
scopeType
,
password
:
""
)
}
else
{
UIView
.
animate
(
withDuration
:
0.3
)
{
self
.
contentView
.
y
=
UIView
.
fus_screenH
()
}
completion
:
{
_
in
FUSLiveStartSetPasswordView
.
fus_create
{
[
weak
self
]
password
in
guard
let
self
=
self
else
{
return
}
//在内部请求
self
.
fus_changeScopeRequest
(
scopeType
:
self
.
scopeType
)
self
.
fus_changeScopeRequest
(
scopeType
:
self
.
scopeType
,
password
:
password
)
}
}
}
}
})
.
disposed
(
by
:
disposeBag
)
...
...
@@ -158,11 +177,16 @@ import FUSCommon
switch
index
{
case
0
:
if
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
liveScopeOpen
.
intValue
==
-
1
{
self
.
scopeType
=
.
password
}
else
{
self
.
scopeType
=
.
open
}
case
1
:
self
.
scopeType
=
.
follow
case
2
:
self
.
scopeType
=
.
intimacy
self
.
scopeType
=
.
password
//
case 2:
//
self.scopeType = .intimacy
default
:
break
}
...
...
@@ -184,10 +208,10 @@ import FUSCommon
switch
self
.
scopeType
{
case
.
open
:
return
0
case
.
follow
:
case
.
password
:
return
1
case
.
intimacy
:
return
2
//
case .intimacy:
//
return 2
@unknown
default
:
return
0
}
...
...
@@ -207,13 +231,14 @@ import FUSCommon
}
private
func
fus_changeScopeRequest
(
scopeType
:
FUSLiveRoomScopeType
)
{
private
func
fus_changeScopeRequest
(
scopeType
:
FUSLiveRoomScopeType
,
password
:
String
)
{
guard
let
roomID
=
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
roomId
else
{
return
}
// FUSIndicator.showProgress(withMessage: "")
FUSLoadingIndicator
.
fus_show
(
canTouch
:
true
)
FUSLiveHttpHelper
.
fus_requestChangeLiveScope
(
scopeType
.
rawValue
,
liveId
:
roomID
.
intValue
,
success
:
{
[
weak
self
]
in
FUSLiveHttpHelper
.
fus_requestChangedPassword
(
scopeType
==
.
password
?
1
:
0
,
fid
:
roomID
.
intValue
,
password
:
password
,
success
:
{
[
weak
self
]
in
self
?
.
fus_dismissWithAnimation
()
...
...
@@ -222,11 +247,13 @@ import FUSCommon
FUSLiveHelper
.
shareInstance
()
.
roomScopeType
=
scopeType
switch
scopeType
{
case
.
open
:
//TODO: 文案:added by pidan
FUSDialogView
.
fus_showDialog
(
.
fus_localString
(
"房间已切换到全公开模式,所有人可进入房间"
))
case
.
follow
:
FUSDialogView
.
fus_showDialog
(
.
fus_localString
(
"房间已切换到追踪圈模式,仅追踪直播超过24小时的粉丝可进入房间,直播时长不计入直播奖励活动"
))
case
.
intimacy
:
FUSDialogView
.
fus_showDialog
(
.
fus_localString
(
"房间已切换到亲密圈模式,仅亲密好友的用户可进入房间,直播时长不计入直播奖励活动"
))
case
.
password
:
//TODO: 文案:added by pidan
FUSDialogView
.
fus_showDialog
(
.
fus_versionLocalString
(
"房间已切换到私享屋模式,仅追踪直播超过24小时的粉丝可进入房间,直播时长不计入直播奖励活动"
))
// case .intimacy:
// FUSDialogView.fus_showDialog(.fus_localString("房间已切换到亲密圈模式,仅亲密好友的用户可进入房间,直播时长不计入直播奖励活动"))
@unknown
default
:
break
}
...
...
@@ -254,6 +281,7 @@ class FUSLiveStartSetPrivacyItemView: UIView {
let
titleLabel
=
UILabel
()
let
subTitleLabel
=
UILabel
()
let
selectedBtn
=
UIButton
(
type
:
.
custom
)
let
cantSelectTipLabel
=
UILabel
()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
...
...
@@ -311,6 +339,18 @@ class FUSLiveStartSetPrivacyItemView: UIView {
make
.
centerY
.
equalToSuperview
()
}
cantSelectTipLabel
.
font
=
.
fus_themeFont
(
11
)
cantSelectTipLabel
.
textColor
=
.
fus_textColorMedium
()
cantSelectTipLabel
.
numberOfLines
=
0
titleContentView
.
addSubview
(
cantSelectTipLabel
)
cantSelectTipLabel
.
isHidden
=
true
cantSelectTipLabel
.
text
=
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
.
liveScopeOpenShow
cantSelectTipLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
inset
(
12
)
make
.
centerY
.
equalToSuperview
()
}
}
required
init
?(
coder
:
NSCoder
)
{
...
...
@@ -318,13 +358,16 @@ class FUSLiveStartSetPrivacyItemView: UIView {
}
///这个创建
static
func
fus_create
(
icon
:
String
,
title
:
String
,
subTitle
:
String
)
->
FUSLiveStartSetPrivacyItemView
{
static
func
fus_create
(
icon
:
String
,
title
:
String
,
subTitle
:
String
,
canSelect
:
Bool
=
true
)
->
FUSLiveStartSetPrivacyItemView
{
let
subView
=
FUSLiveStartSetPrivacyItemView
(
frame
:
.
zero
)
subView
.
iconImageView
.
image
=
FUSShowRoomCenterBunble
.
imageNamed
(
icon
)
subView
.
titleLabel
.
text
=
title
subView
.
subTitleLabel
.
text
=
subTitle
subView
.
cantSelectTipLabel
.
isHidden
=
canSelect
subView
.
selectedBtn
.
isHidden
=
canSelect
==
false
return
subView
}
}
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartView.swift
View file @
3ace3508
...
...
@@ -26,10 +26,19 @@ import FUSCommon
//下面三个在私密哪一块获得,自动获取
///私密程度
public
var
scopeType
=
FUSLiveRoomScopeType
.
open
/// 私享房密码
public
var
password
=
""
/// 清晰度
// var clarityOptionId = 0
public
override
init
()
{
super
.
init
()
if
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
?
.
liveScopeOpen
.
intValue
==
-
1
{
scopeType
=
.
password
}
}
}
@objcMembers
public
class
FUSLiveStartView
:
UIView
{
...
...
@@ -61,6 +70,7 @@ import FUSCommon
let
contentView
=
UIView
()
let
closeBtn
=
UIButton
(
type
:
.
custom
)
let
privacyView
=
FUSLiveStartContentPrivacyView
()
let
passwordBtn
=
FUSStyleButton
(
type
:
.
custom
)
let
themeView
=
FUSLiveStartContentThemeEditView
()
let
shareView
=
FUSLiveStartContentShareView
()
let
bottomView
=
FUSLiveStartContentBottomView
()
...
...
@@ -99,6 +109,23 @@ import FUSCommon
}
privacyView
.
isHidden
=
FUSConfig
.
sharedInstanced
()
.
devConfigs
.
appStatus
==
true
self
.
passwordBtn
.
isHidden
=
true
headerView
.
addSubview
(
self
.
passwordBtn
)
self
.
passwordBtn
.
setTitle
(
.
fus_versionLocalString
(
"密码"
),
for
:
.
normal
)
self
.
passwordBtn
.
titleLabel
?
.
font
=
.
fus_themeFont
(
14
)
self
.
passwordBtn
.
style
=
.
blue
self
.
passwordBtn
.
layer
.
cornerRadius
=
14
self
.
passwordBtn
.
layer
.
masksToBounds
=
true
self
.
passwordBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
privacyView
.
snp
.
right
)
.
offset
(
8
)
make
.
centerY
.
equalTo
(
self
.
privacyView
)
make
.
width
.
equalTo
(
60
)
make
.
height
.
equalTo
(
28
)
}
contentView
.
addSubview
(
themeView
)
themeView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
headerView
.
snp
.
bottom
)
.
offset
(
18
)
...
...
@@ -173,15 +200,34 @@ import FUSCommon
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
FUSLiveStartSetPrivacyView
.
fus_create
(
defaultScopeType
:
model
.
scopeType
)
{[
weak
self
]
scopeType
in
model
.
scopeType
=
scopeType
if
scopeType
==
.
password
{
FUSLiveStartSetPasswordView
.
fus_create
{
password
in
model
.
password
=
password
self
?
.
startLiveModel
.
accept
(
model
)
}
}
else
{
self
?
.
startLiveModel
.
accept
(
model
)
}
}
}
warningView
.
clickHandler
=
{
model
,
index
in
FUSRouter
.
userRouter
()
.
fus_handleTaskJumpAction
(
withJumpType
:
model
.
jumpurl
,
tid
:
0
,
url
:
model
.
jumpval
)
{
}
}
//关闭按钮
passwordBtn
.
rx
.
tap
.
subscribe
(
onNext
:
{[
weak
self
]
in
guard
let
model
=
self
?
.
startLiveModel
.
value
else
{
return
}
FUSLiveStartSetPasswordView
.
fus_create
{
password
in
model
.
password
=
password
self
?
.
startLiveModel
.
accept
(
model
)
}
})
.
disposed
(
by
:
disposeBag
)
//关闭按钮
closeBtn
.
rx
.
tap
.
subscribe
(
onNext
:
{[
weak
self
]
in
self
?
.
clickCloseBtnActionHandler
?(
self
?
.
closeBtn
)
...
...
@@ -274,6 +320,10 @@ import FUSCommon
self
.
startLiveModel
.
subscribe
(
onNext
:
{[
weak
self
]
model
in
self
?
.
privacyView
.
type
=
model
.
scopeType
self
?
.
passwordBtn
.
isHidden
=
model
.
scopeType
!=
.
password
self
?
.
liveActivityView
.
isHidden
=
model
.
scopeType
==
.
password
})
.
disposed
(
by
:
disposeBag
)
self
.
fus_updateWithLiveBeforeReadyInfo
()
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
3ace3508
...
...
@@ -270,6 +270,9 @@ NS_ASSUME_NONNULL_BEGIN
// 切换直播范围
+
(
NSString
*
)
fus_URL_LIVE_CHANGE_LIVE_SCOPE
;
// 切换私享房
+
(
NSString
*
)
fus_URL_LIVE_CHANGE_Password
;
// 贴纸列表
+
(
NSString
*
)
fus_URL_LIVE_STICKER_LIST
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
3ace3508
...
...
@@ -440,6 +440,11 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/live/change/liveScope"
];
}
// 切换私享房
+
(
NSString
*
)
fus_URL_LIVE_CHANGE_Password
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/live/change/password"
];
}
// 贴纸列表
+
(
NSString
*
)
fus_URL_LIVE_STICKER_LIST
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/live/sticker/list"
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Router/FUSShowRoomRouter.m
View file @
3ace3508
...
...
@@ -86,6 +86,28 @@
return
[
FUSLiveHelper
shareInstance
].
roomScopeType
;
}
-
(
NSString
*
)
liveRoomPassword
{
if
(
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
encryptionData
.
password
.
length
>
0
)
{
return
FUSLiveHelper
.
shareInstance
.
roomInfoModel
.
encryptionData
.
password
;
}
NSString
*
uid
=
[
FUSCacheDataShare
shareStore
].
userDetailInfo
.
uid
?:
@""
;
NSUserDefaults
*
userDefaults
=
[[
NSUserDefaults
alloc
]
initWithSuiteName
:
uid
];
// 从 UserDefaults 中获取上次设置的密码
NSString
*
password
=
[
userDefaults
stringForKey
:
FUSLiveUDKeys
.
fus_lastLivePasswordUDKEY
]
?:
@""
;
// 判断密码是否有效(假设 isValidString 是一个判断字符串是否非空且长度 >=4 的方法)
if
(
!
[
NSString
isNullWithString
:
password
]
&&
uid
.
length
>=
4
)
{
// 取 uid 最后四个字符
NSUInteger
startIndex
=
uid
.
length
>=
4
?
uid
.
length
-
4
:
0
;
password
=
[
uid
substringFromIndex
:
startIndex
];
}
return
password
;
}
-
(
FUSLiveRoomType
)
fus_liveRoomType
{
return
[
FUSLiveHelper
shareInstance
].
liveRoomType
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment