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
e388292f
authored
Apr 02, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增fromlivescope和tolivescope
parent
b8414d4b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
10 deletions
FuSiLive.xcodeproj/project.pbxproj
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
FuSiLive.xcodeproj/project.pbxproj
View file @
e388292f
...
...
@@ -691,7 +691,7 @@
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++17"
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626005
3
;
CURRENT_PROJECT_VERSION
=
20250626005
4
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
...
@@ -956,7 +956,7 @@
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++17"
;
CODE_SIGN_ENTITLEMENTS
=
FuSiLive/FuSiLive.entitlements
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
20250626005
3
;
CURRENT_PROJECT_VERSION
=
20250626005
4
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
6GG26BHUMC
;
ENABLE_ON_DEMAND_RESOURCES
=
NO
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveMainViewController.m
View file @
e388292f
...
...
@@ -1667,6 +1667,9 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
if
(
!
[
roomId
isEqualToString
:[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
])
{
return
;
}
NSInteger
liveScope
=
[
dict
[
@"liveScope"
]
integerValue
];
[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
liveScope
=
liveScope
;
[
FUSLiveHelper
shareInstance
].
roomScopeType
=
liveScope
;
if
([
dict
[
@"mode"
]
integerValue
]
!=
0
)
{
return
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHelper.m
View file @
e388292f
...
...
@@ -242,9 +242,9 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
NSDictionary
*
encryptionData
=
[
FUSHttpHelper
fus_parseJSONDictionaryLayerByLayerWithObject
:
dict
[
@"encryptionData"
]];
[
self
.
roomInfoModel
.
encryptionData
fus_setValueWithDict
:
encryptionData
];
NSInteger
liveScope
=
[
dict
[
@"mode"
]
integerValue
]
;
self
.
roomScopeType
=
liveScope
==
1
?
FUSLiveRoomScopeTypePassword
:
FUSLiveRoomScopeTypeOpen
;
NSInteger
liveScope
=
[
dict
[
@"liveScope"
]
integerValue
];
self
.
roomInfoModel
.
liveScope
=
liveScope
;
self
.
roomScopeType
=
liveScope
;
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
e388292f
...
...
@@ -200,11 +200,15 @@ NS_ASSUME_NONNULL_BEGIN
/// 切换直播范围
/// @param fid 当前主播的id
/// @param cancel 取消状态 0:否 1:是
/// @param fromLiveScope 当前房间范围(0公开屋 3付费屋 4私享屋)
/// @param toLiveScope 要切换成的房间范围(0公开屋 3付费屋 4私享屋)
/// @param password 密码(cancel=0必传)
/// @param success 成功回调
/// @param failure 失败回调
+
(
void
)
fus_requestChangedPassword
:(
NSInteger
)
cancel
fid
:(
NSInteger
)
fid
fromLiveScope
:(
NSInteger
)
fromLiveScope
toLiveScope
:(
NSInteger
)
toLiveScope
password
:(
NSString
*
)
password
success
:(
void
(
^
)(
void
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
;
...
...
@@ -1243,10 +1247,14 @@ NS_ASSUME_NONNULL_BEGIN
/// @param uid 用户ID
/// @param fid 主播ID
/// @param cancel 取消状态 0:否 1:是
/// @param fromLiveScope 当前房间范围(0公开屋 3付费屋 4私享屋)
/// @param toLiveScope 要切换成的房间范围(0公开屋 3付费屋 4私享屋)
/// @param failure 0
+
(
void
)
fus_requestLiveChangePayWithUid
:(
NSString
*
)
uid
fid
:(
NSString
*
)
fid
cancel
:(
NSString
*
)
cancel
fromLiveScope
:(
NSInteger
)
fromLiveScope
toLiveScope
:(
NSInteger
)
toLiveScope
succeed
:(
void
(
^
)(
NSDictionary
*
dataDict
))
succeed
failure
:(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
;
/// 视图-获取用户列表:陪伴中、试看中
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
e388292f
...
...
@@ -2537,16 +2537,24 @@
/// 切换直播范围
/// @param fid 当前主播的id
/// @param cancel 取消状态 0:否 1:是
/// @param fromLiveScope 当前房间范围(0公开屋 3付费屋 4私享屋)
/// @param toLiveScope 要切换成的房间范围(0公开屋 3付费屋 4私享屋)
/// @param password 密码(cancel=0必传)
/// @param success 成功回调
/// @param failure 失败回调
+
(
void
)
fus_requestChangedPassword
:
(
NSInteger
)
cancel
fid
:
(
NSInteger
)
fid
fromLiveScope
:
(
NSInteger
)
fromLiveScope
toLiveScope
:
(
NSInteger
)
toLiveScope
password
:
(
NSString
*
)
password
success
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
{
NSDictionary
*
params
=
@{
@"fid"
:
@
(
fid
),
@"cancel"
:
@
(
cancel
),
@"password"
:
password
};
NSDictionary
*
params
=
@{
@"fid"
:
@
(
fid
),
@"cancel"
:
@
(
cancel
),
@"password"
:
password
,
@"fromLiveScope"
:
@
(
fromLiveScope
),
@"toLiveScope"
:
@
(
toLiveScope
)};
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_LIVE_CHANGE_Password
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
if
(
cancel
==
0
)
{
...
...
@@ -3683,16 +3691,22 @@
/// @param uid 用户ID
/// @param fid 主播ID
/// @param cancel 取消状态 0:否 1:是
/// @param fromLiveScope 当前房间范围(0公开屋 3付费屋 4私享屋)
/// @param toLiveScope 要切换成的房间范围(0公开屋 3付费屋 4私享屋)
/// @param failure 0
+
(
void
)
fus_requestLiveChangePayWithUid
:
(
NSString
*
)
uid
fid
:
(
NSString
*
)
fid
cancel
:
(
NSString
*
)
cancel
fromLiveScope
:
(
NSInteger
)
fromLiveScope
toLiveScope
:
(
NSInteger
)
toLiveScope
succeed
:
(
void
(
^
)(
NSDictionary
*
dataDict
))
succeed
failure
:
(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
{
NSDictionary
*
parm
=
@{
@"uid"
:
uid
,
@"fid"
:
fid
,
@"cancel"
:
cancel
};
@"cancel"
:
cancel
,
@"fromLiveScope"
:
@
(
fromLiveScope
),
@"toLiveScope"
:
@
(
toLiveScope
)};
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_liveChangePay
params
:
parm
success
:^
(
NSDictionary
*
_Nullable
dataDict
,
int
code
)
{
if
(
succeed
)
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/Push/LiveStartView/FUSLiveStartSetPrivacyView.swift
View file @
e388292f
...
...
@@ -309,17 +309,21 @@ import FUSCommon
/// - 设计说明:
/// - scopeType == .password:调用 /live/change/password(0) 开启私享屋(设置密码)
/// - scopeType == .open:调用 /live/change/password(1) 取消私享屋(恢复公开)
/// - fromLiveScope:当前房间范围(主播当前所在房间)
/// - toLiveScope:要切换成的房间范围(主播目标房间)
/// - 注意:
/// - “付费屋 → 公开屋”不调用该接口(由 /live/change/pay(cancel=1) 撤销付费并回到公开)
/// - “付费屋 → 私享屋”需先撤销付费,再进入设置密码流程
private
func
fus_changeScopeRequest
(
scopeType
:
FUSLiveRoomScopeType
,
password
:
String
)
{
guard
let
roomID
=
FUSLiveHelper
.
shareInstance
()
.
roomInfoModel
?
.
roomId
else
{
return
}
let
fromLiveScope
=
FUSLiveHelper
.
shareInstance
()
.
roomScopeType
.
rawValue
let
toLiveScope
=
scopeType
.
rawValue
// FUSIndicator.showProgress(withMessage: "")
FUSLoadingIndicator
.
fus_show
(
canTouch
:
true
)
FUSLiveHttpHelper
.
fus_requestChangedPassword
(
scopeType
==
.
password
?
0
:
1
,
fid
:
roomID
.
intValue
,
password
:
password
,
success
:
{
[
weak
self
]
in
FUSLiveHttpHelper
.
fus_requestChangedPassword
(
scopeType
==
.
password
?
0
:
1
,
fid
:
roomID
.
intValue
,
fromLiveScope
:
fromLiveScope
,
toLiveScope
:
toLiveScope
,
password
:
password
,
success
:
{
[
weak
self
]
in
self
?
.
fus_dismissWithAnimation
()
...
...
@@ -440,9 +444,11 @@ import FUSCommon
completion
(
false
)
return
}
let
fromLiveScope
=
FUSLiveHelper
.
shareInstance
()
.
roomScopeType
.
rawValue
let
toLiveScope
=
FUSLiveRoomScopeType
.
open
.
rawValue
FUSLoadingIndicator
.
fus_show
(
canTouch
:
true
)
FUSLiveHttpHelper
.
fus_requestChangedPassword
(
1
,
fid
:
roomID
.
intValue
,
password
:
""
,
success
:
{
FUSLiveHttpHelper
.
fus_requestChangedPassword
(
1
,
fid
:
roomID
.
intValue
,
fromLiveScope
:
fromLiveScope
,
toLiveScope
:
toLiveScope
,
password
:
""
,
success
:
{
FUSLoadingIndicator
.
fus_dismiss
()
FUSLiveHelper
.
shareInstance
()
.
roomScopeType
=
.
open
FUSLiveHelper
.
shareInstance
()
.
currentFunctionView
?
.
fus_updateRoomScoreType
()
...
...
@@ -457,6 +463,8 @@ import FUSCommon
/// 切换“付费屋”接口封装
/// - 参数:
/// - cancel: "0" 表示开启付费(切到付费屋);"1" 表示撤销付费(回到公开屋)
/// - fromLiveScope:当前房间范围(主播当前所在房间)
/// - toLiveScope:要切换成的房间范围(主播目标房间)
/// - 成功后:
/// - cancel == "0":同步 roundId(付费回合ID),设置 .pay 并刷新 UI
/// - cancel == "1":清空 roundId,设置 .open 并刷新 UI
...
...
@@ -467,9 +475,11 @@ import FUSCommon
completion
?(
false
)
return
}
let
fromLiveScope
=
FUSLiveHelper
.
shareInstance
()
.
roomScopeType
.
rawValue
let
toLiveScope
=
(
cancel
?
FUSLiveRoomScopeType
.
open
.
rawValue
:
FUSLiveRoomScopeType
.
pay
.
rawValue
)
FUSLoadingIndicator
.
fus_show
(
canTouch
:
true
)
FUSLiveHttpHelper
.
fus_requestLiveChangePay
(
withUid
:
uid
,
fid
:
fid
,
cancel
:
cancel
?
"1"
:
"0"
,
succeed
:
{
[
weak
self
]
dataDict
in
FUSLiveHttpHelper
.
fus_requestLiveChangePay
(
withUid
:
uid
,
fid
:
fid
,
cancel
:
cancel
?
"1"
:
"0"
,
fromLiveScope
:
fromLiveScope
,
toLiveScope
:
toLiveScope
,
succeed
:
{
[
weak
self
]
dataDict
in
guard
let
self
=
self
else
{
return
}
FUSLoadingIndicator
.
fus_dismiss
()
...
...
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