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
c1d55a74
authored
Mar 10, 2026
by
ludi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复一些bug,把直播间下面的工具栏变为可滚动
parent
452c13d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
228 additions
and
82 deletions
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolWebpButton.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKContentView/SubViews/FUSPKScoreProgressView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/Cell/FUSPKUserContributionLogCell.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/FUSPKControlWebView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/FUSPKUserContributionLogInLiveAlertView.swift
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolView.m
View file @
c1d55a74
...
...
@@ -26,6 +26,9 @@
@interface
FUSLiveBottomToolView
()
<
FUSLiveBottomToolSubViewDelegate
>
/// 容器的View
@property
(
nonatomic
,
strong
)
UIScrollView
*
contentView
;
// 是主播类型、观众类型,OBS类型
@property
(
nonatomic
,
assign
)
FUSLiveBottomViewType
viewType
;
...
...
@@ -75,7 +78,7 @@
@property
(
nonatomic
,
strong
)
UIButton
*
beautyBtn
;
@property
(
nonatomic
,
strong
)
UI
Button
*
giftBtn
;
@property
(
nonatomic
,
strong
)
FUSLiveBottomToolCustomImageSize
Button
*
giftBtn
;
/// 礼物引导图片
@property
(
nonatomic
,
strong
)
YYAnimatedImageView
*
giftGuideImageView
;
...
...
@@ -114,6 +117,7 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
fus_setupContentViewIfNeeded
];
_allBtnTypes
=
[
NSMutableArray
arrayWithArray
:
bottomTypes
];
[
self
initBtnsWithTypes
:
_allBtnTypes
];
...
...
@@ -138,6 +142,7 @@
BOOL
isHaveGiftBtn
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSLiveUDKeys
.
fus_LIVE_HOST_GIFT_VIEW_SWITCH
]
boolValue
];
if
(
self
)
{
[
self
fus_setupContentViewIfNeeded
];
if
(
viewType
==
FUSLiveBottomViewTypeHost
)
{
if
([
FUSLiveHelper
shareInstance
].
liveRoomType
==
FUSRoomTypeLinkMic
)
{
_allBtnTypes
=
[
NSMutableArray
arrayWithArray
:@[
@
(
FUSLiveBottomToolTypeTool
),
...
...
@@ -184,6 +189,25 @@
return
self
;
}
-
(
void
)
fus_setupContentViewIfNeeded
{
if
(
_contentView
)
{
return
;
}
self
.
contentView
=
[[
UIScrollView
alloc
]
initWithFrame
:
self
.
bounds
];
self
.
contentView
.
contentSize
=
self
.
size
;
self
.
contentView
.
clipsToBounds
=
YES
;
self
.
contentView
.
pagingEnabled
=
YES
;
self
.
contentView
.
bounces
=
NO
;
self
.
contentView
.
scrollEnabled
=
YES
;
self
.
contentView
.
showsVerticalScrollIndicator
=
NO
;
self
.
contentView
.
showsHorizontalScrollIndicator
=
NO
;
self
.
contentView
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
addSubview
:
self
.
contentView
];
}
-
(
void
)
fus_changeToLinkMicMode
{
if
(
self
.
viewType
==
FUSLiveBottomViewTypeHost
)
{
...
...
@@ -208,6 +232,7 @@
[
normalBtn
sizeToFit
];
normalBtn
.
frame
=
CGRectMake
(
0
,
0
,
normalBtn
.
width
,
0
);
[
normalBtn
setImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_chat_icon_message"
]
forState
:
UIControlStateNormal
];
normalBtn
.
titleLabel
.
lineBreakMode
=
NSLineBreakByTruncatingTail
;
normalBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
8
,
0
,
-
8
);
normalBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
12
,
0
,
-
8
);
normalBtn
.
titleLabel
.
minimumScaleFactor
=
0
.
5
;
...
...
@@ -280,24 +305,113 @@
/// 按钮重新布局
-
(
void
)
fus_layoutBtnFrame
{
//- (void)fus_layoutBtnFrame{
//
// [self fus_updateDivisionBtnType];
// // 按钮大小不变
// CGFloat wholeBtnW = 0;
// for (UIButton *btn in _allBtns) {
// CGFloat w = BTN_WIDTH;
// if (btn.width > BTN_WIDTH) {
// w = btn.width;
// }
//
// wholeBtnW += (w + BTN_MARGIN);
// }
// CGFloat btnW = BTN_WIDTH;
//
// // 剩余空白地方
// CGFloat leftW = UIView.fus_screenW - wholeBtnW;
// if (leftW < 0) {
// }
//
// CGFloat lastMaxX = BTN_MARGIN;
// CGFloat bottomY = 0;
// for (UIButton *btn in _allBtns) {
// CGFloat width = btn.width > btnW?btn.width:btnW;
//
// btn.frame = CGRectMake(lastMaxX, self.height/2.0 - btnW/2.0, width, btnW);
//
// if (btn.tag == FUSLiveBottomToolTypeFirstCharge) { // 首充的图片尺寸有点奇葩,不能随便插入,特殊处理
// btn.x = lastMaxX - 18;
// btn.height = width;
// btn.centerY = self.height/2.0;
// }
//
// if (btn.tag == _divisionBtnType) {
// lastMaxX = lastMaxX + btn.width + leftW;
// }else{
// lastMaxX = lastMaxX + btn.width + BTN_MARGIN;
// }
//
// if (btn.tag == FUSLiveBottomToolTypeAudienceMessage) {
// btn.layer.cornerRadius = btn.height/2.0;
// btn.clipsToBounds = YES;
// }
//
// bottomY = CGRectGetMaxY(btn.frame);
// [self addSubview:btn];
// }
//}
/// 按钮重新布局
-
(
void
)
fus_layoutBtnFrame
{
[
self
fus_updateDivisionBtnType
];
// 按钮大小不变
CGFloat
wholeBtnW
=
0
;
UIButton
*
audienceMsgBtn
=
nil
;
for
(
UIButton
*
btn
in
_allBtns
)
{
CGFloat
w
=
BTN_WIDTH
;
if
(
btn
.
width
>
BTN_WIDTH
)
{
if
(
btn
.
width
>
BTN_WIDTH
&&
btn
.
tag
!=
FUSLiveBottomToolTypeFirstCharge
)
{
w
=
btn
.
width
;
}
wholeBtnW
+=
(
w
+
BTN_MARGIN
);
if
(
btn
.
tag
==
FUSLiveBottomToolTypeAudienceMessage
)
{
audienceMsgBtn
=
btn
;
}
else
{
wholeBtnW
+=
(
w
+
BTN_MARGIN
);
}
}
CGFloat
btnW
=
BTN_WIDTH
;
CGFloat
btnW
=
BTN_WIDTH
;
// 剩余空白地方
CGFloat
leftW
=
UIView
.
fus_screenW
-
wholeBtnW
;
CGFloat
leftW
=
[
UIView
fus_screenW
]
-
wholeBtnW
;
/// 如果存在关注的聊天按钮,在空间不足的情况下,要缩小聊天按钮
if
(
audienceMsgBtn
!=
nil
)
{
// 还可以给 audienceMsgBtn的宽度
CGFloat
leftToBtnWidth
=
leftW
-
BTN_MARGIN
;
/// 如果剩余的大小已经比观众聊天按钮少了。则重置一下观众聊天按钮
if
(
leftToBtnWidth
<
audienceMsgBtn
.
width
)
{
if
(
leftToBtnWidth
<
BTN_WIDTH
)
{
audienceMsgBtn
.
width
=
BTN_WIDTH
;
// [audienceMsgBtn setImage:[LiveRoomBundle imageNamed:@"live_chat_icon_message_host"] forState:UIControlStateNormal];
UIImage
*
btnImage
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_chat_icon_message"
];
[
audienceMsgBtn
setImage
:
btnImage
forState
:
UIControlStateNormal
];
[
audienceMsgBtn
setTitle
:
nil
forState
:
UIControlStateNormal
];
}
else
{
UIImage
*
btnImage
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"live_chat_icon_message"
];
NSString
*
titleStr
=
[
NSString
stringWithFormat
:
@" %@"
,[
NSString
fus_localString
:
@"和所有人聊天"
]];
[
audienceMsgBtn
setImage
:
btnImage
forState
:
UIControlStateNormal
];
[
audienceMsgBtn
setTitle
:
titleStr
forState
:
UIControlStateNormal
];
audienceMsgBtn
.
width
=
leftToBtnWidth
;
}
}
leftW
=
leftW
-
(
audienceMsgBtn
.
width
+
BTN_MARGIN
);
_inputChatGuideRippleView
.
frame
=
audienceMsgBtn
.
frame
;
}
if
(
leftW
<
0
)
{
self
.
contentView
.
contentSize
=
CGSizeMake
(
self
.
height
,
self
.
width
-
leftW
);
self
.
contentView
.
scrollEnabled
=
YES
;
leftW
=
0
;
}
else
{
self
.
contentView
.
contentSize
=
self
.
size
;
self
.
contentView
.
scrollEnabled
=
NO
;
}
CGFloat
lastMaxX
=
BTN_MARGIN
;
...
...
@@ -307,16 +421,20 @@
btn
.
frame
=
CGRectMake
(
lastMaxX
,
self
.
height
/
2
.
0
-
btnW
/
2
.
0
,
width
,
btnW
);
CGFloat
lastMaxXBtnWidth
=
btn
.
width
;
if
(
btn
.
tag
==
FUSLiveBottomToolTypeFirstCharge
)
{
// 首充的图片尺寸有点奇葩,不能随便插入,特殊处理
btn
.
x
=
lastMaxX
-
18
;
btn
.
height
=
width
;
btn
.
centerY
=
self
.
height
/
2
.
0
;
lastMaxXBtnWidth
=
BTN_WIDTH
;
}
if
(
btn
.
tag
==
_divisionBtnType
)
{
lastMaxX
=
lastMaxX
+
btn
.
width
+
leftW
;
lastMaxX
=
lastMaxX
+
lastMaxXBtnWidth
+
leftW
;
}
else
{
lastMaxX
=
lastMaxX
+
btn
.
width
+
BTN_MARGIN
;
lastMaxX
=
lastMaxX
+
lastMaxXBtnWidth
+
BTN_MARGIN
;
}
if
(
btn
.
tag
==
FUSLiveBottomToolTypeAudienceMessage
)
{
...
...
@@ -325,8 +443,15 @@
}
bottomY
=
CGRectGetMaxY
(
btn
.
frame
);
[
self
addSubview
:
btn
];
[
self
.
contentView
addSubview
:
btn
];
}
// if (_pkMatchingAnimationView != nil) {
// _pkMatchingAnimationView.frame = self.PKBtn.frame;
// }
// [self fus_setupMessageBoxBadgeHidden];
}
#pragma mark - 设置按钮的图片, 新加的按钮要在这里添加按钮的图片
...
...
@@ -388,13 +513,15 @@
if
(
isSelect
){
image
=
[
UIImage
fus_liveGiftImage_normal
];
// image = [FUSShowRoomCenterBunble imageNamed:@"live_chat_icon_gift_type2"];
[
self
.
giftBtn
setImage
:
image
forState
:
UIControlStateHighlighted
];
// [self.giftBtn setImage:image forState:UIControlStateHighlighted];
self
.
giftBtn
.
customImageView
.
image
=
image
;
}
else
{
image
=
[
UIImage
fus_liveGiftImage_normal
];
// image = [FUSShowRoomCenterBunble imageNamed:@"live_chat_icon_gift_type2"];
[
self
.
giftBtn
setImage
:
image
forState
:
UIControlStateNormal
];
// [self.giftBtn setImage:image forState:UIControlStateNormal];
self
.
giftBtn
.
customImageView
.
image
=
image
;
btn
=
self
.
giftBtn
;
}
...
...
@@ -918,7 +1045,7 @@
if
(
!
_inputChatGuideRippleView
)
{
_inputChatGuideRippleView
=
[[
FUSUserGuideRippleView
alloc
]
init
];
_inputChatGuideRippleView
.
frame
=
[
self
fus_getBtnFrameWithToolType
:
FUSLiveBottomToolTypeAudienceMessage
];
[
self
addSubview
:
_inputChatGuideRippleView
];
[
self
.
contentView
addSubview
:
_inputChatGuideRippleView
];
}
}
else
{
self
.
giftGuideImageView
.
hidden
=
YES
;
...
...
@@ -1278,7 +1405,7 @@
[
self
fus_hideGiftMessageTipView
];
self
.
giftMessageTipView
=
[[
UIView
alloc
]
init
];
[
self
addSubview
:
self
.
giftMessageTipView
];
[
self
.
contentView
addSubview
:
self
.
giftMessageTipView
];
UIImageView
*
bgImageView
=
[[
UIImageView
alloc
]
initWithImage
:[
FUSShowRoomCenterBunble
imageNamed
:
@"live_receive_gift_message_tip_bg"
]];
bgImageView
.
contentMode
=
UIViewContentModeScaleToFill
;
...
...
@@ -1448,11 +1575,12 @@
return
_beautyBtn
;
}
-
(
UI
Button
*
)
giftBtn
{
-
(
FUSLiveBottomToolCustomImageSize
Button
*
)
giftBtn
{
if
(
!
_giftBtn
)
{
_giftBtn
=
[
UI
Button
buttonWithType
:
UIButtonTypeCustom
];
_giftBtn
=
[
FUSLiveBottomToolCustomImageSize
Button
buttonWithType
:
UIButtonTypeCustom
];
_giftBtn
.
tag
=
FUSLiveBottomToolTypeGift
;
[
_giftBtn
fus_setImageInset
:
-
6
];
if
(
!
_giftGuideImageView
)
{
NSData
*
resourceData
=
[
NSData
dataWithContentsOfFile
:[[
FUSShowRoomCenterBunble
bundle
]
pathForResource
:
@"live_bottom_tool_gift_guide_animate.webp"
ofType
:
nil
]];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveBottomToolWebpButton.swift
View file @
c1d55a74
...
...
@@ -25,3 +25,26 @@ import UIKit
}()
}
/// 可以让图片大,但是按钮小的按钮
@objc
public
class
FUSLiveBottomToolCustomImageSizeButton
:
UIButton
{
@objc
public
lazy
var
customImageView
:
UIImageView
=
{
let
imageView
=
UIImageView
()
imageView
.
isUserInteractionEnabled
=
false
self
.
addSubview
(
imageView
)
imageView
.
snp
.
makeConstraints
{
make
in
make
.
center
.
equalToSuperview
()
make
.
size
.
equalToSuperview
()
}
return
imageView
}()
@objc
public
func
fus_setImageInset
(
_
inset
:
CGFloat
)
{
self
.
customImageView
.
snp
.
remakeConstraints
{
make
in
make
.
center
.
equalToSuperview
()
make
.
size
.
equalToSuperview
()
.
inset
(
inset
)
}
}
}
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKContentView/SubViews/FUSPKScoreProgressView.swift
View file @
c1d55a74
...
...
@@ -13,18 +13,25 @@ class FUSPKScoreProgressView: FUSBaseView {
public
var
clickLeftSideHandler
:((
Bool
)
->
Void
)?
let
circleViewHeight
:
CGFloat
=
36.0
*
UIView
.
fus_screenW
()
/
375.0
let
circleBlackBackgroundHeight
:
CGFloat
=
42.0
*
UIView
.
fus_screenW
()
/
375.0
let
leftBtn
=
UIButton
(
type
:
.
custom
)
let
leftBlackColorView
=
UIView
()
let
leftView
=
UIView
()
let
leftScoreImageView
=
UIImageView
(
image
:
FUSShowRoomCenterBunble
.
imageNamed
(
"live_pk_score_icon"
))
let
leftScoreLabel
=
UILabel
()
let
leftProgress
=
UIView
()
let
rightBtn
=
UIButton
(
type
:
.
custom
)
let
rightBlackColorView
=
UIView
()
let
rightView
=
UIView
()
let
rightScoreImageView
=
UIImageView
(
image
:
FUSShowRoomCenterBunble
.
imageNamed
(
"live_pk_score_icon"
))
let
rightScoreLabel
=
UILabel
()
let
rightProgress
=
UIView
()
let
progressBlackColorView
=
UIView
()
var
redScoreIconAddAnimImage
:
UIImage
?
=
FUSShowRoomCenterBunble
.
imageNamed
(
"live_pk_score_icon_add_anim"
)
var
blueScoreIconAddAnimImage
:
UIImage
?
=
FUSShowRoomCenterBunble
.
imageNamed
(
"live_pk_score_icon_add_anim"
)
let
lightImageView
=
UIImageView
(
image
:
FUSShowRoomCenterBunble
.
imageNamed
(
"live_pk_progress_light_img"
))
...
...
@@ -40,14 +47,25 @@ class FUSPKScoreProgressView: FUSBaseView {
self
.
backgroundColor
=
.
clear
self
.
clipsToBounds
=
false
self
.
leftBlackColorView
.
backgroundColor
=
.
init
(
hex
:
"#111111"
)
self
.
leftBlackColorView
.
layer
.
cornerRadius
=
circleBlackBackgroundHeight
/
2.0
self
.
addSubview
(
leftBlackColorView
)
self
.
rightBlackColorView
.
backgroundColor
=
.
init
(
hex
:
"#111111"
)
self
.
rightBlackColorView
.
layer
.
cornerRadius
=
circleBlackBackgroundHeight
/
2.0
self
.
addSubview
(
rightBlackColorView
)
self
.
progressBlackColorView
.
backgroundColor
=
.
init
(
hex
:
"#111111"
)
self
.
addSubview
(
self
.
progressBlackColorView
)
self
.
addSubview
(
self
.
leftProgress
)
self
.
addSubview
(
self
.
rightProgress
)
self
.
leftView
.
layer
.
cornerRadius
=
18.0
*
UIView
.
fus_screenW
()
/
375
.0
self
.
leftView
.
layer
.
cornerRadius
=
circleViewHeight
/
2
.0
self
.
leftView
.
layer
.
masksToBounds
=
true
self
.
addSubview
(
self
.
leftView
)
self
.
rightView
.
layer
.
cornerRadius
=
18.0
*
UIView
.
fus_screenW
()
/
375
.0
self
.
rightView
.
layer
.
cornerRadius
=
circleViewHeight
/
2
.0
self
.
rightView
.
layer
.
masksToBounds
=
true
self
.
addSubview
(
self
.
rightView
)
...
...
@@ -91,7 +109,7 @@ class FUSPKScoreProgressView: FUSBaseView {
self
.
leftView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
1
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
37.0
*
UIView
.
fus_screenW
()
/
375.0
)
make
.
height
.
equalTo
(
circleViewHeight
)
make
.
width
.
equalTo
(
self
.
leftView
.
snp
.
height
)
}
...
...
@@ -110,7 +128,7 @@ class FUSPKScoreProgressView: FUSBaseView {
self
.
rightView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalToSuperview
()
.
offset
(
-
1
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
37.0
*
UIView
.
fus_screenW
()
/
375.0
)
make
.
height
.
equalTo
(
circleViewHeight
)
make
.
width
.
equalTo
(
self
.
leftView
.
snp
.
height
)
}
...
...
@@ -163,6 +181,22 @@ class FUSPKScoreProgressView: FUSBaseView {
make
.
edges
.
equalToSuperview
()
}
self
.
leftBlackColorView
.
snp
.
makeConstraints
{
make
in
make
.
center
.
equalTo
(
self
.
leftView
)
make
.
size
.
equalTo
(
CGSizeMake
(
self
.
circleBlackBackgroundHeight
,
self
.
circleBlackBackgroundHeight
))
}
self
.
rightBlackColorView
.
snp
.
makeConstraints
{
make
in
make
.
center
.
equalTo
(
self
.
rightView
)
make
.
size
.
equalTo
(
CGSizeMake
(
self
.
circleBlackBackgroundHeight
,
self
.
circleBlackBackgroundHeight
))
}
self
.
progressBlackColorView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
leftView
.
snp
.
right
)
.
offset
(
-
4
)
make
.
right
.
equalTo
(
self
.
rightView
.
snp
.
left
)
.
offset
(
4
)
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
23.0
*
UIView
.
fus_screenW
()
/
375.0
)
}
}
override
func
layoutSubviews
()
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/Cell/FUSPKUserContributionLogCell.swift
View file @
c1d55a74
...
...
@@ -31,10 +31,9 @@ class FUSPKUserContributionLogCell: UITableViewCell {
let
bgView
=
UIView
()
let
avatarTapBtn
=
UIButton
(
type
:
.
custom
)
let
faceView
=
FUSRichIconView
(
frame
:
CGRectMake
(
0
,
0
,
34
,
34
))
let
faceView
=
UIImageView
(
frame
:
CGRectMake
(
0
,
0
,
30
,
30
))
let
richImageView
=
UIImageView
(
frame
:
.
init
(
x
:
0
,
y
:
0
,
width
:
37
,
height
:
14
))
let
nicknameLabel
=
UILabel
()
let
noRichNickNameLabel
=
UILabel
()
let
hotNumLabel
=
UILabel
()
let
hotImageView
=
UIImageView
()
let
plusLabel
=
UILabel
()
...
...
@@ -52,17 +51,19 @@ class FUSPKUserContributionLogCell: UITableViewCell {
let
bgColorView
=
UIView
()
bgColorView
.
layer
.
cornerRadius
=
12
bgColorView
.
backgroundColor
=
.
white
.
withAlphaComponent
(
0.08
)
bgColorView
.
backgroundColor
=
.
init
(
hex
:
"#F0F0F0"
)
bgView
.
addSubview
(
bgColorView
)
bgColorView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
faceView
.
layer
.
cornerRadius
=
30
/
2.0
faceView
.
layer
.
masksToBounds
=
true
bgView
.
addSubview
(
faceView
)
faceView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
12
)
make
.
top
.
equalTo
(
6
)
make
.
size
.
equalTo
(
CGSizeMake
(
3
4
,
34
))
make
.
size
.
equalTo
(
CGSizeMake
(
3
0
,
30
))
}
bgView
.
addSubview
(
avatarTapBtn
)
...
...
@@ -74,40 +75,30 @@ class FUSPKUserContributionLogCell: UITableViewCell {
})
.
disposed
(
by
:
disposeBag
)
richImageView
.
contentMode
=
.
scaleAspectFit
bgView
.
addSubview
(
richImageView
)
richImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
faceView
.
snp
.
right
)
.
offset
(
8
)
make
.
centerY
.
equalTo
(
faceView
.
snp
.
centerY
)
make
.
width
.
equalTo
(
37
)
make
.
height
.
equalTo
(
14
)
}
nicknameLabel
.
font
=
.
fus_themeMediumFont
(
15
)
nicknameLabel
.
textColor
=
.
fus_textColorRich
()
bgView
.
addSubview
(
nicknameLabel
)
nicknameLabel
.
snp
.
makeConstraints
{
make
in
// make.left.equalTo(richImageView.snp.right).offset(6)
make
.
left
.
equalTo
(
faceView
.
snp
.
right
)
.
offset
(
8
+
37
+
6
)
make
.
centerY
.
equalTo
(
richImag
eView
.
snp
.
centerY
)
make
.
left
.
equalTo
(
faceView
.
snp
.
right
)
.
offset
(
8
)
make
.
centerY
.
equalTo
(
fac
eView
.
snp
.
centerY
)
make
.
width
.
lessThanOrEqualTo
(
174
)
}
noRichNickNameLabel
.
isHidden
=
true
noRichNickNameLabel
.
font
=
.
fus_themeMediumFont
(
15
)
bgView
.
addSubview
(
noRichNickNameLabel
)
noRichNickNameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
faceView
.
snp
.
right
)
.
offset
(
8
)
make
.
width
.
lessThanOrEqualTo
(
174
)
richImageView
.
contentMode
=
.
scaleAspectFit
bgView
.
addSubview
(
richImageView
)
richImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
nicknameLabel
.
snp
.
right
)
.
offset
(
2
)
make
.
centerY
.
equalTo
(
faceView
.
snp
.
centerY
)
}
hotNumLabel
.
font
=
.
fus_themeMediumFont
(
15
)
hotNumLabel
.
textColor
=
.
white
hotNumLabel
.
textColor
=
.
fus_textColorRich
()
hotNumLabel
.
text
=
"0"
bgView
.
addSubview
(
hotNumLabel
)
hotNumLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
12
)
make
.
centerY
.
equalTo
(
n
oRichNickN
ameLabel
.
snp
.
centerY
)
make
.
centerY
.
equalTo
(
n
ickn
ameLabel
.
snp
.
centerY
)
}
hotImageView
.
contentMode
=
.
scaleAspectFit
...
...
@@ -119,7 +110,7 @@ class FUSPKUserContributionLogCell: UITableViewCell {
}
plusLabel
.
font
=
.
fus_themeMediumFont
(
15
)
plusLabel
.
textColor
=
.
white
plusLabel
.
textColor
=
.
fus_textColorRich
()
plusLabel
.
text
=
"+"
bgView
.
addSubview
(
plusLabel
)
plusLabel
.
snp
.
makeConstraints
{
make
in
...
...
@@ -156,8 +147,6 @@ class FUSPKUserContributionLogCell: UITableViewCell {
func
fus_setup
(
model
:
FUSVSIndexDevoteUserModel
,
icon
:
UIImage
?)
{
var
level
=
model
.
level
self
.
nicknameLabel
.
textColor
=
.
white
self
.
noRichNickNameLabel
.
textColor
=
.
white
if
model
.
inVip
==
0
{
level
=
0
...
...
@@ -167,37 +156,9 @@ class FUSPKUserContributionLogCell: UITableViewCell {
level
=
-
1
}
if
let
levelModel
=
FUSSwiftCacheDataShare
.
share
.
fus_levelModel
(
level
:
level
)
{
self
.
nicknameLabel
.
textColor
=
.
init
(
hex
:
levelModel
.
color
)
self
.
noRichNickNameLabel
.
textColor
=
.
init
(
hex
:
levelModel
.
color
)
richImageView
.
setWebImageWithSubURLString
(
levelModel
.
icon
)
}
if
level
>
0
{
richImageView
.
isHidden
=
false
nicknameLabel
.
isHidden
=
false
noRichNickNameLabel
.
isHidden
=
true
// nicknameLabel.snp.remakeConstraints { make in
//// make.left.equalTo(richImageView.snp.right).offset(6)
// make.left.equalTo(faceView.snp.right).offset(8 + 37 + 6)
// make.width.lessThanOrEqualTo(174)
// make.centerY.equalTo(faceView.snp.centerY)
// }
}
else
{
richImageView
.
isHidden
=
true
nicknameLabel
.
isHidden
=
true
noRichNickNameLabel
.
isHidden
=
false
// nicknameLabel.snp.remakeConstraints { make in
// make.left.equalTo(faceView.snp.right).offset(8)
// make.width.lessThanOrEqualTo(174)
// make.centerY.equalTo(faceView.snp.centerY)
// }
}
self
.
faceView
.
fus_setupIcon
(
withFacePath
:
model
.
face
,
level
:
level
)
self
.
faceView
.
setWebImageWithSubURLString
(
model
.
face
)
self
.
richImageView
.
image
=
.
fus_image
(
withLevel
:
level
)
self
.
nicknameLabel
.
text
=
model
.
nickname
.
removingPercentEncoding
self
.
noRichNickNameLabel
.
text
=
model
.
nickname
.
removingPercentEncoding
self
.
hotNumLabel
.
text
=
"
\(
model
.
total
)
"
self
.
firstBloodImageView
.
isHidden
=
(
model
.
firstblood
==
0
)
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/FUSPKControlWebView.swift
View file @
c1d55a74
...
...
@@ -84,7 +84,7 @@ class FUSPKControlWebView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
.
fus_localString
(
"记录"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
if
let
urlDict
=
FUSCacheDataShare
.
shareStore
()
.
settingInitDataModel
.
vsUrlConfig
as?
[
String
:
Any
],
let
url
=
urlDict
[
"url"
]
as?
String
{
...
...
@@ -105,7 +105,7 @@ class FUSPKControlWebView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
" "
+
.
fus_localString
(
"说明"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
if
let
urlDict
=
FUSCacheDataShare
.
shareStore
()
.
settingInitDataModel
.
vsUrlConfig
as?
[
String
:
Any
],
let
url
=
urlDict
[
"helpUrl"
]
as?
String
{
...
...
@@ -121,7 +121,7 @@ class FUSPKControlWebView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
.
fus_localString
(
"说明"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
if
let
urlDict
=
FUSCacheDataShare
.
shareStore
()
.
settingInitDataModel
.
vsUrlConfig
as?
[
String
:
Any
],
let
url
=
urlDict
[
"helpUrl"
]
as?
String
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PK/FUSPKNew/FUSView/FUSPKControlView/FUSPKUserContributionLogInLiveAlertView.swift
View file @
c1d55a74
...
...
@@ -195,7 +195,7 @@ class FUSPKUserContributionLogInLiveAlertView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
.
fus_localString
(
"按赞值记录"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
}
else
if
gamePlay
==
104
{
...
...
@@ -206,7 +206,7 @@ class FUSPKUserContributionLogInLiveAlertView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
.
fus_localString
(
"礼物值记录"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
}
else
{
...
...
@@ -217,7 +217,7 @@ class FUSPKUserContributionLogInLiveAlertView: FUSPKControlSubBaseView {
make
.
alignment
=
.
center
}
make
.
append
(
.
fus_localString
(
"人气值记录"
))
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
white
)
make
.
font
(
.
fus_themeMediumFont
(
18
))
.
textColor
(
.
fus_textColorRich
()
)
})
}
}
...
...
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