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
76827dc4
authored
Jul 01, 2024
by
ludi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成新注册推荐,首页tag动画标识,接入客服,正在做原生客服兼容
parent
8ac63cb6
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
434 additions
and
60 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIImageView/UIImageView+WebImage.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/AlertView/FUSAlertView.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/BaseVC/FUSBaseViewController.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/EmptyView/FUSEmptyView.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
FuSiLive.xcodeproj/project.pbxproj
FuSiLive/Classes/BaoFang/Main/View/Other/FUSBaoFangTagView.h
FuSiLive/Classes/BaoFang/Main/View/Other/FUSBaoFangTagView.m
FuSiLive/Classes/Foundation/DataStores/FUSUserDefaultsStore.h
FuSiLive/Classes/FusiVersionFeature/Others/FUSControllerPushHelper.h
FuSiLive/Classes/FusiVersionFeature/Others/FUSControllerPushHelper.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/FUSHomePageViewController.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeNaviView.h
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeNaviView.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomePageBaseView.h
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeView.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/ViewModel/FUSHomeViewViewModel.h
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/ViewModel/FUSHomeViewViewModel.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/cell/FUSHomeAnchorCollectionViewSmallCell.m
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/cell/FUSHomeAnchorListSmallCell.m
FuSiLive/Classes/FusiVersionFeature/ViewController/NovaList/FUSHomeNovaListViewController.m
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHelper.m
FuSiLive/Classes/NewsFeed/RichEditor/Controller/FUSPublishNewsFeedViewController.m
FuSiLive/Classes/NewsFeed/RichEditor/Controller/WGBaseRichEditorViewController.m
FuSiLive/Classes/NewsFeed/RichEditor/TZImagePickerController/TZPhotoPickerController.m
FuSiLive/Classes/Search/Controller/FUSSearchViewController.swift
FuSiLive/Classes/SingleChat/Main/View/FUSChatTextInputView/FUSChatTextView.m
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/UIImageView/UIImageView+WebImage.m
View file @
76827dc4
...
...
@@ -60,9 +60,9 @@ static dispatch_queue_t get_image_clip_queue(){
if
([
urlString
containsString
:
@"boy"
]
||
[
urlString
containsString
:
@"girl"
])
{
[
self
cancelCurrentImageRequest
];
self
.
image
=
[
UIImage
fus_
ImageNamed
:
@"icon_baofang_cover_boy"
];
self
.
image
=
[
UIImage
fus_
defaultIcon
];
if
(
completion
)
{
completion
([
UIImage
fus_
ImageNamed
:
@"icon_baofang_cover_boy"
],
completion
([
UIImage
fus_
defaultIcon
],
[
NSURL
URLWithString
:
urlString
],
YYWebImageFromMemoryCacheFast
,
YYWebImageStageFinished
,
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/AlertView/FUSAlertView.m
View file @
76827dc4
...
...
@@ -204,6 +204,7 @@ static FUSAlertView *sharedAlertView = nil;
// [self.bgView addSubview:separatorView];
// [self.separatorArr addObject:separatorView];
self
.
cancelBtn
.
hidden
=
NO
;
// 只显示一行的情况
CGFloat
btnWholeH
=
BTN_HEIGHT
;
if
((
self
.
confirmBtnArr
.
count
==
1
||
([
NSString
isNull
:
self
.
cancelBtn
.
titleLabel
.
text
]
&&
self
.
confirmBtnArr
.
count
==
2
))
...
...
@@ -211,6 +212,8 @@ static FUSAlertView *sharedAlertView = nil;
if
(
!
[
NSString
isNull
:
self
.
cancelBtn
.
titleLabel
.
text
])
{
[
self
.
confirmBtnArr
insertObject
:
self
.
cancelBtn
atIndex
:
0
];
}
else
{
self
.
cancelBtn
.
hidden
=
YES
;
}
CGFloat
btnWholeW
=
alertViewW
-
btnX
*
2
-
itemSpace
*
(
self
.
confirmBtnArr
.
count
-
1
);
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/BaseVC/FUSBaseViewController.m
View file @
76827dc4
...
...
@@ -104,6 +104,7 @@
// 设置默认视图底色
self
.
view
.
backgroundColor
=
UIColor
.
fus_appBGColor
;
self
.
backBtnStyle
=
FUSNavigationBackBtnStyleBlack
;
_animated
=
YES
;
// 初始化导航栏
[
self
initBaseNavigation
];
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/EmptyView/FUSEmptyView.m
View file @
76827dc4
...
...
@@ -57,11 +57,11 @@
_emptyContentBgView
=
[[
UIView
alloc
]
init
];
_emptyButton
=
[[
FUSStyleButton
alloc
]
init
];
_emptyButton
.
style
=
FUSButtonStyleBlue
Border
;
_emptyButton
.
style
=
FUSButtonStyleBlue
;
_emptyButton
.
hidden
=
YES
;
_emptyButton
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
15
];
[
_emptyButton
addTarget
:
self
action
:
@selector
(
onClickEmptyButton
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_emptyButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
[
_emptyButton
setTitleColor
:[
UIColor
fus_textColorRich
]
forState
:
UIControlStateNormal
];
_emptyTitleLabel
=
[[
YYLabel
alloc
]
init
];
_emptyTitleLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#B3B3B3"
];
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
View file @
76827dc4
...
...
@@ -363,7 +363,9 @@
}
if
(
!
[
_webUrlString
containsString
:
@"appname="
])
{
urlString
=
[
FUSHttpManager
fus_getHttUrl
:
urlString
params
:@{
@"appname"
:
NSBundle
.
mainBundle
.
bundleIdentifier
}];
// urlString = [FUSHttpManager fus_getHttUrl:urlString params:@{@"appname":NSBundle.mainBundle.bundleIdentifier}];
//TODO: 暂时先改成这个,正式服使用上面那个
urlString
=
@"com.fusi.live.ios"
;
}
// 增加安全区高度数据注入
urlString
=
[
FUSHttpManager
fus_getHttUrl
:
urlString
params
:@{
@"safeAreaTop"
:
@
((
NSInteger
)((
UIView
.
fus_SafeTop
/
UIView
.
fus_screenH
)
*
100
))}];
...
...
FuSiLive.xcodeproj/project.pbxproj
View file @
76827dc4
...
...
@@ -51,6 +51,7 @@
00A44A5D2C2BC14E003FDF44
/* FUSSingleLiveRecordV2TableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00A44A5C2C2BC14E003FDF44
/* FUSSingleLiveRecordV2TableViewCell.m */
;
};
00A44A602C2C04FC003FDF44
/* FUSChatIntimacyV2View.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00A44A5F2C2C04FC003FDF44
/* FUSChatIntimacyV2View.m */
;
};
00A44A632C2C4345003FDF44
/* FUSUserTradeRemindModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00A44A622C2C4345003FDF44
/* FUSUserTradeRemindModel.m */
;
};
00A4529B2C2FEDB2004EC526
/* FUSControllerPushHelper.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00A4529A2C2FEDB2004EC526
/* FUSControllerPushHelper.m */
;
};
00A6F0982C2EAAF700162BA0
/* FUSVideoOfficialEndV2View.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00A6F0972C2EAAF700162BA0
/* FUSVideoOfficialEndV2View.m */
;
};
00B48E072C213CCD001E4872
/* FUSSettingInitDataModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00B48E062C213CCD001E4872
/* FUSSettingInitDataModel.m */
;
};
BE02D73D2C255ECA006FD462
/* FUSLiveFunctionViewHalfWebManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE02D73C2C255ECA006FD462
/* FUSLiveFunctionViewHalfWebManager.swift */
;
};
...
...
@@ -1492,6 +1493,8 @@
00A44A5F2C2C04FC003FDF44
/* FUSChatIntimacyV2View.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSChatIntimacyV2View.m
;
sourceTree
=
"<group>"
;
};
00A44A612C2C4345003FDF44
/* FUSUserTradeRemindModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSUserTradeRemindModel.h
;
sourceTree
=
"<group>"
;
};
00A44A622C2C4345003FDF44
/* FUSUserTradeRemindModel.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSUserTradeRemindModel.m
;
sourceTree
=
"<group>"
;
};
00A452992C2FEDB2004EC526
/* FUSControllerPushHelper.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSControllerPushHelper.h
;
sourceTree
=
"<group>"
;
};
00A4529A2C2FEDB2004EC526
/* FUSControllerPushHelper.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSControllerPushHelper.m
;
sourceTree
=
"<group>"
;
};
00A6F0962C2EAAF700162BA0
/* FUSVideoOfficialEndV2View.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSVideoOfficialEndV2View.h
;
sourceTree
=
"<group>"
;
};
00A6F0972C2EAAF700162BA0
/* FUSVideoOfficialEndV2View.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSVideoOfficialEndV2View.m
;
sourceTree
=
"<group>"
;
};
00B48E052C213CCD001E4872
/* FUSSettingInitDataModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSSettingInitDataModel.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -3736,6 +3739,8 @@
00A2D4512C1AEFBF00A15ECA
/* FUSMultiDelegate.m */
,
00A36A572C1D9FD6004D28FA
/* FUSLeftPopScrollView.h */
,
00A36A582C1D9FD6004D28FA
/* FUSLeftPopScrollView.m */
,
00A452992C2FEDB2004EC526
/* FUSControllerPushHelper.h */
,
00A4529A2C2FEDB2004EC526
/* FUSControllerPushHelper.m */
,
);
path
=
Others
;
sourceTree
=
"<group>"
;
...
...
@@ -9622,6 +9627,7 @@
BE0397C52C134566003EB21B
/* TextCompositionLayer.swift in Sources */
,
BED0FC392C0C49CA0017B285
/* FUSReportOptionModel.m in Sources */
,
BE0397E62C134566003EB21B
/* Repeater.swift in Sources */
,
00A4529B2C2FEDB2004EC526
/* FUSControllerPushHelper.m in Sources */
,
00A2D4A12C1AEFBF00A15ECA
/* FUSHomePageViewController.m in Sources */
,
BED0F9372C0C49C90017B285
/* FUSWebShareView.m in Sources */
,
BE0397C42C134566003EB21B
/* SolidCompositionLayer.swift in Sources */
,
...
...
FuSiLive/Classes/BaoFang/Main/View/Other/FUSBaoFangTagView.h
View file @
76827dc4
...
...
@@ -18,6 +18,10 @@ NS_ASSUME_NONNULL_BEGIN
-
(
void
)
fus_refreshTagImagesWithModel
:(
FUSBaoFangAnchorModel
*
)
model
;
-
(
void
)
fus_startAllTagsAnim
;
-
(
void
)
fus_stopAllTagsAnim
;
@end
NS_ASSUME_NONNULL_END
FuSiLive/Classes/BaoFang/Main/View/Other/FUSBaoFangTagView.m
View file @
76827dc4
...
...
@@ -10,7 +10,7 @@
@interface
FUSBaoFangTagView
()
@property
(
nonatomic
,
strong
)
NSMutableArray
<
UI
ImageView
*>
*
tagImageViews
;
@property
(
nonatomic
,
strong
)
NSMutableArray
<
YYAnimated
ImageView
*>
*
tagImageViews
;
@end
...
...
@@ -66,8 +66,9 @@
for
(
NSInteger
i
=
0
;
i
<
model
.
tag
.
count
;
i
++
)
{
if
(
self
.
tagImageViews
.
count
<
i
+
1
)
{
UIImageView
*
imageView
=
[[
UI
ImageView
alloc
]
init
];
YYAnimatedImageView
*
imageView
=
[[
YYAnimated
ImageView
alloc
]
init
];
imageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
imageView
.
runloopMode
=
NSDefaultRunLoopMode
;
[
self
.
tagImageViews
addObject
:
imageView
];
[
self
addSubview
:
imageView
];
}
...
...
@@ -75,15 +76,39 @@
self
.
tagImageViews
[
i
].
hidden
=
YES
;
__weak
typeof
(
self
)
weakSelf
=
self
;
NSString
*
string
=
model
.
tag
[
i
];
if
(
!
[
NSString
isNull
:
string
])
{
[
self
.
tagImageViews
[
i
]
setWebImageWithSubURLString
:
string
placeholder
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
[
weakSelf
fus_resetFrameWithImage
:
image
tagAtIndex
:
i
];
}];
NSString
*
tagString
=
model
.
tag
[
i
];
if
(
!
[
NSString
isNullWithString
:
tagString
])
{
[
self
.
tagImageViews
[
i
]
setWebImageWithSubURLString
:
tagString
placeholder
:
nil
completion
:^
(
UIImage
*
_Nullable
image
,
NSURL
*
_Nonnull
url
,
YYWebImageFromType
from
,
YYWebImageStage
stage
,
NSError
*
_Nullable
error
)
{
if
([
image
isKindOfClass
:[
YYImage
class
]])
{
((
YYImage
*
)
image
).
preloadAllAnimatedImageFrames
=
YES
;
}
weakSelf
.
tagImageViews
[
i
].
image
=
image
;
[
weakSelf
fus_resetFrameWithImage
:
image
tagAtIndex
:
i
];
}];
}
}
// for (NSInteger i = 0; i < model.tag.count; i++) {
//
// if (self.tagImageViews.count < i + 1) {
// UIImageView *imageView = [[UIImageView alloc] init];
// imageView.contentMode = UIViewContentModeScaleAspectFit;
// [self.tagImageViews addObject:imageView];
// [self addSubview:imageView];
// }
//
// self.tagImageViews[i].hidden = YES;
// __weak typeof(self) weakSelf = self;
//
// NSString *string = model.tag[i];
// if (![NSString isNull:string]) {
// [self.tagImageViews[i] setWebImageWithSubURLString:string
// placeholder:nil
// completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
// [weakSelf fus_resetFrameWithImage:image tagAtIndex:i];
// }];
// }
// }
}
-
(
void
)
fus_resetFrameWithImage
:
(
UIImage
*
)
image
...
...
@@ -121,4 +146,17 @@
self
.
frame
=
selfFrame
;
}
-
(
void
)
fus_startAllTagsAnim
{
for
(
UIImageView
*
imageView
in
self
.
tagImageViews
)
{
[
imageView
startAnimating
];
}
}
-
(
void
)
fus_stopAllTagsAnim
{
for
(
UIImageView
*
imageView
in
self
.
tagImageViews
)
{
[
imageView
stopAnimating
];
}
}
@end
FuSiLive/Classes/Foundation/DataStores/FUSUserDefaultsStore.h
View file @
76827dc4
...
...
@@ -392,6 +392,11 @@
// 珍爱团引导弹窗
#define UDKEY_LIVE_FANS_GROUP_GUIDE_POP_ALERT @"UDKEY_LIVE_FANS_GROUP_GUIDE_POP_ALERT"
// 沙盒-账号相关-用户首次开播弹出协议提示
#define UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL @"UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL"
// 沙盒-账号相关-用户首次发布动态协议提示
#define UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL @"UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL"
#pragma mark - 系统级提示文本配置
// 直播间”撩一下”储值tips
...
...
FuSiLive/Classes/FusiVersionFeature/Others/FUSControllerPushHelper.h
0 → 100644
View file @
76827dc4
//
// FUSControllerPushHelper.h
// FuSiLive
//
// Created by aaa on 2024/6/29.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
FUSControllerPushHelper
:
NSObject
@end
@interface
UINavigationController
(
FUSPushHelper
)
/// 跳转到kf
-
(
void
)
fus_pushToServiceControllerWithAnimate
:(
BOOL
)
animate
;
/// 详细设置跳转到kf
/// - Parameters:
/// - uid: kf的uid
/// - facePath: kf的face
/// - nikename: kf的名字
/// - welcomeStr: 欢迎语句
/// - animate: 动画
-
(
void
)
fus_pushToServiceControllerWithUID
:(
NSString
*
_Nullable
)
uid
face
:(
NSString
*
_Nullable
)
facePath
nikename
:(
NSString
*
_Nullable
)
nikename
welcome
:(
NSString
*
_Nullable
)
welcomeStr
animate
:(
BOOL
)
animate
;
@end
NS_ASSUME_NONNULL_END
FuSiLive/Classes/FusiVersionFeature/Others/FUSControllerPushHelper.m
0 → 100644
View file @
76827dc4
//
// FUSControllerPushHelper.m
// FuSiLive
//
// Created by aaa on 2024/6/29.
//
#import "FUSControllerPushHelper.h"
#import "FUSSingleChatViewController.h"
@implementation
FUSControllerPushHelper
@end
@implementation
UINavigationController
(
FUSPushHelper
)
-
(
void
)
fus_pushToServiceControllerWithAnimate
:(
BOOL
)
animate
{
[
self
fus_pushToServiceControllerWithUID
:
@
(
SERVEICE_UID
).
stringValue
face
:
nil
nikename
:
nil
welcome
:
nil
animate
:
animate
];
}
-
(
void
)
fus_pushToServiceControllerWithUID
:(
NSString
*
)
uid
face
:(
NSString
*
)
facePath
nikename
:(
NSString
*
)
nikename
welcome
:(
NSString
*
)
welcomeStr
animate
:(
BOOL
)
animate
{
UIViewController
*
vc
=
nil
;
FUSSingleChatViewController
*
serviceChat
=
[[
FUSSingleChatViewController
alloc
]
initWithUID
:
!
[
NSString
isNull
:
uid
]
?
uid
:
@
(
SERVEICE_UID
).
stringValue
face
:
facePath
nikename
:
nikename
];
serviceChat
.
isServiceAccount
=
YES
;
if
(
!
[
NSString
isNull
:
welcomeStr
])
{
serviceChat
.
welcomeStr
=
welcomeStr
;
}
vc
=
serviceChat
;
// if ([FUSCacheDataShare shareStore].settingInitDataModel.kfConfig.model == 1) {
//
// if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
//
// FUSSingleChatViewController *serviceChat = [[FUSSingleChatViewController alloc] initWithUID:uid ? uid : @(SERVEICE_UID).stringValue face:facePath nikename:nikename];
// serviceChat.isServiceAccount = YES;
// if (![NSString isNull:welcomeStr]) {
// serviceChat.welcomeStr = welcomeStr;
// }
// vc = serviceChat;
// } else {
//
// FUSWKWebViewController *webVC = [[FUSWKWebViewController alloc] init];
// NSString *webURL = FUSLocalizationHelper.isArbicLanguage ? URL_WEB_ARBIC_HELP : URL_WEB_HELP;
// webVC.webUrlString = [NSString stringWithFormat:@"%@?lang=%@", webURL,FUSLocalizationHelper.fus_currentLanguage.languageID];
// vc = webVC;
// }
// }else if ([FUSCacheDataShare shareStore].settingInitDataModel.kfConfig.model == 2) {
//
// FUSWKWebViewController *webVC = [[FUSWKWebViewController alloc] init];
// NSString *webURL = [FUSCacheDataShare shareStore].settingInitDataModel.kfConfig.url;
// webVC.webUrlString = [NSString stringWithFormat:@"%@?lang=%@", webURL,FUSLocalizationHelper.fus_currentLanguage.languageID];
// vc = webVC;
// }
// NSArray *viewControllers = self.viewControllers;
// UIViewController *viewVC = [viewControllers lastObject];
// if ([viewVC isKindOfClass:[FUSSingleChatViewController class]]){
// return;
// }
[
self
pushViewController
:
vc
animated
:
YES
];
}
@end
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/FUSHomePageViewController.m
View file @
76827dc4
...
...
@@ -14,6 +14,7 @@
#import "FUSDefine.h"
#import "FUSBaoFangHttpHelper.h"
#import "FUSSingleDailyCheckInView.h"
#import "FUSZhaixinRecommendedViewController.h"
// 导入通知框架
#import <UserNotifications/UserNotifications.h>
...
...
@@ -38,24 +39,24 @@
self
.
hiddenNavigationBar
=
YES
;
self
.
firstLoad
=
YES
;
[[
UNUserNotificationCenter
currentNotificationCenter
]
requestAuthorizationWithOptions
:
UNAuthorizationOptionBadge
|
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
completionHandler
:
^
(
BOOL
granted
,
NSError
*
_Nullable
error
)
{
}];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_applicationDidBecomeActiveNotification
:
)
name
:
UIApplicationDidBecomeActiveNotification
object
:
nil
];
[
self
fus_setupProperties
];
[
self
fus_createTabbarView
];
[
self
fus_createHomeScrollView
];
[
self
.
view
bringSubviewToFront
:
self
.
tabbarView
];
[
self
fus_getDailyCheckInData
];
[
self
fus_registNotification
];
}
-
(
void
)
fus_setupProperties
{
-
(
void
)
fus_registNotification
{
[[
UNUserNotificationCenter
currentNotificationCenter
]
requestAuthorizationWithOptions
:
UNAuthorizationOptionBadge
|
UNAuthorizationOptionSound
|
UNAuthorizationOptionAlert
completionHandler
:
^
(
BOOL
granted
,
NSError
*
_Nullable
error
)
{
}];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_applicationDidBecomeActiveNotification
:
)
name
:
UIApplicationDidBecomeActiveNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
newRegistRecommend
:
)
name
:
NEW_REGISTER_RECOMMEND
object
:
nil
];
}
-
(
void
)
fus_createHomeScrollView
{
...
...
@@ -148,12 +149,29 @@
};
}
#pragma mark ---
observer
#pragma mark ---
notification
-
(
void
)
fus_applicationDidBecomeActiveNotification
:
(
NSNotification
*
)
noti
{
[
self
.
contentViewList
enumerateObjectsUsingBlock
:
^
(
FUSHomePageBaseView
*
_Nonnull
obj
,
NSUInteger
idx
,
BOOL
*
_Nonnull
stop
)
{
[
obj
fus_applicationDidBecomeActiveNotification
:
noti
];
}];
}
-
(
void
)
newRegistRecommend
:
(
NSNotification
*
)
notification
{
NSArray
*
array
=
notification
.
object
;
FUSZhaixinRecommendedViewController
*
remVc
=
[[
FUSZhaixinRecommendedViewController
alloc
]
initWithDataArray
:
array
];
UINavigationController
*
remNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
remVc
];
if
(
remVc
)
{
BOOL
isNew
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
NEW_USER_REGIST
]
boolValue
];
if
(
isNew
)
{
[
self
presentViewController
:
remNav
animated
:
YES
completion
:
nil
];
}
}
// __weak typeof(self) weakSelf = self;
remVc
.
deallocBlock
=
^
{
};
}
#pragma mark --- FUSHomeViewBaseDelegate
-
(
void
)
fus_homeView
:
(
UIView
*
)
view
didUpdateCollectionCntentMaxHeightWithFloor
:
(
CGFloat
)
maxHeight
{
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeNaviView.h
View file @
76827dc4
...
...
@@ -32,6 +32,8 @@ typedef enum :NSInteger{
-
(
void
)
fus_setButton
:(
FUSHomeNaviViewClickType
)
btnType
selected
:(
BOOL
)
selected
;
-
(
UIButton
*
)
fus_getNaviButton
:(
FUSHomeNaviViewClickType
)
btnType
;
-
(
BOOL
)
fus_isButtonSelected
:(
FUSHomeNaviViewClickType
)
btnType
;
@end
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeNaviView.m
View file @
76827dc4
...
...
@@ -76,6 +76,13 @@
UIButton
*
tempBtn
=
self
.
btnList
[
btnType
];
return
tempBtn
.
isSelected
;
}
-
(
UIButton
*
)
fus_getNaviButton
:
(
FUSHomeNaviViewClickType
)
btnType
{
if
(
btnType
>
self
.
btnList
.
count
)
{
return
nil
;
}
UIButton
*
tempBtn
=
self
.
btnList
[
btnType
];
return
tempBtn
;
}
#pragma mark --- button did clicked
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomePageBaseView.h
View file @
76827dc4
...
...
@@ -13,9 +13,9 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FUSHomeViewBaseDelegate
<
NSObject
>
@optional
/// 提醒显示navi,tabbar
/// 提醒显示navi,tabbar
(现在仅仅支持home)
-
(
void
)
fus_scrollview
:
(
UIScrollView
*
)
view
shouldHideNavigationBar
:
(
BOOL
)
hidden
;
/// 提醒隐藏navi,tabbr
/// 提醒隐藏navi,tabbr
(现在仅仅支持home)
-
(
void
)
fus_scrollview
:(
UIScrollView
*
)
view
shouldShowNavigationBar
:(
BOOL
)
hidden
;
/// 返回collection或者tableview的内容最大高度,向下取整,用于决定外面的tabbar透明还是非透明,过高就透明
...
...
@@ -24,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN
/// - maxHeight: 最大高度
-
(
void
)
fus_homeView
:(
UIView
*
)
view
didUpdateCollectionCntentMaxHeightWithFloor
:(
CGFloat
)
maxHeight
;
@end
@interface
FUSHomePageBaseView
:
UIView
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/View/FUSHomeView.m
View file @
76827dc4
...
...
@@ -45,6 +45,9 @@
@property
(
nonatomic
,
assign
)
CGFloat
rowMargin
;
//每一行之间的间距
@property
(
nonatomic
,
assign
)
int
columnsCount
;
//显示多少列
/// 追踪列表需要刷新
@property
(
nonatomic
,
assign
)
BOOL
followNeedUpdate
;
@end
@implementation
FUSHomeView
...
...
@@ -53,12 +56,16 @@
{
self
=
[
super
init
];
if
(
self
)
{
self
.
followNeedUpdate
=
NO
;
[
self
fus_setup
];
[
self
fus_createUI
];
self
.
languageSegmentView
.
otherNamesList
=
self
.
viewModel
.
otherLanguageNamesList
;
self
.
languageSegmentView
.
selectName
=
self
.
viewModel
.
selectLanguageName
;
[
self
.
collectionView
.
mj_header
beginRefreshing
];
[
self
fus_reagiestNotification
];
}
return
self
;
}
...
...
@@ -117,6 +124,10 @@
}];
}
-
(
void
)
fus_reagiestNotification
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fu_followDidUpdate
:
)
name
:
FocusBaoFang_Refresh
object
:
nil
];
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
...
...
@@ -129,6 +140,15 @@
}
}
-
(
void
)
fus_viewWillShow
{
}
#pragma mark --- notification
-
(
void
)
fu_followDidUpdate
:
(
NSNotification
*
)
noti
{
self
.
followNeedUpdate
=
YES
;
}
#pragma mark --- method
-
(
void
)
fus_enterRoom
:
(
FUSBaoFangAnchorModel
*
)
model
index
:
(
NSInteger
)
index
{
[
FUSBaoFangViewHelper
fus_clickBaofangItemAtIndex
:
model
type
:
FUSAnchorHotData
controllerType
:
FUSBaoFangControllerTypeMainLive
index
:
index
onLiveRooms
:
self
.
viewModel
.
onlyLiveRoomList
];
...
...
@@ -227,29 +247,59 @@
//点击追踪
BOOL
isSelected
=
[
naviView
fus_isButtonSelected
:
FUSHomeNaviViewClickTypeFollow
];
FUSHomeViewAnchorListType
turnToType
=
isSelected
?
FUSHomeViewAnchorListTypeNormal
:
FUSHomeViewAnchorListTypeFollow
;
if
(
!
[
self
.
viewModel
fus_switchToList
:
turnToType
])
{
self
.
viewModel
.
anchorListType
=
turnToType
;
[
self
.
viewModel
fus_reloadData
];
//如果跳转到的状态被判定为必须刷新的,那么就直接刷新,后续如果需要刷新普通列表的也在这里添加||判定就好
if
(
turnToType
==
FUSHomeViewAnchorListTypeFollow
&&
self
.
followNeedUpdate
)
{
[
self
fusTurnToTypeAndHeaderRefresh
:
turnToType
];
}
else
{
if
(
!
[
self
.
viewModel
fus_trySwitchToCacheList
:
turnToType
])
{
[
self
fusTurnToTypeAndHeaderRefresh
:
turnToType
];
}
}
}
break
;
case
FUSHomeNaviViewClickTypeShare
:{
[
FUSResponsibilityConfirmAlertView
fus_showOn
:
self
.
parentController
.
view
type
:
1
clickHandler
:^
(
NSInteger
clickType
)
{
}];
FUSWKWebViewController
*
wkwVC
=
[[
FUSWKWebViewController
alloc
]
init
];
wkwVC
.
shouldShowShareBtn
=
NO
;
wkwVC
.
needShowReload
=
YES
;
wkwVC
.
from
=
FUSFromInvitShare
;
wkwVC
.
shouldIncludeIdentifyInfo
=
YES
;
wkwVC
.
webUrlString
=
URL_WEB_AGENT_INVITE_SHARE
;
// 包含用户信息参数
[
self
.
parentController
.
navigationController
pushViewController
:
wkwVC
animated
:
YES
];
}
break
;
case
FUSHomeNaviViewClickTypeStartLive
:{
// [FUSResponsibilityConfirmAlertView fus_showOn:self.parentController.view type:0 clickHandler:^(NSInteger clickType) {
// NSLog(@"FUSResponsibilityConfirmAlertViewCLicktype:%ld",clickType);
// }];
[
FUSLiveHelper
fus_pushLive
];
NSString
*
isFirstStarLiveProtocolShow
=
[
NSUserDefaults
fus_readCurrentUserObjectWithKey
:
UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL
];
if
(
isFirstStarLiveProtocolShow
==
nil
||
isFirstStarLiveProtocolShow
.
length
<=
0
)
{
[
FUSResponsibilityConfirmAlertView
fus_showOn
:
self
.
parentController
.
view
type
:
0
clickHandler
:^
(
NSInteger
clickType
)
{
if
(
clickType
==
0
)
{
// 未勾选完所有就点确定
[
FUSAlertView
showAlertWithTitle
:
nil
message
:[
NSString
fus_versionLocalString
:
@"您需要勾選所有確認事項後 開啟直播"
]
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_versionLocalString
:
@"確認"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
}];
}
else
if
(
clickType
==
1
)
{
// 勾选完点确定
[
NSUserDefaults
fus_setCurrentUserObjectKey
:
UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL
value
:
@"1"
];
[
FUSLiveHelper
fus_pushLive
];
}
else
if
(
clickType
==
2
)
{
// 点击直播公约
}
}];
}
else
{
[
FUSLiveHelper
fus_pushLive
];
}
}
break
;
case
FUSHomeNaviViewClickTypeSearch
:{
// [FUSMyEditNameAlertView fus_showOn:self.parentController.view type:0 clickHandler:^(BOOL suc, NSInteger code, NSString * _Nonnull msg) {
//
// }];
FUSSearchViewController
*
searchVC
=
[[
FUSSearchViewController
alloc
]
init
];
searchVC
.
searchType
=
FUSSearchVcTypePeopleNetwork
;
...
...
@@ -277,6 +327,13 @@
}
}
-
(
void
)
fusTurnToTypeAndHeaderRefresh
:
(
FUSHomeViewAnchorListType
)
type
{
self
.
followNeedUpdate
=
NO
;
self
.
viewModel
.
anchorListType
=
type
;
[
self
.
collectionView
.
mj_header
beginRefreshing
];
[
self
.
naviView
fus_getNaviButton
:
FUSHomeNaviViewClickTypeFollow
].
enabled
=
NO
;
}
#pragma mark --- FUSHomeViewViewModelDelegate
-
(
void
)
fus_homeViewViewModelLanguageListDidUpdate
:
(
NSString
*
)
selectTitle
others
:
(
NSArray
<
NSString
*>
*
)
otherTitlesList
{
self
.
languageSegmentView
.
otherNamesList
=
otherTitlesList
;
...
...
@@ -291,8 +348,10 @@
[
self
.
naviView
fus_setButton
:
FUSHomeNaviViewClickTypeFollow
selected
:
type
==
FUSHomeViewAnchorListTypeFollow
?
YES
:
NO
];
[
self
.
collectionView
reloadData
];
[
self
.
naviView
fus_getNaviButton
:
FUSHomeNaviViewClickTypeFollow
].
enabled
=
YES
;
if
(
type
==
FUSHomeViewAnchorListTypeFollow
&&
[
NSArray
isNull
:
self
.
viewModel
.
dataList
])
{
[
self
.
viewModel
fus_
switchTo
List
:
FUSHomeViewAnchorListTypeNormal
];
[
self
.
viewModel
fus_
trySwitchToCache
List
:
FUSHomeViewAnchorListTypeNormal
];
if
(
isLastSelected
==
NO
)
{
//上一次是普通,然后点了追踪,发现没追踪,则先还原回普通,再弹出这个
if
(
self
.
viewModel
.
recommendModel
!=
nil
)
{
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/ViewModel/FUSHomeViewViewModel.h
View file @
76827dc4
...
...
@@ -59,9 +59,13 @@ typedef enum :NSInteger{
-
(
void
)
fus_selectLanguage
:(
NSInteger
)
index
;
/// 根据主播列表类型刷新主播列表,语言
-
(
void
)
fus_reloadData
;
/// 切换到另外一个列表,返回是否能直接切换,能直接切换则切换,不能直接切换则是因为数据还没请求,需要reload
///
尝试
切换到另外一个列表,返回是否能直接切换,能直接切换则切换,不能直接切换则是因为数据还没请求,需要reload
/// - Parameter anchorListType: 列表类型
-
(
BOOL
)
fus_switchToList
:(
FUSHomeViewAnchorListType
)
anchorListType
;
-
(
BOOL
)
fus_trySwitchToCacheList
:(
FUSHomeViewAnchorListType
)
anchorListType
;
/// 仅仅更新某个列表,不切换
/// - Parameter anchorListType: 列表类型
-
(
void
)
fus_updateList
:(
FUSHomeViewAnchorListType
)
anchorListType
;
@end
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/ViewModel/FUSHomeViewViewModel.m
View file @
76827dc4
...
...
@@ -43,6 +43,13 @@
}
#pragma mark --- net work
-
(
void
)
fus_updateList
:
(
FUSHomeViewAnchorListType
)
anchorListType
{
if
(
anchorListType
==
FUSHomeViewAnchorListTypeFollow
)
{
[
self
fus_loadhomeVestFollowGetlistAutoCall
:
NO
];
}
else
if
(
anchorListType
==
FUSHomeViewAnchorListTypeNormal
)
{
[
self
fus_loadvestRoomGetlistAutoCall
:
NO
readFrom
:
ReadCacheFromTypeServer
];
}
}
/// 请求语言列表
-
(
void
)
fus_loadHomeLanguageListWithAnchorList
:
(
BOOL
)
shouldLoadAnchorList
readFrom
:
(
ReadCacheFromType
)
readFrom
{
...
...
@@ -171,7 +178,7 @@
[
self
fus_loadhomeVestFollowGetlistAutoCall
:
YES
];
}
}
-
(
BOOL
)
fus_
switchTo
List
:
(
FUSHomeViewAnchorListType
)
anchorListType
{
-
(
BOOL
)
fus_
trySwitchToCache
List
:
(
FUSHomeViewAnchorListType
)
anchorListType
{
if
(
anchorListType
==
FUSHomeViewAnchorListTypeNormal
)
{
if
(
self
.
homeLanguageGetList
==
nil
||
self
.
homeLanguageGetList
.
count
<=
0
||
self
.
anchorOriginalList
==
nil
)
{
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/cell/FUSHomeAnchorCollectionViewSmallCell.m
View file @
76827dc4
...
...
@@ -65,6 +65,10 @@
@implementation
FUSHomeAnchorCollectionViewSmallCell
-
(
void
)
dealloc
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/HomePage/cell/FUSHomeAnchorListSmallCell.m
View file @
76827dc4
...
...
@@ -30,6 +30,14 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
fus_createUI
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_enterLiveRoom
)
name
:
ENTER_LIVE_ROOM
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_quickLiveRoom
)
name
:
QUICK_LIVE_ROOM
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_quickLiveRoom
)
name
:
Live_Room_Minimize_Anim_Finish_Notification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_enterLiveRoom
)
name
:
Live_Room_Maximize_Anim_Finish_Notification
object
:
nil
];
}
return
self
;
}
...
...
@@ -88,6 +96,16 @@
return
self
.
bgImageView
;
}
#pragma mark --- notification
-
(
void
)
fus_enterLiveRoom
{
[
self
.
tagView
fus_stopAllTagsAnim
];
}
-
(
void
)
fus_quickLiveRoom
{
//pk动画
[
self
.
tagView
fus_startAllTagsAnim
];
}
#pragma mark --- getter and setter
-
(
void
)
setNovaModel
:
(
FUSHomeNovaListModel
*
)
novaModel
{
_novaModel
=
novaModel
;
...
...
FuSiLive/Classes/FusiVersionFeature/ViewController/NovaList/FUSHomeNovaListViewController.m
View file @
76827dc4
...
...
@@ -13,6 +13,7 @@
#import "FUSSegmentControlView.h"
#import "FUSMyZoneViewController.h"
#import "FUSDefine.h"
#import "FUSControllerPushHelper.h"
@interface
FUSHomeNovaListViewController
()
<
FUSSegmentControlViewDelegate
,
UIScrollViewDelegate
>
...
...
@@ -36,10 +37,10 @@
// 标题栏
@property
(
nonatomic
,
strong
)
UIView
*
navView
;
///
/rightBarButtonItem
//@property (nonatomic, strong) UIButton *right
Btn;
///
//
客服按钮
//
@property (nonatomic, strong) UIButton *serviceBtn;
///
榜单按钮
@property
(
nonatomic
,
strong
)
UIButton
*
rank
Btn
;
/// 客服按钮
@property
(
nonatomic
,
strong
)
UIButton
*
serviceBtn
;
@end
...
...
@@ -102,6 +103,28 @@
make
.
height
.
offset
(
40
);
}];
//榜单在最右边
self
.
rankBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
rankBtn
setImage
:[
UIImage
imageNamed
:
@"fus_home_navi_rank_icon"
]
forState
:
UIControlStateNormal
];
[
self
.
segmentView
addSubview
:
self
.
rankBtn
];
[
self
.
rankBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
right
.
top
.
bottom
.
offset
(
0
);
make
.
width
.
equalTo
(
self
.
rankBtn
.
mas_height
);
}];
self
.
serviceBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
serviceBtn
setImage
:[
UIImage
imageNamed
:
@"fus_common_navi_service_btn"
]
forState
:
UIControlStateNormal
];
[
self
.
segmentView
addSubview
:
self
.
serviceBtn
];
[
self
.
serviceBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
bottom
.
offset
(
0
);
make
.
right
.
equalTo
(
self
.
rankBtn
.
mas_left
);
make
.
width
.
equalTo
(
self
.
serviceBtn
.
mas_height
);
}];
[
self
.
serviceBtn
addTarget
:
self
action
:
@selector
(
fus_serviceBtnDidClicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rankBtn
addTarget
:
self
action
:
@selector
(
fus_rankBtnDidClicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
// CGFloat btn_w = 40;
//
// //右按钮,皇冠
...
...
@@ -246,13 +269,26 @@
[
self
.
navView
addSubview
:
backBtn
];
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
((
self
.
navView
.
width
-
200
)
/
2
.
0
,
self
.
navView
.
height
-
44
,
200
,
44
)];
titleLabel
.
text
=
FUSLocalizationHelper
.
versionLocalString
(
@"F
IREFLY
新星"
);
titleLabel
.
text
=
FUSLocalizationHelper
.
versionLocalString
(
@"F
USI
新星"
);
titleLabel
.
textColor
=
[
UIColor
fus_textColorRich
];
titleLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
17
];
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
navView
addSubview
:
titleLabel
];
}
#pragma mark --- button did clicked
-
(
void
)
fus_serviceBtnDidClicked
:
(
UIButton
*
)
btn
{
[
self
.
navigationController
fus_pushToServiceControllerWithAnimate
:
YES
];
}
-
(
void
)
fus_rankBtnDidClicked
:
(
UIButton
*
)
btn
{
FUSWKWebViewController
*
wkwVC
=
[[
FUSWKWebViewController
alloc
]
init
];
wkwVC
.
needHideWebTitleBar
=
YES
;
wkwVC
.
closeToPopAllWebView
=
NO
;
//TODO: 暂时写死榜单的,等阿甘回来再说,URL_WEB_HOME_RANK这个定义里有地址
wkwVC
.
webUrlString
=
@"https://ceshi.yabolive.tv/fusi/allRank/index.html"
;
[
self
.
navigationController
pushViewController
:
wkwVC
animated
:
YES
];
}
#pragma mark --------- method
-
(
void
)
ffreloadFollowAllStatus
{
...
...
FuSiLive/Classes/NewLive/Main/Other/FUSLiveHelper.m
View file @
76827dc4
...
...
@@ -855,7 +855,7 @@
UIViewController
*
vc
=
(
UIViewController
*
)
UIApplication
.
sharedApplication
.
keyWindow
.
rootViewController
;
if
(
!
[
vc
presentedViewController
])
{
[
vc
presentViewController
:[[
FUSLiveHelper
shareInstance
]
navLive
]
animated
:
anim
completion
:
completion
];
// [[NSNotificationCenter defaultCenter] postNotificationName:LiveNotification.enterLiveRoomNotification
object:nil];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
ENTER_LIVE_ROOM
object
:
nil
];
}
}
...
...
FuSiLive/Classes/NewsFeed/RichEditor/Controller/FUSPublishNewsFeedViewController.m
View file @
76827dc4
...
...
@@ -22,6 +22,7 @@
#import "FUSImagePickerViewController.h"
#import "FUSTextView.h"
#import "UISwitch+FUSRTL.h"
#import "FUSResponsibilityConfirmAlertView.h"
// font 18 textview显示一行的consize的高度就 38
#define INPUTTEXTVIEW_H 38
...
...
@@ -119,14 +120,14 @@ FUSImagePickerViewControllerDelegate>
[
self
.
postBtn
setTitleColor
:[
UIColor
colorWithHex
:
@"02f2f2"
]
forState
:
UIControlStateNormal
];
[
self
.
postBtn
setTitleColor
:[
UIColor
colorWithHex
:
@"808080"
]
forState
:
UIControlStateDisabled
];
self
.
postBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
15
];
[
self
.
postBtn
addTarget
:
self
action
:
@selector
(
goPublish
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
postBtn
addTarget
:
self
action
:
@selector
(
fus_pushBtnDidClicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
postBtn
.
enabled
=
NO
;
UIBarButtonItem
*
itemR
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
self
.
postBtn
];
self
.
navigationItem
.
rightBarButtonItems
=
@[
itemR
];
UIBarButtonItem
*
itemL
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
FUSLocalizationHelper
.
localString
(
@"取消"
)
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
popToLastPage
)];
[
itemL
setTintColor
:[
UIColor
colorWithHex
:
@"#8A888C"
]];
[
itemL
setTintColor
:[
UIColor
fus_textColorRich
]];
self
.
navigationItem
.
leftBarButtonItems
=
@[
itemL
];
}
...
...
@@ -217,13 +218,13 @@ FUSImagePickerViewControllerDelegate>
UIView
*
view1
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UIView
.
fus_screenW
,
toolBgView
.
height
/
3
.
0
)];
UILabel
*
lb
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
22
,
0
,
view1
.
width
/
2
.
0
-
22
,
view1
.
height
)];
lb
.
textColor
=
[
UIColor
colorWithHex
:
@"#999999"
];
lb
.
textColor
=
[
UIColor
fus_textColorRich
];
lb
.
text
=
FUSLocalizationHelper
.
localString
(
@"阅览价格"
);
[
view1
addSubview
:
lb
];
_priceLb
=
[[
UILabel
alloc
]
init
];
_priceLb
.
text
=
FUSLocalizationHelper
.
localString
(
@"免费"
);
_priceLb
.
textColor
=
[
UIColor
colorWithHex
:
@"#999999"
];
_priceLb
.
textColor
=
[
UIColor
fus_textColorRich
];
[
_priceLb
sizeToFit
];
_priceLb
.
x
=
CGRectGetMaxX
(
lb
.
frame
);
_priceLb
.
width
=
view1
.
width
/
2
.
0
-
30
;
...
...
@@ -247,7 +248,7 @@ FUSImagePickerViewControllerDelegate>
UIView
*
view2
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
(
toolBgView
.
height
/
3
.
0
)
*
1
,
UIView
.
fus_screenW
,
toolBgView
.
height
/
3
.
0
)];
_addressLb2
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
22
,
0
,
view2
.
width
-
90
,
view2
.
height
)];
_addressLb2
.
text
=
FUSLocalizationHelper
.
localString
(
@"定位"
);
_addressLb2
.
textColor
=
[
UIColor
colorWithHex
:
@"#999999"
];
_addressLb2
.
textColor
=
[
UIColor
fus_textColorRich
];
[
view2
addSubview
:
_addressLb2
];
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
view2
.
bounds
];
[
btn
addTarget
:
self
action
:
@selector
(
getAddress
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -262,7 +263,7 @@ FUSImagePickerViewControllerDelegate>
UIView
*
view3
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
(
toolBgView
.
height
/
3
.
0
)
*
2
,
UIView
.
fus_screenW
,
toolBgView
.
height
/
3
.
0
)];
UILabel
*
lb3
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
22
,
0
,
view3
.
width
-
90
,
view3
.
height
)];
lb3
.
text
=
FUSLocalizationHelper
.
localString
(
@"同步到相册"
);
lb3
.
textColor
=
[
UIColor
colorWithHex
:
@"#999999"
];
lb3
.
textColor
=
[
UIColor
fus_textColorRich
];
[
view3
addSubview
:
lb3
];
_switchSync
=
[[
UISwitch
alloc
]
initWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
lb3
.
frame
),
0
,
40
,
view3
.
height
)];
...
...
@@ -673,6 +674,32 @@ FUSImagePickerViewControllerDelegate>
}
}
-
(
void
)
fus_pushBtnDidClicked
:
(
UIButton
*
)
btn
{
NSString
*
isShow
=
[
NSUserDefaults
fus_readCurrentUserObjectWithKey
:
UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL
];
if
(
isShow
==
nil
||
isShow
.
length
<=
0
)
{
[
FUSResponsibilityConfirmAlertView
fus_showOn
:
self
.
view
type
:
1
clickHandler
:^
(
NSInteger
clickType
)
{
if
(
clickType
==
0
)
{
// 未勾选完所有就点确定
[
FUSAlertView
showAlertWithTitle
:
nil
message
:[
NSString
fus_versionLocalString
:
@"您需要勾選所有確認事項後發佈"
]
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_versionLocalString
:
@"確認"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
}];
}
else
if
(
clickType
==
1
)
{
// 勾选完点确定
[
NSUserDefaults
fus_setCurrentUserObjectKey
:
UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL
value
:
@"1"
];
[
self
goPublish
];
}
else
if
(
clickType
==
2
)
{
// 点击直播公约
}
}];
}
else
{
[
self
goPublish
];
}
}
/// 发布
-
(
void
)
goPublish
{
...
...
FuSiLive/Classes/NewsFeed/RichEditor/Controller/WGBaseRichEditorViewController.m
View file @
76827dc4
...
...
@@ -25,6 +25,7 @@
#import <HWPanModal/HWPanModal.h>
#import "FUSMainSearchViewController.h"
#import "FUSCacheDataShare.h"
#import "FUSResponsibilityConfirmAlertView.h"
// APP sever 的环境路径
...
...
@@ -129,7 +130,7 @@ WKScriptMessageHandler
[
self
.
rightBtn
setTitleColor
:[
UIColor
colorWithHex
:
@"02f2f2"
]
forState
:
UIControlStateNormal
];
[
self
.
rightBtn
setTitleColor
:[
UIColor
colorWithHex
:
@"808080"
]
forState
:
UIControlStateDisabled
];
self
.
rightBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeFont
:
15
];
[
self
.
rightBtn
addTarget
:
self
action
:
@selector
(
getHTML
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rightBtn
addTarget
:
self
action
:
@selector
(
fus_publishDidClicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
rightBtn
.
enabled
=
NO
;
UIBarButtonItem
*
itemR
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
self
.
rightBtn
];
...
...
@@ -201,6 +202,35 @@ WKScriptMessageHandler
[
self
.
navigationController
pushViewController
:
resultVc
animated
:
YES
];
}];
}
-
(
void
)
fus_publishDidClicked
:
(
UIButton
*
)
btn
{
[
self
.
view
endEditing
:
YES
];
NSString
*
isShow
=
[
NSUserDefaults
fus_readCurrentUserObjectWithKey
:
UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL
];
if
(
isShow
==
nil
||
isShow
.
length
<=
0
)
{
[
FUSResponsibilityConfirmAlertView
fus_showOn
:
self
.
view
type
:
1
clickHandler
:^
(
NSInteger
clickType
)
{
if
(
clickType
==
0
)
{
// 未勾选完所有就点确定
[
FUSAlertView
showAlertWithTitle
:
nil
message
:[
NSString
fus_versionLocalString
:
@"您需要勾選所有確認事項後發佈"
]
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_versionLocalString
:
@"確認"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
}];
}
else
if
(
clickType
==
1
)
{
// 勾选完点确定
[
NSUserDefaults
fus_setCurrentUserObjectKey
:
UDKEY_ACCOUNT_FIRST_PUBLISH_AND_SHARE_PROTOCOL
value
:
@"1"
];
[
self
getHTML
];
}
else
if
(
clickType
==
2
)
{
// 点击直播公约
}
}];
}
else
{
[
self
getHTML
];
}
}
-
(
void
)
getHTML
{
[
self
.
view
endEditing
:
YES
];
...
...
FuSiLive/Classes/NewsFeed/RichEditor/TZImagePickerController/TZPhotoPickerController.m
View file @
76827dc4
...
...
@@ -117,6 +117,7 @@ static CGFloat collectionViewMargin = 0;
// self.navigationItem.title = _model.name;
self
.
titleBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
titleBtn
setTitleColor
:[
UIColor
fus_textColorRich
]
forState
:
UIControlStateNormal
];
self
.
titleBtn
.
frame
=
CGRectMake
(
0
,
0
,
60
,
44
);
[
self
.
titleBtn
setTitle
:
_model
.
name
forState
:
UIControlStateNormal
];
[
self
.
titleBtn
setImage
:[
UIImage
imageNamed
:
@"fireFly_board_down_arrow"
]
forState
:
UIControlStateNormal
];
...
...
FuSiLive/Classes/Search/Controller/FUSSearchViewController.swift
View file @
76827dc4
...
...
@@ -52,7 +52,10 @@ class FUSSearchViewController: FUSBaseViewController, UITableViewDelegate, UITab
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
self
.
searchTextField
.
becomeFirstResponder
()
// self.searchTextField.becomeFirstResponder()
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.5
)
{
[
weak
self
]
in
self
?
.
searchTextField
.
becomeFirstResponder
()
}
}
override
func
viewDidLayoutSubviews
()
{
...
...
FuSiLive/Classes/SingleChat/Main/View/FUSChatTextInputView/FUSChatTextView.m
View file @
76827dc4
...
...
@@ -116,7 +116,7 @@
self
.
textView
.
backgroundColor
=
UIColor
.
fus_searchColor
;
self
.
textView
.
layer
.
cornerRadius
=
8
;
self
.
textView
.
layer
.
masksToBounds
=
YES
;
self
.
textView
.
textColor
=
[
UIColor
whiteColor
];
self
.
textView
.
textColor
=
[
UIColor
fus_textColorRich
];
}
return
_textView
;
...
...
FuSiLive/FUSAPPConfigs/FUSFuSiWebViewEventHelper.m
View file @
76827dc4
...
...
@@ -1253,7 +1253,8 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
if
([
UIViewController
fus_topViewController
].
navigationController
)
{
if
([
UIViewController
fus_topViewController
].
navigationController
.
viewControllers
.
count
!=
1
)
{
[[
UIViewController
fus_topViewController
].
navigationController
popToRootViewControllerAnimated
:
YES
];
// [[UIViewController fus_topViewController].navigationController popToRootViewControllerAnimated:YES];
[[
UIViewController
fus_topViewController
].
navigationController
popViewControllerAnimated
:
YES
];
}
else
{
[[
UIViewController
fus_topViewController
].
navigationController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
...
...
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