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
a1f39fb5
authored
Jul 18, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bugs
parent
3cea9d2e
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
105 additions
and
97 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIButton/UIButton+WebImage.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIImageView/UIImageView+WebImage.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Download/FUSDownloadOperation.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Download/FUSResourceDownloader.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.h
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.m
FuSiLive/Classes/Common/Other/FUSSocialShareHelper.m
FuSiLive/Classes/Common/View/ImageFallDownFromTopView/FUSImageFallDownFromTopView.m
FuSiLive/Classes/Common/View/MediaPreview/FUSBaseMediaPreview.m
FuSiLive/Classes/GiftDataCenter/FUSGiftDataCenter.m
FuSiLive/Classes/InstantMessaging/View/Cell/FUSIMGiftViewCell.m
FuSiLive/Classes/InstantMessaging/View/ToolViews/FUSIMGiftView.m
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSGiftViewCell.m
FuSiLive/Classes/Login/Controller/FUSSetUserInfoViewController.m
FuSiLive/Classes/Login/Controller/FUSStartPageViewController.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatToolGiftTipView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/FUSGiftCenter/FUSGiftAnimation/FUSGiftAnimation.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftCollectionViewCell.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftSendView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftView.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveParcelGiftAndPropsCollectionViewCell.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveParcelGiftCollectionViewCell.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m
FuSiLive/Classes/NewLive/Main/View/FunctionView/PK/View/FUSPkWinningStreakView.swift
FuSiLive/Classes/NewsFeed/RichEditor/Controller/WGBaseRichEditorViewController.m
FuSiLive/Classes/ZhaiXin/Official/Controller/FUSOfficialViewController.m
FuSiLive/Classes/ZhaiXin/Official/Other/FUSOfficialCacheOperate.m
FuSiLive/Classes/Zone/Controller/FireFlyMyZone/FUSZoneTaskCenterViewController.m
FuSiLive/Classes/Zone/View/FireFlyView/View/Cell/MyZoneCell/FUSMyZoneInfoCell.m
FuSiLive/Classes/Zone/View/FireFlyView/View/Cell/MyZoneCell/FUSMyZoneSignTagAddressCell.m
FuSiLive/Classes/Zone/View/FireFlyView/View/FUSPhotoBrowserView.m
FuSiLive/FUSAPPConfigs/FUSFuSiConfigs.m
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIButton/UIButton+WebImage.m
View file @
a1f39fb5
...
...
@@ -31,7 +31,7 @@
if
([
urlString
containsString
:
@"http"
])
{
url
=
[
NSURL
URLWithString
:
urlString
];
}
else
{
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
}
[
self
setImageWithURL
:
url
forState
:
UIControlStateNormal
placeholder
:
placeholder
];
...
...
@@ -54,7 +54,7 @@
if
([
urlString
containsString
:
@"http"
])
{
url
=
[
NSURL
URLWithString
:
urlString
];
}
else
{
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
}
[
self
setImageWithURL
:
url
forState
:
UIControlStateNormal
placeholder
:
placeholder
options
:
kNilOptions
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
...
...
@@ -81,7 +81,7 @@
if
([
urlString
containsString
:
@"http"
])
{
url
=
[
NSURL
URLWithString
:
urlString
];
}
else
{
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
}
[
self
setImageWithURL
:
url
forState
:
state
placeholder
:
placeholder
];
...
...
@@ -115,7 +115,7 @@
if
([
urlString
containsString
:
@"http"
])
{
url
=
[
NSURL
URLWithString
:
urlString
];
}
else
{
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
url
=
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
}
[
self
setBackgroundImageWithURL
:
url
forState
:
state
placeholder
:
placeholder
];
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIImageView/UIImageView+WebImage.m
View file @
a1f39fb5
...
...
@@ -44,7 +44,7 @@ static dispatch_queue_t get_image_clip_queue(){
}
if
(
!
[
urlString
containsString
:
@"http"
])
{
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
];
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
];
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:
urlString
]
placeholder
:
placeholder
options
:
nil
completion
:
nil
];
...
...
@@ -79,7 +79,7 @@ static dispatch_queue_t get_image_clip_queue(){
}
if
(
!
[
urlString
containsString
:
@"http"
])
{
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
];
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
];
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:
urlString
]
placeholder
:
placeholder
options
:
nil
completion
:
completion
];
...
...
@@ -104,7 +104,7 @@ static dispatch_queue_t get_image_clip_queue(){
}
if
(
!
[
urlString
containsString
:
@"http"
])
{
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
];
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
];
}
[
self
cancelCurrentImageRequest
];
...
...
@@ -138,7 +138,7 @@ static dispatch_queue_t get_image_clip_queue(){
}
[
self
cancelCurrentImageRequest
];
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]]
placeholder
:
placeholder
options
:
nil
completion
:
completion
];
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]]
placeholder
:
placeholder
options
:
nil
completion
:
completion
];
}
...
...
@@ -167,7 +167,7 @@ static dispatch_queue_t get_image_clip_queue(){
if
(
!
[
urlString
containsString
:
@"http"
])
{
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
];
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
];
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:
urlString
]
placeholder
:
placeholder
options
:
nil
completion
:
nil
];
...
...
@@ -196,7 +196,7 @@ static dispatch_queue_t get_image_clip_queue(){
return
;
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]]
placeholder
:
placeholder
options
:
options
completion
:
nil
];
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]]
placeholder
:
placeholder
options
:
options
completion
:
nil
];
}
-
(
void
)
setWebImageWithSubURLString
:(
NSString
*
)
urlString
placeholder
:(
UIImage
*
)
placeholder
completion
:(
YYWebImageCompletionBlock
)
completion
...
...
@@ -228,7 +228,7 @@ static dispatch_queue_t get_image_clip_queue(){
}
if
(
!
[
urlString
containsString
:
@"http"
])
{
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
];
urlString
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
];
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:
urlString
]
placeholder
:
placeholder
options
:
nil
completion
:
completion
];
...
...
@@ -238,7 +238,7 @@ static dispatch_queue_t get_image_clip_queue(){
-
(
void
)
setBluredWebImageSubURLString
:(
NSString
*
)
urlString
placeholder
:(
UIImage
*
)
placeholder
{
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]]
placeholder
:
placeholder
options
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]]
placeholder
:
placeholder
options
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
if
([
urlString
containsString
:
@"boy"
]
||
[
urlString
containsString
:
@"girl"
])
{
image
=
UIImage
.
fus_defaultIcon
;
...
...
@@ -274,7 +274,7 @@ static dispatch_queue_t get_image_clip_queue(){
return
;
}
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]]
placeholder
:
nil
options
:
nil
completion
:
completion
];
[
self
setImageWithURL
:[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]]
placeholder
:
nil
options
:
nil
completion
:
completion
];
}
// 有占位图的聊天图片下载
...
...
@@ -296,7 +296,7 @@ static dispatch_queue_t get_image_clip_queue(){
//下载有圆角的图片
-
(
void
)
setRadiusImageWithURL
:(
NSString
*
)
urlString
sizeToFit
:(
CGSize
)
size
cornerRadius
:(
CGFloat
)
radius
placeholderImage
:(
UIImage
*
)
placeholder
{
NSURL
*
url
=
[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
NSURL
*
url
=
[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
//这里默认是把图片剪成一个圆
if
(
radius
==
CGFLOAT_MIN
)
{
...
...
@@ -361,7 +361,7 @@ static dispatch_queue_t get_image_clip_queue(){
//设置带边色的圆角图片
-
(
void
)
setRadiusImageWithURL
:(
NSString
*
)
urlstring
sizeToFit
:(
CGSize
)
size
cornerRadius
:(
CGFloat
)
radius
color
:(
NSString
*
)
color
borderWidth
:(
CGFloat
)
width
withLevel
:(
NSString
*
)
level
placeholderImage
:(
UIImage
*
)
placeholder
{
NSURL
*
url
=
[
NSString
isNull
:
urlstring
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlstring
]];
NSURL
*
url
=
[
NSString
isNull
:
urlstring
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlstring
]];
if
([
NSString
isNull
:
color
])
{
color
=
@"ffffff"
;
//默认黑色
...
...
@@ -417,7 +417,7 @@ static dispatch_queue_t get_image_clip_queue(){
completion
:(
YYWebImageCompletionBlock
)
completion
{
// 空值判断
NSURL
*
url
=
[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
urlString
]];
NSURL
*
url
=
[
NSString
isNull
:
urlString
]
?
nil
:
[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
urlString
]];
// 如果 url 为空
if
(
!
url
)
{
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Download/FUSDownloadOperation.m
View file @
a1f39fb5
...
...
@@ -227,7 +227,7 @@
}];
}
else
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
task
.
downloadUrl
]
options
:
nil
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
task
.
downloadUrl
]
options
:
nil
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
if
(
image
)
{
[
task
fus_executeDownloadSucceedHandlerWithFilePath
:
@""
];
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Download/FUSResourceDownloader.m
View file @
a1f39fb5
...
...
@@ -118,8 +118,8 @@ static dispatch_queue_t get_downloadOperationQueue(){
/// 所以这里记录md5 -> 本地地址的映射,
/// 如果文件md5对应的本地地址存在,那么就直接返回这个资源下载成功
NSString
*
taskKey
=
[
self
fus_taskKeyWithDownloadUrl
:
resource
.
resourceUrl
md5
:
resource
.
md5
];
NSString
*
filePath
=
self
.
md5ToLocalPathDict
[
taskKey
];
if
(
!
[
NSString
isNull
:
filePath
])
{
if
(
!
[
NSString
isNull
:
self
.
md5ToLocalPathDict
[
taskKey
]])
{
NSString
*
filePath
=
[
NSString
stringWithFormat
:
@"%@%@"
,
FUSConfig
.
sharedInstanced
.
pathConfigs
.
downloadPathDocument
,
self
.
md5ToLocalPathDict
[
taskKey
]];
/// 如果当前的资源已经有了本地文件了,那么直接返回下载成功
if
(
resource
.
succeedHandler
)
{
resource
.
succeedHandler
(
filePath
);
...
...
@@ -166,7 +166,14 @@ static dispatch_queue_t get_downloadOperationQueue(){
[
self
fus_addDataLock
];
NSString
*
taskKey
=
[
self
fus_taskKeyWithDownloadUrl
:
task
.
downloadUrl
md5
:
task
.
downloadMd5
];
[
self
.
taskDict
removeObjectForKey
:
taskKey
];
self
.
md5ToLocalPathDict
[
taskKey
]
=
filePath
;
NSString
*
documentPath
=
FUSConfig
.
sharedInstanced
.
pathConfigs
.
downloadPathDocument
;
NSString
*
relativePath
=
filePath
;
if
(
filePath
.
length
>
documentPath
.
length
)
{
relativePath
=
[
filePath
substringWithRange
:
NSMakeRange
(
documentPath
.
length
,
filePath
.
length
-
documentPath
.
length
)];
}
self
.
md5ToLocalPathDict
[
taskKey
]
=
relativePath
;
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
self
.
md5ToLocalPathDict
forKey
:
FUSDownloadMd5ToLocalPathDictUDKey
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
[
self
fus_removeDataLock
];
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.h
View file @
a1f39fb5
...
...
@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 在线视频缓存地址
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
onlineStreamVideoCachePath
;
-
(
NSString
*
)
download
Path
:(
NSString
*
)
url
;
-
(
NSString
*
)
webImage
Path
:(
NSString
*
)
url
;
-
(
NSString
*
)
bigDownloadPath
:(
NSString
*
)
url
;
/// 图片的下载地址
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.m
View file @
a1f39fb5
...
...
@@ -25,7 +25,7 @@
return
@""
;
}
-
(
NSString
*
)
download
Path
:
(
NSString
*
)
url
{
-
(
NSString
*
)
webImage
Path
:
(
NSString
*
)
url
{
return
@""
;
}
...
...
FuSiLive/Classes/Common/Other/FUSSocialShareHelper.m
View file @
a1f39fb5
...
...
@@ -69,7 +69,7 @@
if
(
from
==
FUSFromTopic
||
[(
NSString
*
)
imageOrUrl
containsString
:
@"https://"
]
||
[(
NSString
*
)
imageOrUrl
containsString
:
@"http://"
])
{
downloadUrl
=
imageOrUrl
;
}
else
{
downloadUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imageOrUrl
];
downloadUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imageOrUrl
];
}
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:
downloadUrl
]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
...
...
@@ -175,7 +175,7 @@
NSString
*
title
;
NSString
*
content
;
NSString
*
url
;
NSString
*
imgKey
=
[
NSString
isNull
:
faceImgStr
]
?
@""
:
[[
YYWebImageManager
sharedManager
]
cacheKeyForURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
faceImgStr
]]];
NSString
*
imgKey
=
[
NSString
isNull
:
faceImgStr
]
?
@""
:
[[
YYWebImageManager
sharedManager
]
cacheKeyForURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
faceImgStr
]]];
__block
UIImage
*
faceImg
;
if
(
isPusher
)
{
...
...
@@ -194,7 +194,7 @@
// 图片为空
faceImg
=
[
UIImage
imageNamed
:
@"FUSShareImage"
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
faceImgStr
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
faceImgStr
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
faceImg
=
image
?
image
:
[
UIImage
imageNamed
:
@"FUSShareImage"
];
...
...
@@ -218,7 +218,7 @@
if
(
!
faceImg
)
{
// 图片为空
faceImg
=
[
UIImage
imageNamed
:
@"FUSShareImage"
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
faceImg
=
image
?
image
:
[
UIImage
imageNamed
:
@"FUSShareImage"
];
...
...
@@ -245,7 +245,7 @@
if
(
!
faceImg
)
{
// 图片为空
faceImg
=
[
UIImage
imageNamed
:
@"FUSShareImage"
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
faceImg
=
image
?
image
:
[
UIImage
imageNamed
:
@"FUSShareImage"
];
...
...
@@ -265,7 +265,7 @@
if
(
!
faceImg
)
{
// 图片为空
faceImg
=
[
UIImage
imageNamed
:
@"FUSShareImage"
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imgKey
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageUrl
,
YYWebImageFromType
cacheFrom
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
faceImg
=
image
?
image
:
[
UIImage
imageNamed
:
@"FUSShareImage"
];
...
...
FuSiLive/Classes/Common/View/ImageFallDownFromTopView/FUSImageFallDownFromTopView.m
View file @
a1f39fb5
...
...
@@ -61,7 +61,7 @@
NSString
*
path
=
model
.
effectsImage
;
if
(
!
[
path
hasPrefix
:
@"http"
])
{
path
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
path
];
path
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
path
];
}
// 下载到了图片才加入队列中
...
...
FuSiLive/Classes/Common/View/MediaPreview/FUSBaseMediaPreview.m
View file @
a1f39fb5
...
...
@@ -390,7 +390,7 @@
[
self
fus_saveImageToPhotosAlbum
:
cacheImage
];
}
else
{
[
FUSLoadingView
fus_showProgressViewWithMessage
:
@""
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
path
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
resultImg
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
path
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
resultImg
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
FUSLoadingView
fus_dismissProgressView
];
if
(
resultImg
)
{
...
...
FuSiLive/Classes/GiftDataCenter/FUSGiftDataCenter.m
View file @
a1f39fb5
...
...
@@ -1342,7 +1342,7 @@ NSString * const kMD5GiftResourceKey = @"kMD5GiftResourceKey";
-
(
void
)
checkImageCacheWithImageUrl
:
(
NSString
*
)
imageUrl
{
// 检测本地是否有缓存
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imageUrl
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:
nil
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imageUrl
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:
nil
];
}
...
...
FuSiLive/Classes/InstantMessaging/View/Cell/FUSIMGiftViewCell.m
View file @
a1f39fb5
...
...
@@ -70,7 +70,7 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
giftImageView
.
image
=
[
UIImage
imageNamed
:
@"icon_gift_placehold"
];
[
self
.
giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_currentModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
self
.
giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_currentModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
self
.
giftImageView
.
image
=
nil
;
...
...
@@ -79,7 +79,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
currentModel
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
currentModel
.
resource
]])
{
// weakSelf.giftImageView.image = [UIImage imageNamed:@"icon_gift_placehold"];
return
;
}
...
...
@@ -169,7 +169,7 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
giftImageView
.
image
=
[
UIImage
imageNamed
:
@"icon_gift_placehold"
];
[
self
.
giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_currentVideoChatModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
self
.
giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_currentVideoChatModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
weakSelf
.
giftImageView
.
image
=
nil
;
...
...
@@ -178,7 +178,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
currentVideoChatModel
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
currentVideoChatModel
.
resource
]])
{
return
;
}
...
...
FuSiLive/Classes/InstantMessaging/View/ToolViews/FUSIMGiftView.m
View file @
a1f39fb5
...
...
@@ -429,7 +429,7 @@
break
;
}
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
giftModel
.
resource
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
result
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
giftModel
.
resource
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
result
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
if
(
result
)
{
[
self
.
cellImageDict
setObject
:
result
forKey
:
giftModel
.
gid
];
...
...
FuSiLive/Classes/InstantMessaging/View/ToolViews/VideoChat/FunctionViews/FUSGiftViewCell.m
View file @
a1f39fb5
...
...
@@ -77,7 +77,7 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
self
.
giftImageView
.
image
=
[
UIImage
imageNamed
:
@"icon_gift_placehold"
];
[
self
.
giftImageView
setWebImageWithSubURLString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_currentModel
.
resource
]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
self
.
giftImageView
setWebImageWithSubURLString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_currentModel
.
resource
]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
weakSelf
.
giftImageView
.
image
=
nil
;
...
...
@@ -86,7 +86,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
currentModel
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
currentModel
.
resource
]])
{
return
;
}
...
...
FuSiLive/Classes/Login/Controller/FUSSetUserInfoViewController.m
View file @
a1f39fb5
...
...
@@ -340,7 +340,7 @@
-
(
void
)
fus_setUserImageViewWithUrlStr
:
(
NSString
*
)
facePath
{
if
(
!
[
facePath
containsString
:
@"http"
]
&&
!
[
facePath
containsString
:
@"https"
])
{
facePath
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
facePath
];
facePath
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
facePath
];
}
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:
facePath
]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
...
...
FuSiLive/Classes/Login/Controller/FUSStartPageViewController.m
View file @
a1f39fb5
...
...
@@ -379,7 +379,7 @@
_waitTime
=
0
;
}
else
{
UIImage
*
splashImage
=
[[
YYWebImageManager
sharedManager
].
cache
getImageForKey
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
splashUrl
]];
UIImage
*
splashImage
=
[[
YYWebImageManager
sharedManager
].
cache
getImageForKey
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
splashUrl
]];
if
(
splashImage
)
{
_waitTime
=
BG_VIEW_STAYDURATION
;
[
self
.
startSplashView
fus_setImage
:
splashImage
];
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatToolGiftTipView.m
View file @
a1f39fb5
...
...
@@ -195,7 +195,7 @@
self
.
giftModel
=
giftModel
;
self
.
giftNum
=
giftNum
;
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
giftModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:
nil
];
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
giftModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:
nil
];
_giftNumLabel
.
text
=
[
NSString
stringWithFormat
:
@"x%ld"
,
giftNum
];
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/FUSGiftCenter/FUSGiftAnimation/FUSGiftAnimation.m
View file @
a1f39fb5
...
...
@@ -514,38 +514,38 @@
NSString
*
nameStr
=
model
.
fromuser
.
nickname
;
NSMutableAttributedString
*
senderAttr
=
[
NSMutableAttributedString
fus_createAttributedLabelStringForString
:[
NSString
stringWithFormat
:
@"%@"
,
nameStr
]
withTextColor
:[
UIColor
colorWithHex
:
colorStr
]
font
:
[
UIFont
fus_themeFont
:
13
]
needShadow
:
NO
maxWidth
:
120
];
if
([
model
.
fromuser
.
privilege
[
@"richPower"
]
integerValue
]
==
1
||
model
.
fromuser
.
isHide
.
boolValue
)
{
// 3.0.5 添加昵称颜色
// [senderAttr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:levelModel.color] range:NSMakeRange(0, senderAttr.length)];
// if ([model.fromuser.privilege[@"richPower"] integerValue] == 1 || model.fromuser.isHide.boolValue) {
//
// _faceImageView.layer.borderColor = [[UIColor colorWithHex:levelModel.color] CGColor];
UIImage
*
levelImage
=
[
UIImage
fus_imageWithLevel
:
model
.
level
.
integerValue
];
if
(
levelImage
)
{
CGFloat
imageH
=
14
;
CGFloat
imageW
=
imageH
/
levelImage
.
size
.
height
*
levelImage
.
size
.
width
;
NSAttributedString
*
levelAttr
=
[
NSAttributedString
attachmentStringWithContent
:
levelImage
contentMode
:
UIViewContentModeScaleAspectFit
attachmentSize
:
CGSizeMake
(
imageW
,
imageH
)
alignToFont
:
[
UIFont
fus_themeFont
:
13
]
alignment
:
YYTextVerticalAlignmentCenter
];
[
senderAttr
appendAttributedString
:
levelAttr
];
}
// CGFloat imageH = 15;
// CGFloat imageW = 35;
// if (model.fromuser.isHide.boolValue) {
// imageH = 27*0.8;
// imageW = 45*0.8;
// }
// // 3.0.5 添加昵称颜色
//// [senderAttr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:levelModel.color] range:NSMakeRange(0, senderAttr.length)];
////
//// _faceImageView.layer.borderColor = [[UIColor colorWithHex:levelModel.color] CGColor];
//
//
// 有等级
//
UIImageView *downloadView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, imageW, imageH)];
//
downloadView.contentMode = UIViewContentModeScaleAspectFit
;
//
// 创建 attachment
//
NSAttributedString *levelAttr = [NSAttributedString attachmentStringWithContent:downloadView
contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageW, imageH) alignToFont:[UIFont fus_themeFont:13] alignment:YYTextVerticalAlignmentCenter];
//
UIImage *levelImage = [UIImage fus_imageWithLevel:model.level.integerValue];
//
if (levelImage) {
//
CGFloat imageH = 14
;
//
CGFloat imageW = imageH / levelImage.size.height * levelImage.size.width;
//
NSAttributedString *levelAttr = [NSAttributedString attachmentStringWithContent:levelImage
contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageW, imageH) alignToFont:[UIFont fus_themeFont:13] alignment:YYTextVerticalAlignmentCenter];
//
// [senderAttr insertAttributedString:levelAttr atIndex:0];
// [downloadView setWebImageWithSubURLString:levelModel.icon placeholder:[UIImage imageNamed:[NSString stringWithFormat:@"rich_icon_level_%@", model.level]] completion:nil];
}
// [senderAttr appendAttributedString:levelAttr];
// }
//
//// CGFloat imageH = 15;
//// CGFloat imageW = 35;
//// if (model.fromuser.isHide.boolValue) {
//// imageH = 27*0.8;
//// imageW = 45*0.8;
//// }
////
//// // 有等级
//// UIImageView *downloadView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, imageW, imageH)];
//// downloadView.contentMode = UIViewContentModeScaleAspectFit;
//// // 创建 attachment
//// NSAttributedString *levelAttr = [NSAttributedString attachmentStringWithContent:downloadView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imageW, imageH) alignToFont:[UIFont fus_themeFont:13] alignment:YYTextVerticalAlignmentCenter];
////
//// [senderAttr insertAttributedString:levelAttr atIndex:0];
//// [downloadView setWebImageWithSubURLString:levelModel.icon placeholder:[UIImage imageNamed:[NSString stringWithFormat:@"rich_icon_level_%@", model.level]] completion:nil];
// }
if
(
FUSRTL
.
isRTL
)
{
senderAttr
.
alignment
=
NSTextAlignmentRight
;
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftCollectionViewCell.m
View file @
a1f39fb5
...
...
@@ -249,7 +249,7 @@
_giftModel
=
model
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
model
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
model
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
weakSelf
.
giftImageView
.
image
=
nil
;
...
...
@@ -258,7 +258,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
giftModel
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
giftModel
.
resource
]])
{
return
;
}
...
...
@@ -341,7 +341,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
giftModel
.
subimg
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
giftModel
.
subimg
]])
{
return
;
}
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftSendView.m
View file @
a1f39fb5
...
...
@@ -137,7 +137,7 @@
if
([
_backgroundImgName
isEqualToString
:
@"live_chat_gift_send_bg_normal"
])
{
_bgImageView
.
image
=
[
UIImage
imageNamed
:
_backgroundImgName
];
}
else
{
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
}
[
self
addSubview
:
_bgImageView
];
}
...
...
@@ -279,7 +279,7 @@
*/
-
(
void
)
fus_setBackgroundImage
:
(
NSString
*
)
backfroudImgName
{
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
backfroudImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
backfroudImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
}
#pragma mark - View Delegate
...
...
@@ -296,7 +296,7 @@
_bgImageView
.
image
=
[
UIImage
imageNamed
:
_backgroundImgName
];
}
else
{
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
}
...
...
@@ -330,7 +330,7 @@
_bgImageView
.
image
=
[
UIImage
imageNamed
:
_backgroundImgName
];
}
else
{
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
}
}
...
...
@@ -339,7 +339,7 @@
if
([
_backgroundImgName
isEqualToString
:
@"live_chat_gift_send_bg_normal"
])
{
_bgImageView
.
image
=
[
UIImage
imageNamed
:
_backgroundImgName
];
}
else
{
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
[
self
.
bgImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_backgroundImgName
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]];
}
}
-
(
void
)
setBackgroundImgName
:
(
NSString
*
)
backgroundImgName
{
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveGiftView.m
View file @
a1f39fb5
...
...
@@ -2342,7 +2342,7 @@ static FUSLiveGiftView *giftView = nil;
NSString
*
imageUrl
=
dataDict
[
@"imageUrl"
];
// 校验图片是否已经下载
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
imageUrl
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:
nil
];
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
imageUrl
]]
options
:
0
progress
:
nil
transform
:
nil
completion
:
nil
];
[
weakSelf
initFirstChargeBtn
];
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveParcelGiftAndPropsCollectionViewCell.m
View file @
a1f39fb5
...
...
@@ -87,7 +87,7 @@
/// @param selected 是否选中
-
(
void
)
fus_setupCellWithParcelGiftModel
:
(
FUSLiveParcelGiftModel
*
)
model
selected
:
(
BOOL
)
selected
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_itemImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
model
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
_itemImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
model
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
weakSelf
.
itemImageView
.
image
=
nil
;
...
...
@@ -100,7 +100,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
model
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
model
.
resource
]])
{
return
;
}
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/GiftView/FUSLiveParcelGiftCollectionViewCell.m
View file @
a1f39fb5
...
...
@@ -182,7 +182,7 @@
return
;
}
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
parcelGiftModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
_giftImageView
setImageWithURL
:[
NSURL
URLWithString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
parcelGiftModel
.
resource
]]
placeholder
:[
UIImage
imageNamed
:
@"icon_gift_placehold"
]
options
:
0
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
imageURL
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
// FUSLogVerbose(@"Gift Name:%@ URL:%@", model.name, imageURL.absoluteString);
...
...
@@ -197,7 +197,7 @@
return
;
}
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
weakSelf
.
parcelGiftModel
.
resource
]])
{
if
(
!
[
imageURL
.
absoluteString
isEqualToString
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
weakSelf
.
parcelGiftModel
.
resource
]])
{
return
;
}
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/LinkMicro/Other/FUSAgoraHelper.m
View file @
a1f39fb5
...
...
@@ -807,9 +807,9 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
if
(
speaker
.
volume
>
50
)
{
[
speakArr
addObject
:[
NSString
stringWithFormat
:
@"%ld"
,
speaker
.
uid
]];
}
//
if (ENABLE_TEST_VIEW) {
//
FUSLogInfo(@"=======>Agora speaker:%ld volume:%ld", speaker.uid, speaker.volume);
//
}
if
(
ENABLE_TEST_VIEW
)
{
FUSLogInfo
(
@"=======>Agora speaker:%ld volume:%ld"
,
speaker
.
uid
,
speaker
.
volume
);
}
}
// FUSLogInfo(@"\n");
...
...
@@ -943,7 +943,7 @@ NSString * const kLiveLinkMicRoleDidChanged = @"linkMicRoleChange";
-
(
void
)
rtcEngine
:
(
AgoraRtcEngineKit
*
_Nonnull
)
engine
didJoinChannel
:
(
NSString
*
_Nonnull
)
channel
withUid
:
(
NSUInteger
)
uid
elapsed
:
(
NSInteger
)
elapsed
{
FUSLogVerbose
(
@"%s"
,
__func__
);
[
self
switchLocalMic
:
YES
];
[
engine
enableAudio
];
}
...
...
FuSiLive/Classes/NewLive/Main/View/FunctionView/PK/View/FUSPkWinningStreakView.swift
View file @
a1f39fb5
...
...
@@ -71,6 +71,7 @@ class FUSPkWinningStreakView: UIView {
super
.
layoutSubviews
()
// self.bgImageView.frame = self.bounds
self
.
bgImageView
.
size
=
CGSizeMake
(
64
,
56
)
self
.
bgImageView
.
center
=
CGPointMake
(
self
.
width
/
2.0
,
self
.
height
/
2.0
-
2
)
self
.
xImageView
.
x
=
12.5
self
.
xImageView
.
bottom
=
self
.
height
-
15
...
...
FuSiLive/Classes/NewsFeed/RichEditor/Controller/WGBaseRichEditorViewController.m
View file @
a1f39fb5
...
...
@@ -602,7 +602,7 @@ WKScriptMessageHandler
//上传成功
fileM
.
state
=
WGUploadFileStateSuccess
;
// NSString *testUrl = @"https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=210671490,1554278141&fm=173&app=25&f=JPEG?w=638&h=445&s=9C366790E4892B4F26293C810300A088";
[
weakSelf
successWithKey
:
fileM
.
key
url
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
obj
]];
[
weakSelf
successWithKey
:
fileM
.
key
url
:[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
obj
]];
}
else
{
//上传失败
fileM
.
state
=
WGUploadFileStateError
;
...
...
@@ -1029,7 +1029,7 @@ WKScriptMessageHandler
// 上传成功
fileM
.
state
=
WGUploadFileStateSuccess
;
fileM
.
uploadUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
obj
];
fileM
.
uploadUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
obj
];
[
weakSelf
.
imageDict
setValue
:
fileM
forKey
:
fileM
.
localUrl
];
// [weakSelf successWithKey:fileM.key url:testUrl];
}
else
{
...
...
FuSiLive/Classes/ZhaiXin/Official/Controller/FUSOfficialViewController.m
View file @
a1f39fb5
...
...
@@ -344,7 +344,7 @@
if
([
iconString
hasPrefix
:
@"http"
]
||
[
iconString
hasPrefix
:
@"https"
])
{
dealUrlStr
=
iconString
;
}
else
{
dealUrlStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
iconString
];
dealUrlStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
iconString
];
}
// 图标此时已经下载好了 直接用SDWebImage去取
NSString
*
imageKey
=
[[
YYWebImageManager
sharedManager
]
cacheKeyForURL
:[
NSURL
URLWithString
:
dealUrlStr
]];
...
...
FuSiLive/Classes/ZhaiXin/Official/Other/FUSOfficialCacheOperate.m
View file @
a1f39fb5
...
...
@@ -63,7 +63,7 @@
if
([
iconString
hasPrefix
:
@"http"
]
||
[
iconString
hasPrefix
:
@"https"
])
{
dealUrlStr
=
iconString
;
}
else
{
dealUrlStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
iconString
];
dealUrlStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
iconString
];
}
// 提前下好小图标
[[
YYWebImageManager
sharedManager
]
requestImageWithURL
:[
NSURL
URLWithString
:
dealUrlStr
]
options
:
0
progress
:
nil
transform
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
...
...
FuSiLive/Classes/Zone/Controller/FireFlyMyZone/FUSZoneTaskCenterViewController.m
View file @
a1f39fb5
...
...
@@ -497,7 +497,7 @@ static NSString *const reuseIdentifyCell = @"cell";
[
FUSZoneHttpRequest
fus_taskGetDataTid
:
tid
Success
:
^
(
NSDictionary
*
dataDic
)
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
.
view
addSubview
:
self
.
shareView
];
NSString
*
imgStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
dataDic
[
@"shareConfig"
][
@"img"
]];
NSString
*
imgStr
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
dataDic
[
@"shareConfig"
][
@"img"
]];
[
self
.
shareView
fus_showShareViewWithViewController
:
self
title
:
dataDic
[
@"shareConfig"
][
@"title"
]
content
:
dataDic
[
@"shareConfig"
][
@"content"
]
imageOrUrl
:
[
imgStr
stringByReplacingOccurrencesOfString
:
@"/com"
withString
:
@""
]
shareUrl
:
DNS_WEB
(
dataDic
[
@"shareConfig"
][
@"href"
])
from
:
FUSFromMission
shareType
:
FUSShareTypeWebUrl
success
:^
{
}
failure
:
nil
];
...
...
FuSiLive/Classes/Zone/View/FireFlyView/View/Cell/MyZoneCell/FUSMyZoneInfoCell.m
View file @
a1f39fb5
...
...
@@ -226,7 +226,7 @@
if
(
_audioPlayer
.
fus_isPlaying
)
{
[
_audioPlayer
fus_seekToTime
:
kCMTimeZero
];
}
else
{
NSString
*
playUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
self
.
zoneModel
.
voiceChat
[
@"url"
]];
NSString
*
playUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
self
.
zoneModel
.
voiceChat
[
@"url"
]];
AVPlayerItem
*
playItem
=
[
AVPlayerItem
playerItemWithURL
:[
NSURL
URLWithString
:
playUrl
]];
[
_audioPlayer
fus_playVideoWithPlayItem
:
playItem
];
}
...
...
FuSiLive/Classes/Zone/View/FireFlyView/View/Cell/MyZoneCell/FUSMyZoneSignTagAddressCell.m
View file @
a1f39fb5
...
...
@@ -138,7 +138,7 @@
if
(
_audioPlayer
.
fus_isPlaying
)
{
[
_audioPlayer
fus_seekToTime
:
kCMTimeZero
];
}
else
{
NSString
*
playUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
self
.
zoneModel
.
voiceChat
[
@"url"
]];
NSString
*
playUrl
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
self
.
zoneModel
.
voiceChat
[
@"url"
]];
AVPlayerItem
*
playItem
=
[
AVPlayerItem
playerItemWithURL
:[
NSURL
URLWithString
:
playUrl
]];
[
_audioPlayer
fus_playVideoWithPlayItem
:
playItem
];
}
...
...
FuSiLive/Classes/Zone/View/FireFlyView/View/FUSPhotoBrowserView.m
View file @
a1f39fb5
...
...
@@ -138,7 +138,7 @@
if
([
_dataSource
.
firstObject
isKindOfClass
:[
UIImage
class
]])
{
cell
.
imageView
.
image
=
_dataSource
[
indexPath
.
row
];
}
else
{
NSString
*
path
=
[
NSString
isNull
:
_dataSource
[
indexPath
.
row
]]
?
nil
:
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
_dataSource
[
indexPath
.
row
]];
NSString
*
path
=
[
NSString
isNull
:
_dataSource
[
indexPath
.
row
]]
?
nil
:
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
_dataSource
[
indexPath
.
row
]];
[
cell
.
imageView
setWebImageWithSubURLString
:
path
placeholder
:[
UIImage
imageNamed
:
@"fireFly_zone_empty_photos"
]
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
...
...
FuSiLive/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
a1f39fb5
...
...
@@ -207,7 +207,7 @@
}
-
(
NSString
*
)
download
Path
:
(
NSString
*
)
url
{
-
(
NSString
*
)
webImage
Path
:
(
NSString
*
)
url
{
return
[
NSString
stringWithFormat
:
@"%@%@"
,
self
.
imageDownUrl
,
url
];
}
...
...
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
View file @
a1f39fb5
...
...
@@ -502,7 +502,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
NSString
*
url
=
nil
;
FUSMotorDataModel
*
motorModel
=
(
FUSMotorDataModel
*
)([
FUSGiftDataCenter
sharedCenter
].
motorGiftDict
[
mid
]);
if
(
!
[
NSString
isNull
:
motorModel
.
darkRes
])
{
url
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
download
Path
:
motorModel
.
darkRes
];
url
=
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webImage
Path
:
motorModel
.
darkRes
];
}
else
if
(
!
[
NSString
isNull
:
dataDict
[
@"url"
]])
{
url
=
dataDict
[
@"url"
];
}
else
{
...
...
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