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
8ed0da73
authored
Apr 07, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复uibug
parent
366330a0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
113 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese.strings
FuSiLive.xcodeproj/project.pbxproj
FuSiLive.xcworkspace/xcuserdata/server.xcuserdatad/UserInterfaceState.xcuserstate
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSBottomOptionalView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputToolAlertView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/EntryMain/FUSPayRoomEntryMainView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese.strings
View file @
8ed0da73
...
...
@@ -3530,7 +3530,7 @@
"已集票数:--/--" = "已集票数:--/--";
"票的贡献" = "票
的
贡献";
"票的贡献" = "票
の
贡献";
"活动须知" = "活动须知";
...
...
FuSiLive.xcodeproj/project.pbxproj
View file @
8ed0da73
...
...
@@ -691,7 +691,7 @@
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++17"
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626005
8
;
CURRENT_PROJECT_VERSION
=
20250626005
9
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
...
@@ -956,7 +956,7 @@
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++17"
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626005
8
;
CURRENT_PROJECT_VERSION
=
20250626005
9
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
...
FuSiLive.xcworkspace/xcuserdata/server.xcuserdatad/UserInterfaceState.xcuserstate
View file @
8ed0da73
No preview for this file type
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
8ed0da73
...
...
@@ -1385,13 +1385,10 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
viewModel
.
primaryButtonTitle
=
(
diamondEnough
?
[
NSString
fus_localString
:
@"进入陪伴"
]
:
[
NSString
fus_localString
:
@"马上储值进入陪伴"
]);
viewModel
.
trialButtonHidden
=
(
previewTime
<=
0
);
if
(
previewTime
>
0
)
{
viewModel
.
trialButtonTitle
=
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"试看%ldS"
],
(
long
)
previewTime
];
}
viewModel
.
trialButtonTitle
=
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"试看%ldS"
],
(
long
)
previewTime
];
viewModel
.
bottomTipText
=
([
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"您可陪伴%ld分钟,%ld/分钟"
],
(
long
)
canCompanionTime
,
(
long
)
pricePerMinute
]);
if
(
pricePerMinute
>
0
)
{
viewModel
.
bottomTipText
=
(
canCompanionTime
>
0
?
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"您可陪伴%ld分钟,%ld/分钟"
],
(
long
)
canCompanionTime
,
(
long
)
pricePerMinute
]
:
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"%ld/分钟"
],
(
long
)
pricePerMinute
]);
}
return
viewModel
;
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSBottomOptionalView.m
View file @
8ed0da73
...
...
@@ -85,38 +85,41 @@
BOOL
isMute
=
[
FUSLiveHelper
fus_livePushMuteState
];
NSString
*
muteStr
=
isMute
?
[
NSString
fus_localString
:
@"打开麦克风"
]
:
[
NSString
fus_localString
:
@"关闭麦克风"
];
NSString
*
muteImgStr
=
isMute
?
@"live_setting_open_mic"
:
@"live_setting_close_mic"
;
[
self
showOptionalViewWithTitleArray
:@[[
NSString
fus_localString
:
@"美颜设置"
],
[
NSString
fus_localString
:
@"清晰度"
],
// [NSString fus_localString:@"关闭麦克风"],
muteStr
,
[
NSString
fus_localString
:
@"反转镜头"
],
[
NSString
fus_localString
:
@"闪光关闭"
],
[
NSString
fus_localString
:
@"镜像"
],
[
NSString
fus_localString
:
@"贴纸"
],
[
NSString
fus_localString
:
@"快捷发言"
],
[
NSString
fus_localString
:
@"直播主题"
],
[
NSString
fus_localString
:
@"礼物互动"
]]
withImages
:@[
@"live_icon_cameraSetting"
,
@"live_setting_quality"
,
// @"live_setting_close_mic",
muteImgStr
,
@"live_icon_changeCamera"
,
@"live_icon_turnOffLine"
,
@"live_setting_video_mirror"
,
@"live_setting_live_sticker"
,
@"live_setting_live_quickChat"
,
@"live_setting_live_theme"
,
@"live_setting_live_giftInteract"
]
withTypes
:
@[
@
(
FUSFaceBeautySetting
),
@
(
FUSLiveQuality
),
@
(
FUSLiveCameraMic
),
@
(
FUSFaceBeautychangeCamera
),
@
(
FUSFaceBeautyTurnOnLight
),
@
(
FUSLiveCameraMirror
),
@
(
FUSLiveSetSticker
),
@
(
FUSLiveEditQuickChat
),
@
(
FUSLiveRoomTheme
),
@
(
FUSLiveGiftInteract
)]
NSMutableArray
*
titles
=
[
NSMutableArray
arrayWithArray
:@[[
NSString
fus_localString
:
@"美颜设置"
],
[
NSString
fus_localString
:
@"清晰度"
],
muteStr
,
[
NSString
fus_localString
:
@"反转镜头"
],
[
NSString
fus_localString
:
@"闪光关闭"
],
[
NSString
fus_localString
:
@"镜像"
],
[
NSString
fus_localString
:
@"贴纸"
],
[
NSString
fus_localString
:
@"快捷发言"
],
[
NSString
fus_localString
:
@"直播主题"
]]];
NSMutableArray
*
images
=
[
NSMutableArray
arrayWithArray
:@[
@"live_icon_cameraSetting"
,
@"live_setting_quality"
,
muteImgStr
,
@"live_icon_changeCamera"
,
@"live_icon_turnOffLine"
,
@"live_setting_video_mirror"
,
@"live_setting_live_sticker"
,
@"live_setting_live_quickChat"
,
@"live_setting_live_theme"
]];
NSMutableArray
*
types
=
[
NSMutableArray
arrayWithArray
:@[
@
(
FUSFaceBeautySetting
),
@
(
FUSLiveQuality
),
@
(
FUSLiveCameraMic
),
@
(
FUSFaceBeautychangeCamera
),
@
(
FUSFaceBeautyTurnOnLight
),
@
(
FUSLiveCameraMirror
),
@
(
FUSLiveSetSticker
),
@
(
FUSLiveEditQuickChat
),
@
(
FUSLiveRoomTheme
)]];
if
(
!
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
[
titles
addObject
:[
NSString
fus_localString
:
@"礼物互动"
]];
[
images
addObject
:
@"live_setting_live_giftInteract"
];
[
types
addObject
:
@
(
FUSLiveGiftInteract
)];
}
[
self
showOptionalViewWithTitleArray
:
titles
withImages
:
images
withTypes
:
types
clickItem
:
click
];
}
else
if
(
type
==
FUSShowFlashLineAndCamera
){
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolSubView.m
View file @
8ed0da73
...
...
@@ -188,6 +188,9 @@
break
;
case
FUSLiveBottomToolTypeShowTime
:
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
return
;
}
if
([
self
.
delegate
respondsToSelector
:
@selector
(
fus_bottomSubView
:
didClickShowTimeOnView
:
)])
{
UIView
*
container
=
bgView
?:
self
.
bgView
?:
[
UIViewController
fus_topViewController
].
view
;
[
self
.
delegate
fus_bottomSubView
:
self
didClickShowTimeOnView
:
container
];
...
...
@@ -614,10 +617,18 @@
-
(
void
)
ffupdateToolView2TypesPKState
:
(
FUSPKState
)
pkState
{
NSMutableArray
*
toolTypesList
=
[[
NSMutableArray
alloc
]
init
];
BOOL
isReviewMode
=
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
;
if
(
FUSLiveHelper
.
shareInstance
.
liveRoomType
==
FUSRoomTypeLinkMic
)
{
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
@
(
FUSLiveBottomToolTypeShowTime
)
/*,@(FFLiveBottomToolTypeRoomScope), @(FFLiveBottomToolTypeNovaBuild)*/
]];
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
)]];
if
(
!
isReviewMode
)
{
[
toolTypesList
addObject
:
@
(
FUSLiveBottomToolTypeShowTime
)];
}
}
else
{
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
),
@
(
FUSLiveBottomToolTypeShowTime
),
@
(
FUSLiveBottomToolTypePK
)
/*,@(FUSLiveBottomToolTypeRoomScope), @(FUSLiveBottomToolTypeNovaBuild)*/
]];
[
toolTypesList
appendObjects
:@[
@
(
FUSLiveBottomToolTypeLiveSetting
),
@
(
FUSLiveBottomToolTypeRoomSetting
)]];
if
(
!
isReviewMode
)
{
[
toolTypesList
addObject
:
@
(
FUSLiveBottomToolTypeShowTime
)];
}
[
toolTypesList
addObject
:
@
(
FUSLiveBottomToolTypePK
)];
// [toolTypesList appendObjects:@[@(FFLiveBottomToolTypeLiveSetting),@(FFLiveBottomToolTypeRoomSetting), @(FFLiveBottomToolTypeRoomScope),@(FFLiveBottomToolTypeBeautySticker), @(FFLiveBottomToolTypeNovaBuild)]];
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputToolAlertView.swift
View file @
8ed0da73
...
...
@@ -217,11 +217,50 @@ import RxCocoa
// 对外一些方法
extension
FUSLiveChatInputToolAlertView
{
private
func
fus_toolPreferredOrder
()
->
[
FUSLiveBottomToolType
]
{
return
[
FUSLiveBottomToolTypeMessageBox
,
FUSLiveBottomToolTypeTask
,
FUSLiveBottomToolTypeExchange
,
FUSLiveBottomToolTypeScreenShot
,
FUSLiveBottomToolTypeRoomSetting
,
FUSLiveBottomToolTypeStartPictureInPicture
,
FUSLiveBottomToolTypeMessage
,
FUSLiveBottomToolTypeAudienceMessage
,
FUSLiveBottomToolTypeLiveSetting
,
FUSLiveBottomToolTypeShowTime
,
FUSLiveBottomToolTypeLiveManage
,
FUSLiveBottomToolTypePK
,
FUSLiveBottomToolTypeRoomScope
,
FUSLiveBottomToolTypeBeautySticker
]
}
/// 添加模型
@objc
public
func
showItemWithTypes
(
toolTypes
types
:[
Int
]){
self
.
collectionItemList
.
removeAll
()
self
.
typesList
.
removeAll
()
if
self
.
toolViewType
==
FUSLiveBottomToolTypeTool
{
var
orderedItemList
:
[
FUSLiveBottomToolType
]
=
.
init
()
for
itemType
in
self
.
fus_toolPreferredOrder
()
{
if
types
.
contains
(
itemType
.
rawValue
)
{
orderedItemList
.
append
(
itemType
)
}
}
if
orderedItemList
.
count
>
0
{
let
sectionModel
=
FUSLiveChatInputToolAlertSectionModel
()
sectionModel
.
type
=
.
liveFunction
sectionModel
.
functionList
=
orderedItemList
self
.
collectionItemList
.
append
(
sectionModel
)
self
.
typesList
=
orderedItemList
}
self
.
fus_reloadUI
()
self
.
fus_rebindModel
()
return
}
// 取出section的顺序
for
sectionType
in
self
.
sectionSequence
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
View file @
8ed0da73
...
...
@@ -175,11 +175,11 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
FUSShowTimePaddingLabel
*
levLabel
=
[[
FUSShowTimePaddingLabel
alloc
]
init
];
levLabel
.
textInsets
=
UIEdgeInsetsMake
(
0
,
6
,
0
,
6
);
levLabel
.
layer
.
cornerRadius
=
9
;
levLabel
.
layer
.
cornerRadius
=
7
;
levLabel
.
layer
.
masksToBounds
=
YES
;
levLabel
.
backgroundColor
=
[
UIColor
colorWithWhite
:
1
alpha
:
0
.
9
];
self
.
levLabel
=
levLabel
;
self
.
levLabel
.
font
=
[
UIFont
fus_themeFont
:
1
1
];
self
.
levLabel
.
font
=
[
UIFont
fus_themeFont
:
1
2
];
self
.
levLabel
.
textColor
=
[
UIColor
colorWithWhite
:
0
alpha
:
0
.
8
];
self
.
levLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
levLabel
.
text
=
@"0"
;
...
...
@@ -323,26 +323,26 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
[
self
.
levLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
topTitleLabel
.
mas_right
).
offset
(
4
);
make
.
centerY
.
equalTo
(
self
.
topTitleLabel
);
make
.
height
.
mas_equalTo
(
18
);
make
.
height
.
equalTo
(
self
.
vipIconView
.
mas_height
);
}];
[
self
.
vipIconView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
levLabel
.
mas_right
).
offset
(
4
);
make
.
top
.
equalTo
(
self
.
topTitleLabel
);
make
.
centerY
.
equalTo
(
self
.
avatarView
);
make
.
height
.
mas_equalTo
(
14
);
make
.
width
.
mas_equalTo
(
0
);
}];
[
self
.
ticketIconView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
levLabel
.
mas_right
).
offset
(
35
);
make
.
centerY
.
equalTo
(
self
.
topTicketInfoContaine
rView
);
make
.
left
.
equalTo
(
self
.
vipIconView
.
mas_right
).
offset
(
12
);
make
.
centerY
.
equalTo
(
self
.
avata
rView
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
23
,
13
.
5
));
make
.
right
.
lessThanOrEqualTo
(
self
.
topTicketInfoContainerView
);
}];
[
self
.
showTimeNewTicketLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
ticketIconView
.
mas_right
).
offset
(
2
);
make
.
centerY
.
equalTo
(
self
.
topTicketInfoContaine
rView
);
make
.
centerY
.
equalTo
(
self
.
avata
rView
);
make
.
height
.
mas_equalTo
(
18
);
make
.
right
.
lessThanOrEqualTo
(
self
.
topTicketInfoContainerView
);
}];
...
...
@@ -398,12 +398,16 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
if
(
!
self
.
progressLabel
)
{
self
.
progressLabel
=
[[
UILabel
alloc
]
init
];
self
.
progressLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
progressLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
8
];
self
.
progressLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
12
];
self
.
progressLabel
.
textColor
=
UIColor
.
whiteColor
;
self
.
progressLabel
.
adjustsFontSizeToFitWidth
=
YES
;
self
.
progressLabel
.
minimumScaleFactor
=
0
.
7
;
self
.
progressLabel
.
baselineAdjustment
=
UIBaselineAdjustmentAlignCenters
;
self
.
progressLabel
.
allowsDefaultTighteningForTruncation
=
YES
;
self
.
progressLabel
.
text
=
@"0%"
;
[
self
.
progressContainer
addSubview
:
self
.
progressLabel
];
[
self
.
progressLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
equalTo
(
self
.
progressContainer
);
make
.
edges
.
equalTo
(
self
.
progressContainer
)
.
insets
(
UIEdgeInsetsMake
(
8
,
8
,
8
,
8
))
;
}];
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/EntryMain/FUSPayRoomEntryMainView.m
View file @
8ed0da73
...
...
@@ -384,26 +384,45 @@ static NSInteger const kFUSPayRoomEntryMainViewTag = 90917003;
NSForegroundColorAttributeName:
normalTextColor
}];
NSError
*
regexError
=
nil
;
NSRegularExpression
*
regex
=
[
NSRegularExpression
regularExpressionWithPattern
:
@"(
\\
d+)
\\
/分钟"
options
:
0
error
:&
regexError
];
NSArray
<
NSTextCheckingResult
*>
*
matches
=
(
regexError
?
@[]
:
[
regex
matchesInString
:
safeText
options
:
0
range
:
NSMakeRange
(
0
,
safeText
.
length
)]);
NSTextCheckingResult
*
lastMatch
=
matches
.
lastObject
;
if
(
lastMatch
&&
lastMatch
.
numberOfRanges
>
1
)
{
NSRange
digitRange
=
[
lastMatch
rangeAtIndex
:
1
];
if
(
digitRange
.
location
!=
NSNotFound
&&
NSMaxRange
(
digitRange
)
<=
safeText
.
length
)
{
NSAttributedString
*
attachmentAttr
=
[
NSAttributedString
attributedStringWithAttachment
:
attachment
];
NSAttributedString
*
spaceAttr
=
[[
NSAttributedString
alloc
]
initWithString
:
@" "
attributes
:@{
NSFontAttributeName:
self
.
bottomTipLabel
.
font
,
NSForegroundColorAttributeName:
normalTextColor
}];
[
textAttr
insertAttributedString
:
attachmentAttr
atIndex
:
digitRange
.
location
];
[
textAttr
insertAttributedString
:
spaceAttr
atIndex
:(
digitRange
.
location
+
1
)];
[
textAttr
addAttribute
:
NSForegroundColorAttributeName
value
:
jewelTextColor
range
:
NSMakeRange
(
digitRange
.
location
+
2
,
digitRange
.
length
)];
NSRange
commaRange
=
[
safeText
rangeOfString
:
@","
options
:
NSBackwardsSearch
];
if
(
commaRange
.
location
==
NSNotFound
)
{
commaRange
=
[
safeText
rangeOfString
:
@","
options
:
NSBackwardsSearch
];
}
NSRange
digitRange
=
NSMakeRange
(
NSNotFound
,
0
);
if
(
commaRange
.
location
!=
NSNotFound
&&
NSMaxRange
(
commaRange
)
<
safeText
.
length
)
{
NSRange
suffixRange
=
NSMakeRange
(
NSMaxRange
(
commaRange
),
safeText
.
length
-
NSMaxRange
(
commaRange
));
NSError
*
suffixRegexError
=
nil
;
NSRegularExpression
*
suffixRegex
=
[
NSRegularExpression
regularExpressionWithPattern
:
@"(
\\
d+)"
options
:
0
error
:&
suffixRegexError
];
NSTextCheckingResult
*
suffixMatch
=
(
suffixRegexError
?
nil
:
[
suffixRegex
firstMatchInString
:
safeText
options
:
0
range
:
suffixRange
]);
if
(
suffixMatch
&&
suffixMatch
.
numberOfRanges
>
1
)
{
digitRange
=
[
suffixMatch
rangeAtIndex
:
1
];
}
}
if
(
digitRange
.
location
==
NSNotFound
)
{
NSError
*
fallbackRegexError
=
nil
;
NSRegularExpression
*
fallbackRegex
=
[
NSRegularExpression
regularExpressionWithPattern
:
@"(
\\
d+)
\\
s*/"
options
:
0
error
:&
fallbackRegexError
];
NSArray
<
NSTextCheckingResult
*>
*
matches
=
(
fallbackRegexError
?
@[]
:
[
fallbackRegex
matchesInString
:
safeText
options
:
0
range
:
NSMakeRange
(
0
,
safeText
.
length
)]);
NSTextCheckingResult
*
lastMatch
=
matches
.
lastObject
;
if
(
lastMatch
&&
lastMatch
.
numberOfRanges
>
1
)
{
digitRange
=
[
lastMatch
rangeAtIndex
:
1
];
}
}
if
(
digitRange
.
location
!=
NSNotFound
&&
NSMaxRange
(
digitRange
)
<=
safeText
.
length
)
{
NSAttributedString
*
attachmentAttr
=
[
NSAttributedString
attributedStringWithAttachment
:
attachment
];
NSAttributedString
*
spaceAttr
=
[[
NSAttributedString
alloc
]
initWithString
:
@" "
attributes
:@{
NSFontAttributeName:
self
.
bottomTipLabel
.
font
,
NSForegroundColorAttributeName:
normalTextColor
}];
[
textAttr
insertAttributedString
:
attachmentAttr
atIndex
:
digitRange
.
location
];
[
textAttr
insertAttributedString
:
spaceAttr
atIndex
:(
digitRange
.
location
+
1
)];
[
textAttr
addAttribute
:
NSForegroundColorAttributeName
value
:
jewelTextColor
range
:
NSMakeRange
(
digitRange
.
location
+
2
,
digitRange
.
length
)];
}
NSMutableParagraphStyle
*
paragraphStyle
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle
.
alignment
=
NSTextAlignmentCenter
;
[
textAttr
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle
range
:
NSMakeRange
(
0
,
textAttr
.
length
)];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
View file @
8ed0da73
...
...
@@ -59,6 +59,7 @@ import FUSCommon
public
var
requestType
:
Int
=
0
/// 普通嘉宾就是,0:公开,1:粉丝,2,私密 特别嘉宾就是 锁定类型:0:不锁定、1:付费、2:密码
public
var
scopeType
=
FUSLiveRoomScopeType
.
open
private
var
availableScopeTypes
:
[
FUSLiveRoomScopeType
]
=
[]
let
contentViewHeight
=
312.0
+
UIView
.
fus_SafeBottom
()
let
contentView
=
FUSPanGestureAlertView
(
frame
:
CGRectMake
(
0
,
0
,
UIView
.
fus_screenW
(),
312
))
...
...
@@ -118,48 +119,53 @@ import FUSCommon
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
(
14
+
UIView
.
fus_SafeBottom
()))
}
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_payScope_cell"
]
titlesList
=
[
String
.
fus_localString
(
"公开屋"
),
.
fus_localString
(
"私享屋"
),
.
fus_localString
(
"付费屋"
)]
subTitlesList
=
[
String
.
fus_localString
(
"所有人可进入房间"
),
.
fus_localString
(
"已关闭窗帘,玩家输入密码打开"
),
.
fus_localString
(
"玩家需付费观看"
)]
struct
ScopeItem
{
let
scopeType
:
FUSLiveRoomScopeType
let
icon
:
String
let
title
:
String
let
subTitle
:
String
}
let
isReviewMode
=
FUSConfig
.
sharedInstanced
()
.
devConfigs
.
appStatus
var
scopeItems
:
[
ScopeItem
]
=
[
ScopeItem
(
scopeType
:
.
open
,
icon
:
"live_start_openScope_cell"
,
title
:
.
fus_localString
(
"公开屋"
),
subTitle
:
.
fus_localString
(
"所有人可进入房间"
)),
ScopeItem
(
scopeType
:
.
password
,
icon
:
"live_start_passwordScope_cell"
,
title
:
.
fus_localString
(
"私享屋"
),
subTitle
:
.
fus_localString
(
"已关闭窗帘,玩家输入密码打开"
))
]
if
!
isReviewMode
{
scopeItems
.
append
(
ScopeItem
(
scopeType
:
.
pay
,
icon
:
"live_start_payScope_cell"
,
title
:
.
fus_localString
(
"付费屋"
),
subTitle
:
.
fus_localString
(
"玩家需付费观看"
))
)
}
self
.
availableScopeTypes
=
scopeItems
.
map
{
$0
.
scopeType
}
if
isReviewMode
&&
self
.
scopeType
==
.
pay
{
self
.
scopeType
=
.
open
}
let
itemHeight
=
56.0
privacyContentView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
.
offset
(
16
)
make
.
height
.
equalTo
(
titlesList
.
count
*
Int
(
itemHeight
)
+
10
)
make
.
height
.
equalTo
(
scopeItems
.
count
*
Int
(
itemHeight
)
+
10
)
}
let
selectIndex
=
fus_getIndexWithScopeType
()
for
(
index
,
i
conStr
)
in
iconImagesList
.
enumerated
()
{
for
(
index
,
i
tem
)
in
scopeItems
.
enumerated
()
{
var
canSelect
=
true
if
index
==
0
{
if
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
?
.
liveScopeOpen
.
intValue
==
-
1
{
canSelect
=
false
}
}
let
itemView
=
FUSLiveStartSetPrivacyItemView
.
fus_create
(
icon
:
i
conStr
,
title
:
titlesList
[
index
],
subTitle
:
subTitlesList
[
index
]
,
canSelect
:
canSelect
)
if
i
ndex
==
2
{
let
itemView
=
FUSLiveStartSetPrivacyItemView
.
fus_create
(
icon
:
i
tem
.
icon
,
title
:
item
.
title
,
subTitle
:
item
.
subTitle
,
canSelect
:
canSelect
)
if
i
tem
.
scopeType
==
.
pay
{
if
let
payData
=
FUSLiveHelper
.
shareInstance
()
.
liveBeforeReadyInfo
?
.
payData
,
(
payData
.
enable
??
"0"
)
.
intValue
!=
1
{
let
warnSubTitle
=
payData
.
warnSubTitle
??
""
...
...
@@ -227,18 +233,22 @@ import FUSCommon
}
func
fus_itemDidSelected
(
index
:
Int
){
if
index
<
0
||
index
>=
self
.
availableScopeTypes
.
count
{
return
}
let
selectedScopeType
=
self
.
availableScopeTypes
[
index
]
switch
index
{
case
0
:
switch
selectedScopeType
{
case
.
open
:
if
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
encryptionData
?
.
liveScopeOpen
.
intValue
==
-
1
{
self
.
scopeType
=
.
password
}
else
{
self
.
scopeType
=
.
open
}
case
1
:
case
.
password
:
self
.
scopeType
=
.
password
case
2
:
case
.
pay
:
if
let
payData
=
FUSLiveHelper
.
shareInstance
()
.
liveBeforeReadyInfo
?
.
payData
{
// 判断是否允许付费屋
if
(
payData
.
enable
??
"0"
)
.
intValue
!=
1
{
let
warnTitle
=
payData
.
warnTitle
??
""
...
...
@@ -257,8 +267,6 @@ import FUSCommon
self
?
.
fus_itemDidSelected
(
index
:
index
)
}
}
// case 2:
// self.scopeType = .intimacy
default
:
break
}
...
...
@@ -277,18 +285,10 @@ import FUSCommon
// 强化判断,不强依赖类型
func
fus_getIndexWithScopeType
()
->
Int
{
switch
self
.
scopeType
{
case
.
open
:
return
0
case
.
password
:
return
1
case
.
pay
:
return
2
// case .intimacy:
// return 2
@unknown
default
:
return
0
if
let
index
=
self
.
availableScopeTypes
.
firstIndex
(
of
:
self
.
scopeType
)
{
return
index
}
return
0
}
func
fus_showWithAnimation
(){
...
...
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