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
33b0e479
authored
Jun 27, 2025
by
pidan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外部跳转接入
parent
5b83134d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
264 additions
and
70 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.h
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserRouterProtocol.h
FuSiLive/AppDelegate.m
FuSiLive/FuSiLive.entitlements
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Router/FUSUserCenterRouter.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.h
View file @
33b0e479
...
@@ -72,6 +72,12 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -72,6 +72,12 @@ NS_ASSUME_NONNULL_BEGIN
/// 我的族人地址
/// 我的族人地址
+
(
NSString
*
)
fus_inviteMyClansmanUrl
;
+
(
NSString
*
)
fus_inviteMyClansmanUrl
;
/// 正式服外链跳转中转页面
+
(
NSString
*
)
scheduleOpenUrlMiddlewareUrl
;
/// 测试服外链跳转中转页面
+
(
NSString
*
)
scheduleOpenUrlMiddlewareTestUrl
;
@end
@end
@interface
FUSCommonURLs
:
NSObject
@interface
FUSCommonURLs
:
NSObject
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.m
View file @
33b0e479
...
@@ -104,6 +104,16 @@
...
@@ -104,6 +104,16 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webUrl
:
@"/vestApp/newShare/inviteNum.html"
];
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
webUrl
:
@"/vestApp/newShare/inviteNum.html"
];
}
}
/// 正式服外链跳转中转页面
+
(
NSString
*
)
scheduleOpenUrlMiddlewareUrl
{
return
@"https://events.yabolive.net/Nesting/middleware/index.html"
;
}
/// 测试服外链跳转中转页面
+
(
NSString
*
)
scheduleOpenUrlMiddlewareTestUrl
{
return
@"https://ceshi.yabolive.tv/Nesting/middleware/index.html"
;
}
@end
@end
@implementation
FUSCommonURLs
@implementation
FUSCommonURLs
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserRouterProtocol.h
View file @
33b0e479
...
@@ -21,6 +21,11 @@
...
@@ -21,6 +21,11 @@
#define FUSUserModule BFModule(FUSUserRouterProtocol)
#define FUSUserModule BFModule(FUSUserRouterProtocol)
/**
登录结果回调,包括成功失败回调
*/
typedef
void
(
^
FUSLoginSucceedListenerHandler
)(
void
);
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@protocol
FUSUserRouterProtocol
<
BifrostModuleProtocol
>
@protocol
FUSUserRouterProtocol
<
BifrostModuleProtocol
>
...
@@ -35,10 +40,15 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -35,10 +40,15 @@ NS_ASSUME_NONNULL_BEGIN
-
(
void
)
fus_checkAppStatus
;
-
(
void
)
fus_checkAppStatus
;
/// 监听是否有已经登录的监听
-
(
void
)
fus_loginSucceedListener
:(
FUSLoginSucceedListenerHandler
)
loginSucceedListenerHandler
;
-
(
void
)
fus_enterUserZone
:(
NSString
*
)
userId
;
-
(
void
)
fus_enterUserZone
:(
NSString
*
)
userId
;
-
(
void
)
fus_enterUserZone
:(
NSString
*
)
userId
isFromLiveRoomChat
:(
BOOL
)
isFromLiveRoomChat
;
-
(
void
)
fus_enterUserZone
:(
NSString
*
)
userId
isFromLiveRoomChat
:(
BOOL
)
isFromLiveRoomChat
;
-
(
void
)
fus_enterTopicDetailPage
:(
NSString
*
)
topicId
;
-
(
void
)
fus_enterMotorWareVC
;
-
(
void
)
fus_enterMotorWareVC
;
/// 进入任务中心
/// 进入任务中心
...
...
FuSiLive/AppDelegate.m
View file @
33b0e479
...
@@ -19,6 +19,17 @@ static NSString *const kGtAppId = @"2ecfODySFs8GlqYu7H2hW9";
...
@@ -19,6 +19,17 @@ static NSString *const kGtAppId = @"2ecfODySFs8GlqYu7H2hW9";
static
NSString
*
const
kGtAppKey
=
@"tjOur8OKTU7srFHoA0lB91"
;
static
NSString
*
const
kGtAppKey
=
@"tjOur8OKTU7srFHoA0lB91"
;
static
NSString
*
const
kGtAppSecret
=
@"OSSSWqbWY0ACJiUv4AHdW7"
;
static
NSString
*
const
kGtAppSecret
=
@"OSSSWqbWY0ACJiUv4AHdW7"
;
static
NSString
*
const
openAppEventSchedule
=
@"openAppEventSchedule"
;
typedef
NS_ENUM
(
NSInteger
,
FFOutsideJumpAPPType
)
{
FFOutsideJumpAPPTypePushLive
,
FFOutsideJumpAPPTypeEnterRoom
,
FFOutsideJumpAPPTypeEnterZone
,
FFOutsideJumpAPPTypeWeb
,
FFOutsideJumpAPPTypeFansClub
,
FFOutsideJumpAPPTypeDynamic
};
@interface
AppDelegate
()
<
UNUserNotificationCenterDelegate
,
GeTuiSdkDelegate
,
UIApplicationDelegate
>
@interface
AppDelegate
()
<
UNUserNotificationCenterDelegate
,
GeTuiSdkDelegate
,
UIApplicationDelegate
>
@end
@end
...
@@ -109,27 +120,6 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
...
@@ -109,27 +120,6 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
}];
}];
}
}
// 支付回调, 9.0以后使用新API接口
-
(
BOOL
)
application
:(
UIApplication
*
)
app
openURL
:(
NSURL
*
)
url
options
:(
NSDictionary
<
NSString
*
,
id
>
*
)
options
{
if
([[
FUSThirdAccountLoginHelper
sharedInstanse
]
fus_isOpenSocializedPlatformURL
:
url
])
{
FUSSocializedPlatform
platform
=
[[
FUSThirdAccountLoginHelper
sharedInstanse
]
platformForOpenURL
:
url
];
return
[[
FUSThirdAccountLoginHelper
sharedInstanse
]
fus_sociallizedPlatform
:
platform
OpenApplication
:
app
openURL
:
url
options
:
options
];
}
NSString
*
urlDecodingString
=
[
FUSUrlDecode
fus_urlDecodedString
:
url
.
absoluteString
];
//TODO:看看这是要做咩: added By Pidan
if
([
urlDecodingString
containsString
:
@"FusiClub://www.fusiclub.com"
])
{
[[
FUSThirdAccountLoginHelper
sharedInstanse
]
fus_handlerSafariLoginSucceedWithURL
:
urlDecodingString
];
return
YES
;
}
return
YES
;
}
-
(
void
)
applicationWillResignActive
:(
UIApplication
*
)
application
{
-
(
void
)
applicationWillResignActive
:(
UIApplication
*
)
application
{
[
Bifrost
checkAllModulesWithSelector
:
@selector
(
applicationWillResignActive
:)
arguments
:
@[
application
]];
[
Bifrost
checkAllModulesWithSelector
:
@selector
(
applicationWillResignActive
:)
arguments
:
@[
application
]];
}
}
...
@@ -160,10 +150,137 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
...
@@ -160,10 +150,137 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
}
}
-
(
BOOL
)
application
:(
UIApplication
*
)
app
continueUserActivity
:(
nonnull
NSUserActivity
*
)
userActivity
restorationHandler
:(
nonnull
void
(
^
)(
NSArray
<
id
<
UIUserActivityRestoring
>>
*
_Nullable
))
restorationHandler
{
-
(
BOOL
)
application
:(
UIApplication
*
)
app
continueUserActivity
:(
nonnull
NSUserActivity
*
)
userActivity
restorationHandler
:(
nonnull
void
(
^
)(
NSArray
<
id
<
UIUserActivityRestoring
>>
*
_Nullable
))
restorationHandler
{
if
([
userActivity
.
activityType
isEqualToString
:
NSUserActivityTypeBrowsingWeb
])
{
if
(
userActivity
.
webpageURL
)
{
[
self
fus_handlerUrlOpenAppActionWithURL
:
userActivity
.
webpageURL
];
}
}
//其他代码
//其他代码
return
YES
;
return
YES
;
}
}
// 支付回调, 9.0以后使用新API接口
-
(
BOOL
)
application
:(
UIApplication
*
)
app
openURL
:(
NSURL
*
)
url
options
:(
NSDictionary
<
NSString
*
,
id
>
*
)
options
{
if
([[
FUSThirdAccountLoginHelper
sharedInstanse
]
fus_isOpenSocializedPlatformURL
:
url
])
{
FUSSocializedPlatform
platform
=
[[
FUSThirdAccountLoginHelper
sharedInstanse
]
platformForOpenURL
:
url
];
return
[[
FUSThirdAccountLoginHelper
sharedInstanse
]
fus_sociallizedPlatform
:
platform
OpenApplication
:
app
openURL
:
url
options
:
options
];
}
[
self
fus_handlerUrlOpenAppActionWithURL
:
url
];
return
YES
;
}
-
(
void
)
fus_handlerUrlOpenAppActionWithURL
:(
NSURL
*
)
url
{
NSString
*
absoluteString
=
[
url
absoluteString
];
if
([
absoluteString
containsString
:
openAppEventSchedule
])
{
NSURLComponents
*
components
=
[
NSURLComponents
componentsWithURL
:
url
resolvingAgainstBaseURL
:
NO
];
if
(
components
.
queryItems
.
count
>
0
)
{
for
(
NSURLQueryItem
*
item
in
components
.
queryItems
)
{
if
([
item
.
name
isEqualToString
:
openAppEventSchedule
]
&&
item
.
value
)
{
NSData
*
jsonData
=
[[
NSData
alloc
]
initWithBase64EncodedString
:
item
.
value
options
:
0
];
NSError
*
error
=
nil
;
id
dataJson
=
[
NSJSONSerialization
JSONObjectWithData
:
jsonData
options
:
kNilOptions
error
:&
error
];
if
(
error
)
continue
;
id
data
=
[
dataJson
objectForKey
:
@"openData"
];
if
(
!
data
||
[
data
isKindOfClass
:[
NSNull
class
]]
||
([
data
respondsToSelector
:
@selector
(
length
)]
&&
[(
NSData
*
)
data
length
]
==
0
))
{
data
=
dataJson
;
}
// id behaviorLog = [dataJson objectForKey:@"behaviorLog"];
// NSInteger reqType = [[behaviorLog objectForKey:@"reqType"] integerValue];
// if (reqType != 0) {
// [[NSNotificationCenter defaultCenter] postNotificationName:@"FUSBehaviorExternalCallLog" object:nil userInfo:@{
// @"reqType": @(reqType),
// @"reqJson": [NSString stringWithFormat:@"%@", behaviorLog]
// }];
// }
[
FUSRouter
.
userRouter
fus_loginSucceedListener
:
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
NSInteger
rawType
=
[[
dataJson
objectForKey
:
@"type"
]
integerValue
];
FFOutsideJumpAPPType
type
=
rawType
;
switch
(
type
)
{
case
FFOutsideJumpAPPTypePushLive
:
[
FUSRouter
.
liveRouter
fus_pushLive
];
break
;
case
FFOutsideJumpAPPTypeEnterRoom
:
{
NSString
*
roomId
=
[[
data
objectForKey
:
@"paramInfo"
]
description
];
// NSLog(@"enterLiveRoom: %@", roomId);
// id behaviorLog = [dataJson objectForKey:@"behaviorLog"];
// NSInteger liveType = [[behaviorLog objectForKey:@"liveType"] integerValue];
// if (liveType != 0) {
// [[NSNotificationCenter defaultCenter] postNotificationName:@"FUSBehaviorJoinRoomLog" object:nil userInfo:@{
// @"reqType": @5,
// @"reqEventType": @(liveType),
// @"roomId": roomId
// }];
// }
[
FUSRouter
.
liveRouter
fus_enterLiveRoom
:
roomId
];
break
;
}
case
FFOutsideJumpAPPTypeEnterZone
:
{
NSString
*
uid
=
[[
data
objectForKey
:
@"paramInfo"
]
description
];
[
FUSRouter
.
userRouter
fus_enterUserZone
:
uid
];
break
;
}
case
FFOutsideJumpAPPTypeWeb
:
{
NSString
*
webParams
=
[[
data
objectForKey
:
@"paramInfo"
]
stringValue
];
DebugEnv
env
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
CURRENT_DEBUG_ENV
]
integerValue
];
NSString
*
urlStr
=
FUSCommonWebURLs
.
scheduleOpenUrlMiddlewareUrl
;
if
(
env
==
DebugEnvTest
)
{
urlStr
=
FUSCommonWebURLs
.
scheduleOpenUrlMiddlewareTestUrl
;
}
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
urlStr
,
webParams
];
FUSWKWebViewController
*
webVC
=
[[
FUSWKWebViewController
alloc
]
init
];
webVC
.
webUrlString
=
urlStr
;
webVC
.
needShowReload
=
YES
;
webVC
.
shouldIncludeIdentifyInfo
=
YES
;
[[
UIViewController
fus_topViewController
].
navigationController
pushViewController
:
webVC
animated
:
YES
];
break
;
}
case
FFOutsideJumpAPPTypeFansClub
:
{
// NSString *groupId = [[dataJson objectForKey:@"data"] stringValue];
// NSLog(@"进入粉丝群组: %@", groupId);
break
;
}
case
FFOutsideJumpAPPTypeDynamic
:
{
NSString
*
topicId
=
[[
dataJson
objectForKey
:
@"topicId"
]
description
];
[
FUSRouter
.
userRouter
fus_enterTopicDetailPage
:
topicId
];
break
;
}
default:
break
;
}
});
}];
}
}
}
}
}
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
// iOS 10: 点击通知进入App时触发,在该方法内统计有效用户点击数
// iOS 10: 点击通知进入App时触发,在该方法内统计有效用户点击数
...
...
FuSiLive/FuSiLive.entitlements
View file @
33b0e479
...
@@ -8,5 +8,9 @@
...
@@ -8,5 +8,9 @@
<array>
<array>
<string>
Default
</string>
<string>
Default
</string>
</array>
</array>
<key>
com.apple.developer.associated-domains
</key>
<array>
<string>
applinks:fusiclub.com
</string>
</array>
</dict>
</dict>
</plist>
</plist>
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.h
View file @
33b0e479
...
@@ -29,6 +29,9 @@ typedef void(^loginCompletion)(int code, NSString *msg);
...
@@ -29,6 +29,9 @@ typedef void(^loginCompletion)(int code, NSString *msg);
*/
*/
-
(
void
)
fus_readyToLogInWithCompletion
:(
loginCompletion
)
loginCompletion
;
-
(
void
)
fus_readyToLogInWithCompletion
:(
loginCompletion
)
loginCompletion
;
/// 监听是否有已经登录的监听
-
(
void
)
fus_loginSucceedListener
:(
FUSLoginSucceedListenerHandler
)
loginSucceedListenerHandler
;
/**
/**
手机号码登录
手机号码登录
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
View file @
33b0e479
...
@@ -52,6 +52,9 @@
...
@@ -52,6 +52,9 @@
// Socket 校验 Timer
// Socket 校验 Timer
@property
(
nonatomic
,
strong
)
NSTimer
*
socketCheckTimer
;
@property
(
nonatomic
,
strong
)
NSTimer
*
socketCheckTimer
;
/// 登录状态监听
@property
(
nonatomic
,
strong
)
NSMutableArray
<
FUSLoginSucceedListenerHandler
>
*
loginListeners
;
@end
@end
@implementation
FUSLoginHelper
@implementation
FUSLoginHelper
...
@@ -71,6 +74,14 @@
...
@@ -71,6 +74,14 @@
return
instance
;
return
instance
;
}
}
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
self
.
loginListeners
=
[
NSMutableArray
array
];
}
return
self
;
}
/**
/**
登录准备
登录准备
...
@@ -357,6 +368,13 @@
...
@@ -357,6 +368,13 @@
if
(
_loginCompletion
)
_loginCompletion
(
1
,
[
NSString
fus_localString
:
@"成功"
]);
if
(
_loginCompletion
)
_loginCompletion
(
1
,
[
NSString
fus_localString
:
@"成功"
]);
_loginCompletion
=
nil
;
_loginCompletion
=
nil
;
NSArray
*
loginListeners
=
[
self
.
loginListeners
copy
];
for
(
FUSLoginSucceedListenerHandler
listener
in
loginListeners
)
{
listener
();
}
[
self
.
loginListeners
removeAllObjects
];
// 注册监听相关通知
// 注册监听相关通知
[[
FUSRecieveNotificationHelper
sharedInstance
]
fus_setup
];
[[
FUSRecieveNotificationHelper
sharedInstance
]
fus_setup
];
...
@@ -468,6 +486,23 @@
...
@@ -468,6 +486,23 @@
[[
FUSSwiftCacheDataShare
share
]
fus_dealLoginSuccess
];
[[
FUSSwiftCacheDataShare
share
]
fus_dealLoginSuccess
];
}
}
-
(
void
)
fus_loginSucceedListener
:
(
FUSLoginSucceedListenerHandler
)
loginSucceedListenerHandler
{
if
(
!
[
FUSCacheDataShare
shareStore
].
userVerifyInfo
.
uid
)
{
if
(
loginSucceedListenerHandler
)
{
[
self
.
loginListeners
addObject
:
loginSucceedListenerHandler
];
}
return
;
}
else
{
if
(
loginSucceedListenerHandler
)
{
loginSucceedListenerHandler
();
}
}
}
#pragma mark - Method
#pragma mark - Method
/**
/**
进行 Socket 连接
进行 Socket 连接
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Router/FUSUserCenterRouter.m
View file @
33b0e479
...
@@ -89,6 +89,11 @@
...
@@ -89,6 +89,11 @@
#pragma mark - Protocal Methods
#pragma mark - Protocal Methods
/// 监听是否有已经登录的监听
-
(
void
)
fus_loginSucceedListener
:
(
FUSLoginSucceedListenerHandler
)
loginSucceedListenerHandler
{
[
FUSLoginHelper
.
sharedInstance
fus_loginSucceedListener
:
loginSucceedListenerHandler
];
}
-
(
FUSPublicHalfScreenPhotoView
*
)
createHalfScreenPhotoViewWithFrame
:
(
CGRect
)
frame
{
-
(
FUSPublicHalfScreenPhotoView
*
)
createHalfScreenPhotoViewWithFrame
:
(
CGRect
)
frame
{
return
[[
FUSHalfScreenPhotoView
alloc
]
initWithFrameWithClearManager
:
frame
];
return
[[
FUSHalfScreenPhotoView
alloc
]
initWithFrameWithClearManager
:
frame
];
}
}
...
@@ -116,55 +121,7 @@
...
@@ -116,55 +121,7 @@
case
4
:
{
case
4
:
{
NSString
*
topicId
=
[
info
[
@"topicId"
]
description
];
NSString
*
topicId
=
[
info
[
@"topicId"
]
description
];
if
([
NSString
isNull
:
topicId
])
{
[
self
fus_enterTopicDetailPage
:
topicId
];
return
;
}
[
FUSNewsFeedHttpHelper
fus_requestDynamicTopicInfo
:
topicId
success
:
^
(
NSDictionary
*
_Nonnull
topicInfo
,
NSDictionary
*
_Nonnull
contentDict
,
NSString
*
_Nonnull
shareLink
)
{
FUSNewsFeedListModel
*
listModel
=
[
FUSNewsFeedListModel
fus_modelWithDict
:
topicInfo
];
if
(
!
[
NSDictionary
isNull
:
contentDict
])
{
listModel
.
subtitle
=
contentDict
[
@"text"
];
listModel
.
title
=
contentDict
[
@"title"
];
NSArray
*
videos
=
contentDict
[
@"videos"
];
NSArray
*
images
=
contentDict
[
@"images"
];
NSMutableArray
*
videoModels
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
videos
)
{
FUSNewsFeedVideoModel
*
model
=
[
FUSNewsFeedVideoModel
fus_modelWithDict
:
dict
];
[
videoModels
addObject
:
model
];
}
listModel
.
videos
=
videoModels
;
NSMutableArray
*
imageModels
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
images
)
{
FUSNewsFeedImageModel
*
model
=
[
FUSNewsFeedImageModel
fus_modelWithDict
:
dict
];
[
imageModels
addObject
:
model
];
}
listModel
.
images
=
imageModels
;
}
[
FUSNewsFeedDetailViewController
fus_showNewsFeedDetailVCWithNewsFeedModel
:
listModel
rootVC
:[
UIViewController
fus_topViewController
]];
}
failure
:^
(
NSDictionary
*
_Nonnull
dict
,
int
code
)
{
if
(
code
==
-
6024
)
{
FUSNewsFeedListModel
*
listModel
=
[[
FUSNewsFeedListModel
alloc
]
init
];
listModel
.
selfLock
=
NO
;
listModel
.
currency
=
[
dict
[
@"currency"
]
integerValue
];
listModel
.
price
=
[
dict
[
@"price"
]
description
];
listModel
.
topicId
=
topicId
;
[
FUSNewsFeedDetailViewController
fus_showNewsFeedDetailVCWithNewsFeedModel
:
listModel
rootVC
:[
UIViewController
fus_topViewController
]];
return
;
}
[
FUSDialogView
fus_showDialog
:
dict
[
@"msg"
]];
FUSNewsFeedListViewController
*
feedListVC
=
[[
FUSNewsFeedListViewController
alloc
]
init
];
feedListVC
.
from
=
1
;
[[
UIViewController
fus_topViewController
].
navigationController
pushViewController
:
feedListVC
animated
:
YES
];
}];
break
;
break
;
}
}
default
:
default
:
...
@@ -172,6 +129,58 @@
...
@@ -172,6 +129,58 @@
}
}
}
}
-
(
void
)
fus_enterTopicDetailPage
:
(
NSString
*
)
topicId
{
if
([
NSString
isNull
:
topicId
])
{
return
;
}
[
FUSNewsFeedHttpHelper
fus_requestDynamicTopicInfo
:
topicId
success
:
^
(
NSDictionary
*
_Nonnull
topicInfo
,
NSDictionary
*
_Nonnull
contentDict
,
NSString
*
_Nonnull
shareLink
)
{
FUSNewsFeedListModel
*
listModel
=
[
FUSNewsFeedListModel
fus_modelWithDict
:
topicInfo
];
if
(
!
[
NSDictionary
isNull
:
contentDict
])
{
listModel
.
subtitle
=
contentDict
[
@"text"
];
listModel
.
title
=
contentDict
[
@"title"
];
NSArray
*
videos
=
contentDict
[
@"videos"
];
NSArray
*
images
=
contentDict
[
@"images"
];
NSMutableArray
*
videoModels
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
videos
)
{
FUSNewsFeedVideoModel
*
model
=
[
FUSNewsFeedVideoModel
fus_modelWithDict
:
dict
];
[
videoModels
addObject
:
model
];
}
listModel
.
videos
=
videoModels
;
NSMutableArray
*
imageModels
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
images
)
{
FUSNewsFeedImageModel
*
model
=
[
FUSNewsFeedImageModel
fus_modelWithDict
:
dict
];
[
imageModels
addObject
:
model
];
}
listModel
.
images
=
imageModels
;
}
[
FUSNewsFeedDetailViewController
fus_showNewsFeedDetailVCWithNewsFeedModel
:
listModel
rootVC
:[
UIViewController
fus_topViewController
]];
}
failure
:^
(
NSDictionary
*
_Nonnull
dict
,
int
code
)
{
if
(
code
==
-
6024
)
{
FUSNewsFeedListModel
*
listModel
=
[[
FUSNewsFeedListModel
alloc
]
init
];
listModel
.
selfLock
=
NO
;
listModel
.
currency
=
[
dict
[
@"currency"
]
integerValue
];
listModel
.
price
=
[
dict
[
@"price"
]
description
];
listModel
.
topicId
=
topicId
;
[
FUSNewsFeedDetailViewController
fus_showNewsFeedDetailVCWithNewsFeedModel
:
listModel
rootVC
:[
UIViewController
fus_topViewController
]];
return
;
}
[
FUSDialogView
fus_showDialog
:
dict
[
@"msg"
]];
FUSNewsFeedListViewController
*
feedListVC
=
[[
FUSNewsFeedListViewController
alloc
]
init
];
feedListVC
.
from
=
1
;
[[
UIViewController
fus_topViewController
].
navigationController
pushViewController
:
feedListVC
animated
:
YES
];
}];
}
-
(
void
)
fus_enterUserZone
:
(
NSString
*
)
userId
{
-
(
void
)
fus_enterUserZone
:
(
NSString
*
)
userId
{
[
self
fus_enterUserZone
:
userId
isFromLiveRoomChat
:
FUSConfig
.
sharedInstanced
.
liveConfigs
.
isInRoom
];
[
self
fus_enterUserZone
:
userId
isFromLiveRoomChat
:
FUSConfig
.
sharedInstanced
.
liveConfigs
.
isInRoom
];
}
}
...
...
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