Commit 40204c7d by suolong

添加付费房选项

parent 6fecf93f
Showing with 263 additions and 13 deletions
......@@ -71,6 +71,20 @@
@end
@interface FUSRoomPayData : FUSBaseModel
/// 历史总直播时长,单位秒
@property (nonatomic, copy) NSString *liveTime;
/// 付费房问号提示文案
@property (nonatomic, copy) NSString *tips;
/// 是否允许开启付费房 0否 1可以
@property (nonatomic, copy) NSString *enable;
/// 不允许开启的提示-标题
@property (nonatomic, copy) NSString *warnTitle;
/// 不允许开启的-副标题(简述)
@property (nonatomic, copy) NSString *warnSubTitle;
@end
@interface FUSRoomInfoModel : FUSBaseModel
......
......@@ -80,6 +80,9 @@
@end
@implementation FUSRoomPayData
@end
@implementation FUSLiveRoomFansGroupModel
......
......@@ -16,5 +16,101 @@
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "39FF1C38-2542-4416-A8C4-0315968F3941"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/ActionSheet/FUSActionSheetView.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "149"
endingLineNumber = "149"
landmarkName = "-showAcionSheetWithTitle:cancelTitle:enterTitle:otherTitles:buttonColors:clickBlock:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "1E153074-605C-4A42-B48F-38DF7C360A71"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/StreamView/LiveStreamView/Push/Capture/ByteRTC/FUSByteRTCPKStreamCaptureHelper.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "405"
endingLineNumber = "405"
landmarkName = "-fus_restartStreamPush"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "88E06B63-A6EE-4AA2-97A3-2DD86F138229"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/StreamView/LiveStreamView/Push/Capture/ByteRTC/FUSByteRTCPKStreamCaptureHelper.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "191"
endingLineNumber = "191"
landmarkName = "-fus_endLivePush"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "2178470A-240F-4C11-802C-507A47CD6F3D"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "592"
endingLineNumber = "592"
landmarkName = "-fus_switchAgoraLinkMicMode:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "A06C7465-3FBC-4337-ADC2-4320EA06A76B"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "180"
endingLineNumber = "180"
landmarkName = "-fus_enableVideo:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "4F5B7872-1C1A-4EA0-911F-1A4E6EFDF43E"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/StreamView/LiveStreamView/Push/Capture/TTSDK/Base/FUSStreamCatureHelper.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "626"
endingLineNumber = "626"
landmarkName = "-fus_setupCaptureEnable:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
{
"images" : [
{
"filename" : "live_start_payScope_cell.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_start_payScope_cell@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_start_payScope_cell@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "live_start_payScope_img.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_start_payScope_img@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_start_payScope_img@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "live_RoomScope_pay.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_RoomScope_pay@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_RoomScope_pay@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -8,6 +8,7 @@
#import <FUSFoundation/FUSFoundation.h>
#import "FUSBeforeLiveCondModel.h"
#import "FUSRoomInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -21,8 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
/// 直播预告状态 0:未设置 1:已设置
@property (nonatomic, assign) NSInteger previewLive;
//私享房信息
@property (nonatomic, strong) FUSRoomEncryptionData *__nullable encryptionData;
//付费房
@property (nonatomic, strong) FUSRoomPayData *__nullable payData;
@end
......
......@@ -10,7 +10,9 @@
@implementation FUSLiveBeforeReadyModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"beforeLiveCond": [FUSBeforeLiveCondModel class],@"encryptionData":[FUSRoomEncryptionData class]};
return @{@"beforeLiveCond": [FUSBeforeLiveCondModel class],
@"encryptionData":[FUSRoomEncryptionData class],
@"payData":[FUSRoomPayData class]};
}
@end
......@@ -57,6 +57,7 @@ typedef NS_ENUM(NSInteger,FUSbarrageType) {
typedef NS_ENUM(NSInteger,FUSLiveRoomScopeType) {
FUSLiveRoomScopeTypeOpen = 0, // 公开屋
FUSLiveRoomScopeTypePassword = 4, // 私享屋
FUSLiveRoomScopeTypePay = 5 //付费房
// FUSLiveRoomScopeTypeFollow, // 追踪圈
// FUSLiveRoomScopeTypeIntimacy, // 亲密圈
};
......
......@@ -330,8 +330,12 @@ extension FUSLiveChatInputToolAlertView: UICollectionViewDelegate, UICollectionV
// cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.versionImageNamed("live_RoomScope_intimate_preesed"), for: .highlighted)
case .password:
cell.titleLabel.text = .fus_versionLocalString("私享屋")
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_normal"), for: .normal)
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_normal"), for: .highlighted)
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_password"), for: .normal)
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_password"), for: .highlighted)
case .pay:
cell.titleLabel.text = .fus_versionLocalString("付费屋")
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_pay"), for: .normal)
cell.iconImageBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_pay"), for: .highlighted)
default:
break
}
......
......@@ -344,9 +344,13 @@ public class FUSLiveChatInputToolView: UIView {
break
case .password:
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("私享屋")
break
case .pay:
itemBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_RoomScope_pay"), for: UIControl.State.normal)
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)
......
......@@ -46,6 +46,9 @@ import FUSCommon
case .password:
self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_passwordScope_img")
self.privacyLabel.text = .fus_localString("私享屋")
case .pay:
self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_payScope_img")
self.privacyLabel.text = .fus_localString("付费屋")
// case .intimacy:
//
// self.privacyImageView.image = FUSShowRoomCenterBunble.imageNamed("live_start_intimacyScope_img")
......
......@@ -19,7 +19,7 @@ import FUSCommon
guard let showVC = UINavigationController.fus_top() else { return }
let view = FUSLiveStartSetPrivacyView(frame: showVC.view.bounds)
let view = FUSLiveStartSetPrivacyView(frame: showVC.view.bounds, requestType: 0)
view.scopeType = defaultScopeType
view.fus_reloadSelectedUI()
view.clickHandler = { scopeType in
......@@ -45,9 +45,8 @@ import FUSCommon
}
} else {
let view = FUSLiveStartSetPrivacyView(frame: showVC.view.bounds)
let view = FUSLiveStartSetPrivacyView(frame: showVC.view.bounds, requestType: 1)
view.scopeType = FUSLiveHelper.shareInstance().roomScopeType
view.requestType = 1
view.fus_reloadSelectedUI()
showVC.view.addSubview(view)
......@@ -71,8 +70,12 @@ import FUSCommon
var clickHandler:((FUSLiveRoomScopeType) -> Void)?
public override convenience init(frame: CGRect) {
self.init(frame: frame, requestType: 0)
}
public override init(frame: CGRect) {
public init(frame: CGRect, requestType: Int) {
self.requestType = requestType
super.init(frame: frame)
let tapBgView = UIButton(type: .custom)
......@@ -113,10 +116,24 @@ import FUSCommon
make.bottom.equalToSuperview().offset(-(14 + UIView.fus_SafeBottom()))
}
//这里特殊用户有不一样的逻辑
let iconImagesList = ["live_start_openScope_cell","live_start_passwordScope_cell"/*,"live_start_intimacyScope_cell"*/]
let titlesList = [String.fus_localString("公开屋"), .fus_localString("私享屋")/*, .fus_localString("亲密圈")*/]
let subTitlesList = [String.fus_localString("所有人可进入房间"), .fus_localString("已关闭窗帘,玩家输入密码打开")/*, .fus_localString("仅亲密好友可进入房间")*/]
let iconImagesList: [String]
let titlesList: [String]
let subTitlesList: [String]
if requestType == 0 {
iconImagesList = ["live_start_openScope_cell",
"live_start_passwordScope_cell",
"live_start_payScope_cell"]
titlesList = [String.fus_localString("公开屋"),
.fus_localString("私享屋"),
.fus_localString("付费屋")]
subTitlesList = [String.fus_localString("所有人可进入房间"),
.fus_localString("已关闭窗帘,玩家输入密码打开"),
.fus_localString("玩家需付费观看")]
} else {
iconImagesList = ["live_start_openScope_cell","live_start_passwordScope_cell"/*,"live_start_intimacyScope_cell"*/]
titlesList = [String.fus_localString("公开屋"), .fus_localString("私享屋")/*, .fus_localString("亲密圈")*/]
subTitlesList = [String.fus_localString("所有人可进入房间"), .fus_localString("已关闭窗帘,玩家输入密码打开")/*, .fus_localString("仅亲密好友可进入房间")*/]
}
let itemHeight = 56.0
privacyContentView.snp.makeConstraints { make in
......@@ -203,6 +220,8 @@ import FUSCommon
}
case 1:
self.scopeType = .password
case 2:
self.scopeType = .pay
// case 2:
// self.scopeType = .intimacy
default:
......@@ -228,6 +247,8 @@ import FUSCommon
return 0
case .password:
return 1
case .pay:
return requestType == 0 ? 2 : 0
// case .intimacy:
// return 2
@unknown default:
......
......@@ -208,8 +208,38 @@ import FUSCommon
}
})
} else if scopeType == .pay {
guard let payData = FUSLiveHelper.shareInstance().liveBeforeReadyInfo?.payData else {
model.scopeType = scopeType
model.password = ""
self?.startLiveModel.accept(model)
return
}
if (payData.enable ?? "0").intValue != 1 {
let title = payData.warnTitle ?? ""
let message = payData.warnSubTitle ?? ""
if !title.isEmpty || !message.isEmpty {
FUSAlertView.showAlert(withTitle: title.isEmpty ? .fus_localString("提示") : title,
message: message.isEmpty ? (payData.tips ?? "") : message,
cancelButtonTitle: nil,
otherButtonTitles: [String.fus_localString("确认")])
} else if let tips = payData.tips, !tips.isEmpty {
FUSDialogView.fus_showDialog(tips)
}
return
}
model.scopeType = scopeType
model.password = ""
self?.startLiveModel.accept(model)
if let tips = payData.tips, !tips.isEmpty {
FUSDialogView.fus_showDialog(tips)
}
} else {
model.scopeType = scopeType
model.password = ""
self?.startLiveModel.accept(model)
}
}
......
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