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
c3d07420
authored
Jul 12, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播間信用評分
parent
914f9077
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
201 additions
and
7 deletions
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_half.imageset/Contents.json
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_half.imageset/视聊-小星-半星@3x.png
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_light.imageset/Contents.json
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_light.imageset/视聊-小星-亮@3x.png
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_whole_gray.imageset/Contents.json
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_whole_gray.imageset/视聊-小星-暗@3x.png
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSVideoChatUserInfoView.m
FuSiLive/Resources/LocalizationString/Fusi_Chinese.strings
FuSiLive/Resources/LocalizationString/Fusi_Chinese_Traditional.strings
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_half.imageset/Contents.json
0 → 100644
View file @
c3d07420
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"视聊-小星-半星@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_half.imageset/视聊-小星-半星@3x.png
0 → 100644
View file @
c3d07420
1.26 KB
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_light.imageset/Contents.json
0 → 100644
View file @
c3d07420
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"视聊-小星-亮@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_light.imageset/视聊-小星-亮@3x.png
0 → 100644
View file @
c3d07420
1.38 KB
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_whole_gray.imageset/Contents.json
0 → 100644
View file @
c3d07420
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"视聊-小星-暗@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FuSiLive/Assets.xcassets/Live/live_user_video_remark_star_whole_gray.imageset/视聊-小星-暗@3x.png
0 → 100644
View file @
c3d07420
1.15 KB
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSVideoChatUserInfoView.m
View file @
c3d07420
...
...
@@ -91,12 +91,13 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
// 是否能点击at按钮
@property
(
nonatomic
,
assign
)
BOOL
enableAtBtn
;
//
#pragma mark - 评分
#pragma mark - 评分
// credit
//@property (nonatomic, strong) UILabel *creditLabel;
//@property (nonatomic, strong) UILabel *remarkLabel;
//@property (nonatomic, strong) UIView *starBgView;
//@property (nonatomic, strong) NSMutableArray *starImageViews;
@property
(
nonatomic
,
strong
)
UIView
*
creditView
;
@property
(
nonatomic
,
strong
)
UILabel
*
creditLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
remarkLabel
;
@property
(
nonatomic
,
strong
)
UIView
*
starBgView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
starImageViews
;
#pragma mark - Tags
// tagView的列表
...
...
@@ -300,7 +301,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[
self
fus_initLevLabel
];
[
self
fus_initSignLabel
];
[
self
fus_initBottomBgView
];
//
[self fus_initCreditUI];
[
self
fus_initCreditUI
];
[
self
.
bgView
fusrtl_setSubViewsToRTL
];
...
...
@@ -743,7 +744,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
[
self
fus_updateBtnsWithModel
:
model
];
//
[self fus_setCreditInfoWithCurrentModel];
[
self
fus_setCreditInfoWithCurrentModel
];
[
self
fus_resetTagWithModel
:
model
];
[
self
fus_updateControlViewWithModel
:
model
];
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
addSubview
:
self
];
...
...
@@ -1108,6 +1109,133 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
if
(
_didClickUserInfoViewBtnBlock
)
_didClickUserInfoViewBtnBlock
(
FUSUserInfoViewBtnTypeUserHead
,
_currentModel
);
}
#pragma mark - 视讯评分相关的逻辑
-
(
void
)
fus_initCreditUI
{
self
.
creditView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
117
,
37
)];
self
.
creditView
.
layer
.
cornerRadius
=
6
;
self
.
creditView
.
layer
.
masksToBounds
=
YES
;
self
.
creditView
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
alpha
:
0
.
2
];
[
self
.
clearBgView
insertSubview
:
self
.
creditView
belowSubview
:
self
.
bgView
];
self
.
creditView
.
centerY
=
self
.
bgView
.
y
;
self
.
creditLabel
=
[[
UILabel
alloc
]
init
];
self
.
creditLabel
.
font
=
[
UIFont
fus_themeMediumFont
:
8
];
self
.
creditLabel
.
text
=
[
NSString
fus_localString
:
@"私房信用:"
];
self
.
creditLabel
.
textColor
=
[
UIColor
whiteColor
];
[
self
.
creditLabel
sizeToFit
];
[
self
.
creditView
addSubview
:
self
.
creditLabel
];
_remarkLabel
=
[[
UILabel
alloc
]
init
];
_remarkLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
8
];
_remarkLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#53B9F3"
];
[
self
.
creditView
addSubview
:
_remarkLabel
];
_starBgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
50
,
8
)];
[
self
.
creditView
addSubview
:
_starBgView
];
_starImageViews
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
((
_starBgView
.
height
+
2
)
*
i
,
0
,
_starBgView
.
height
,
_starBgView
.
height
)];
imageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
[
_starBgView
addSubview
:
imageView
];
[
_starImageViews
addObject
:
imageView
];
}
_starBgView
.
width
=
_starBgView
.
height
*
5
+
2
*
4
;
[
_starBgView
fusrtl_setSubViewsToRTL
];
}
-
(
void
)
fus_setCreditInfoWithCurrentModel
{
if
(
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
self
.
creditView
.
hidden
=
YES
;
return
;
}
self
.
creditView
.
hidden
=
NO
;
[
self
.
creditLabel
sizeToFit
];
self
.
creditLabel
.
x
=
7
;
self
.
creditLabel
.
centerY
=
self
.
creditView
.
height
/
4
.
0
f
;
if
(
self
.
currentModel
.
chatWith
.
avgLevel
>
0
&&
!
FUSConfig
.
sharedInstanced
.
devConfigs
.
appStatus
)
{
//设置评分
self
.
starBgView
.
hidden
=
NO
;
[
self
fus_setStarCountWithMark
:
self
.
currentModel
.
chatWith
.
avgLevel
];
self
.
remarkLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.1lf"
,
self
.
currentModel
.
chatWith
.
avgLevel
];
[
self
.
remarkLabel
sizeToFit
];
self
.
remarkLabel
.
centerY
=
self
.
creditLabel
.
centerY
;
self
.
remarkLabel
.
x
=
self
.
creditLabel
.
right
;
self
.
starBgView
.
x
=
self
.
remarkLabel
.
right
+
3
;
self
.
starBgView
.
centerY
=
self
.
creditLabel
.
centerY
;
self
.
remarkLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#53B9F3"
];
self
.
creditView
.
width
=
self
.
starBgView
.
right
+
7
;
self
.
creditView
.
x
=
self
.
width
-
self
.
creditView
.
width
-
7
;
[
self
.
creditLabel
fusrtl_resetFrameToFitRTL
];
[
self
.
starBgView
fusrtl_resetFrameToFitRTL
];
[
self
.
remarkLabel
fusrtl_resetFrameToFitRTL
];
}
else
{
self
.
starBgView
.
hidden
=
YES
;
self
.
remarkLabel
.
text
=
[
NSString
fus_localString
:
@"暂无评分"
];
[
self
.
remarkLabel
sizeToFit
];
self
.
remarkLabel
.
x
=
self
.
creditLabel
.
right
;
self
.
remarkLabel
.
centerY
=
self
.
creditLabel
.
centerY
;
self
.
remarkLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#DDDDDD"
];
self
.
creditView
.
width
=
self
.
remarkLabel
.
right
+
7
;
self
.
creditView
.
x
=
self
.
width
-
self
.
creditView
.
width
-
7
;
[
self
.
creditLabel
fusrtl_resetFrameToFitRTL
];
[
self
.
remarkLabel
fusrtl_resetFrameToFitRTL
];
}
[
self
.
creditView
fusrtl_resetFrameToFitRTL
];
}
-
(
void
)
fus_setStarCountWithMark
:
(
CGFloat
)
mark
{
if
(
mark
>
0
.
0
)
{
self
.
creditLabel
.
hidden
=
NO
;
_starBgView
.
hidden
=
NO
;
_remarkLabel
.
hidden
=
NO
;
}
else
{
self
.
creditLabel
.
hidden
=
YES
;
_starBgView
.
hidden
=
YES
;
_remarkLabel
.
hidden
=
YES
;
return
;
}
//整数
NSInteger
integer
=
floor
(
mark
);
//余数
CGFloat
remainder
=
mark
-
integer
;
if
(
remainder
<
0
.
5
)
{
remainder
=
0
;
}
for
(
int
i
=
0
;
i
<
_starImageViews
.
count
;
i
++
)
{
UIImageView
*
imageView
=
_starImageViews
[
i
];
if
(
i
<
integer
)
{
imageView
.
image
=
[
UIImage
imageNamed
:
@"live_user_video_remark_star_light"
];
}
else
{
imageView
.
image
=
[
UIImage
imageNamed
:
@"live_user_video_remark_star_whole_gray"
];
}
}
if
(
remainder
!=
0
&&
integer
<
_starImageViews
.
count
)
{
UIImageView
*
imageView
=
_starImageViews
[
integer
];
imageView
.
image
=
[[
UIImage
imageNamed
:
@"live_user_video_remark_star_half"
]
fusrtl_imageFlippedForRightToLeftLayoutDirection
];
}
}
#pragma mark - 标签信息相关的逻辑
-
(
void
)
fus_resetTagWithModel
:
(
FUSRoomUserInfoModel
*
)
model
{
for
(
UIView
*
tagView
in
self
.
tagViewList
)
{
...
...
FuSiLive/Resources/LocalizationString/Fusi_Chinese.strings
View file @
c3d07420
...
...
@@ -2192,3 +2192,5 @@
"发送验证码" = "獲取驗證碼";
"私房信用:" = "私房信用:";
FuSiLive/Resources/LocalizationString/Fusi_Chinese_Traditional.strings
View file @
c3d07420
...
...
@@ -2192,3 +2192,4 @@
"发送验证码" = "獲取驗證碼";
"私房信用:" = "私房信用:";
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