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
ba85dfc7
authored
Mar 22, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限时表演观众获取票api
parent
2ec7e932
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
157 additions
and
16 deletions
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSOnlineUserModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.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/FunctionView/ChatInputView/FUSLiveChatInputHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
View file @
ba85dfc7
...
...
@@ -86,8 +86,11 @@
@end
@interface
FUSRoomTicketShowConfig
:
FUSBaseModel
/// 开启集票时的最小目标票数(字符串形式,服务端下发)
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketMin
;
/// 开启集票时的最大目标票数(字符串形式,服务端下发)
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketMax
;
/// 集票配置提示文案(用于客户端弹窗/入口展示)
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketTips
;
@end
...
...
@@ -151,6 +154,9 @@
@property
(
nonatomic
,
copy
)
NSString
*
publishUrl
;
// 拉流地址
/// 是否处于集票中(0:否、1:是),进房后用于决定是否展示“限时表演”相关入口
@property
(
nonatomic
,
assign
)
NSInteger
collectTicket
;
/// 人气值对象)(score:人气值、lev:人气值等级、change:变化数量)
@property
(
nonatomic
,
copy
)
NSDictionary
*
popular
;
...
...
@@ -177,8 +183,10 @@
@property
(
nonatomic
,
copy
)
NSArray
<
NSString
*>
*
reminderKeys
;
/// 从用户资料中同步并补齐“我的房间”基础字段(用于创建/进入自己的房间等场景)
-
(
void
)
fus_setModelWithMyRoomInfos
;
/// 使用另一个房间模型更新当前实例(用于重连/切房等场景的数据同步)
-
(
void
)
fus_setupWithModel
:(
FUSRoomInfoModel
*
)
model
;
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSOnlineUserModel.h
View file @
ba85dfc7
...
...
@@ -22,6 +22,7 @@
@property
(
nonatomic
,
copy
)
NSString
*
guard
;
//贵人
@property
(
nonatomic
,
copy
)
NSString
*
isnew
;
//是否是新人
@property
(
nonatomic
,
copy
)
NSDictionary
*
privilege
;
// VIP 身份数据包含:richPower:是否有富豪权益
@property
(
nonatomic
,
assign
)
NSInteger
inVip
;
// 是否VIP/是否SVIP(服务端字段,0否,1VIP,2SVIP等)
@property
(
nonatomic
,
copy
)
NSString
*
isdisplay
;
// 是否显示(是否机器人)(0:否、1:是)
@property
(
nonatomic
,
copy
)
NSString
*
isHide
;
//是否是神秘人
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.h
View file @
ba85dfc7
...
...
@@ -48,6 +48,27 @@ NS_ASSUME_NONNULL_BEGIN
/// 响应描述
@property
(
nonatomic
,
copy
)
NSString
*
msg
;
/// socket:数据类型(观众端=1,主播端=4)
@property
(
nonatomic
,
assign
)
NSInteger
dataType
;
/// socket:房间ID(部分推送平铺字段)
@property
(
nonatomic
,
copy
)
NSString
*
roomId
;
/// socket:频道ID(部分推送平铺字段)
@property
(
nonatomic
,
copy
)
NSString
*
channelId
;
/// socket:回合ID(部分推送平铺字段)
@property
(
nonatomic
,
copy
)
NSString
*
roundId
;
/// socket:当前阶段状态(0:集票中 1:待表演 2:表演中 9999:已结束)
@property
(
nonatomic
,
assign
)
NSInteger
showStatus
;
/// socket:阶段时长(毫秒)
@property
(
nonatomic
,
assign
)
NSInteger
showStatusTime
;
/// socket:剩余时间(毫秒)
@property
(
nonatomic
,
assign
)
NSInteger
remaintime
;
/// 集票目标总数
@property
(
nonatomic
,
assign
)
NSInteger
targetTicketNum
;
...
...
@@ -57,6 +78,12 @@ NS_ASSUME_NONNULL_BEGIN
/// 集票表演主题标题
@property
(
nonatomic
,
copy
)
NSString
*
showTheme
;
/// socket:购买用户信息(赠票/购票的用户)
@property
(
nonatomic
,
strong
,
nullable
)
FUSOnlineUserModel
*
buyUser
;
/// socket:buyUser 的购买数量
@property
(
nonatomic
,
assign
)
NSInteger
buyNum
;
/// 阶段信息
@property
(
nonatomic
,
strong
,
nullable
)
FUSTicketShowCollectTicketStageDataModel
*
stageData
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.m
View file @
ba85dfc7
...
...
@@ -16,7 +16,8 @@
+
(
NSDictionary
<
NSString
*
,
id
>
*
)
modelContainerPropertyGenericClass
{
return
@{
@"stageData"
:
[
FUSTicketShowCollectTicketStageDataModel
class
],
@"mvpInfo"
:
[
FUSTicketShowCollectTicketMVPInfoModel
class
]};
@"mvpInfo"
:
[
FUSTicketShowCollectTicketMVPInfoModel
class
],
@"buyUser"
:
[
FUSOnlineUserModel
class
]};
}
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
ba85dfc7
...
...
@@ -946,6 +946,16 @@ NS_ASSUME_NONNULL_BEGIN
succeed
:(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
failure
:(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
;
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// @param roomId 房间ID
/// @param channelId 频道ID
/// @param roundId 回合ID
+
(
void
)
fus_ticketShowProgressGetInfoWithRoomId
:(
NSString
*
)
roomId
channelId
:(
NSString
*
)
channelId
roundId
:(
NSString
*
)
roundId
succeed
:(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
failure
:(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
;
/// 开始直播前准备
/// @param succeed 成功回调
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
ba85dfc7
...
...
@@ -3090,6 +3090,35 @@
if
(
failure
)
failure
(
dataDict
[
@"msg"
],
code
);
}];
}
+
(
void
)
fus_ticketShowProgressGetInfoWithRoomId
:
(
NSString
*
)
roomId
channelId
:
(
NSString
*
)
channelId
roundId
:
(
NSString
*
)
roundId
succeed
:
(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
_Nonnull
))
succeed
failure
:
(
void
(
^
)(
NSString
*
_Nonnull
,
NSInteger
))
failure
{
NSString
*
uid
=
FUSCacheDataShare
.
shareStore
.
userDetailInfo
.
uid
;
if
([
NSString
isNull
:
uid
]
||
[
NSString
isNull
:
roomId
]
||
[
NSString
isNull
:
channelId
]
||
[
NSString
isNull
:
roundId
])
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"参数错误"
],
-
3
);
return
;
}
NSDictionary
*
params
=
@{
@"uid"
:
uid
,
@"roomId"
:
roomId
,
@"channelId"
:
channelId
,
@"roundId"
:
roundId
};
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_TicketShow_Progress_GetInfo
params
:
params
success
:^
(
NSDictionary
*
_Nullable
dataDict
,
int
code
)
{
FUSTicketShowCollectTicketToggleResultModel
*
model
=
[
FUSTicketShowCollectTicketToggleResultModel
fus_modelWithDict
:
dataDict
];
if
(
succeed
)
succeed
(
model
);
}
failure
:^
(
NSDictionary
*
_Nullable
dataDict
,
int
code
)
{
if
(
failure
)
failure
(
dataDict
[
@"msg"
],
code
);
}];
}
/// 获取用户直播评分历史列表
+
(
void
)
fus_requestUserliveAssessHistoryGetListWithDateStr
:
(
NSString
*
)
dateStr
succeed
:
(
void
(
^
)(
FUSUserLiveAssessHistoryModel
*
_Nonnull
))
succeed
failure
:
(
void
(
^
)(
NSString
*
_Nonnull
,
NSInteger
))
failure
{
NSDictionary
*
parm
=
@{
@"dateStr"
:
dateStr
};
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.h
View file @
ba85dfc7
...
...
@@ -11,6 +11,8 @@
#import "FUSLiveGiftView.h"
#import "FUSLiveChatTableView.h"
@class
FUSRoomInfoModel
;
@interface
FUSLiveChatInputHelper
:
NSObject
<
FUSLiveChatInputViewDelegate
,
FUSLiveBottomToolViewDelegate
>
/**
...
...
@@ -57,4 +59,8 @@
/// 销毁限时表演集票磨砂条(确认结束直播后调用)
-
(
void
)
fus_destroyShowTimeFrostedIfNeeded
;
/// 进房/重连后根据房间状态同步“限时表演”集票磨砂条的展示与隐藏
/// @param roomInfoModel 进房接口返回的房间模型(collectTicket=1 表示当前处于集票中)
-
(
void
)
fus_syncShowTimeFrostedWithRoomInfoModel
:(
FUSRoomInfoModel
*
)
roomInfoModel
;
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
View file @
ba85dfc7
This diff is collapsed.
Click to expand it.
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.h
View file @
ba85dfc7
...
...
@@ -14,6 +14,14 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedState) {
FUSLiveShowTimeCollectFrostedStateCompleted
,
};
/// 磨砂条展示模式
typedef
NS_ENUM
(
NSInteger
,
FUSLiveShowTimeCollectFrostedDisplayMode
)
{
/// 主播端:展示取消入口/新票提示
FUSLiveShowTimeCollectFrostedDisplayModeAnchor
=
0
,
/// 用户端:展示购票入口/抢当 MVP
FUSLiveShowTimeCollectFrostedDisplayModeAudience
,
};
/// 限时表演集票磨砂条:展示集票进度/倒计时/取消入口
@interface
FUSLiveShowTimeCollectFrostedView
:
UIView
...
...
@@ -26,20 +34,52 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedState) {
/// @param themeText 表演主题
/// @param progress 0~1 进度
/// @param remainingText 剩余票提示,如“还差 49 张!”
/// @param startTimestamp 集票开始时间戳(秒)
/// @param newTicketCount 新票数(state=NewTicket 时使用)
/// @param userModel 新票贡献用户信息(
nil 时不展示标题栏用户信息
)
/// @param userModel 新票贡献用户信息(
兼容旧接口;推荐使用带 giftUserModel/mvpUserModel 的新方法
)
-
(
void
)
fus_updateWithState
:(
FUSLiveShowTimeCollectFrostedState
)
state
themeText
:(
NSString
*
)
themeText
progress
:(
CGFloat
)
progress
remainingText
:(
NSString
*
)
remainingText
startTimestamp
:(
NSTimeInterval
)
startTimestamp
newTicketCount
:(
NSInteger
)
newTicketCount
userModel
:(
FUSOnlineUserModel
*
_Nullable
)
userModel
;
/// 更新展示内容(推荐:分别传入赠票用户与 MVP 用户)
/// @param giftUserModel 赠票用户信息(主播端顶部左侧展示)
/// @param mvpUserModel MVP 用户信息(右侧 MVP 头像展示,nil 表示不展示)
-
(
void
)
fus_updateWithState
:(
FUSLiveShowTimeCollectFrostedState
)
state
themeText
:(
NSString
*
)
themeText
progress
:(
CGFloat
)
progress
remainingText
:(
NSString
*
)
remainingText
newTicketCount
:(
NSInteger
)
newTicketCount
giftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
mvpUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
mvpUserModel
;
/// 用户端更新展示内容(用于用户中途进房时同步倒计时)
/// @param countdownRemainingSeconds 距离结束剩余秒数;<0 表示未知,内部按 10 分钟从当前开始计时
-
(
void
)
fus_updateAudienceWithState
:(
FUSLiveShowTimeCollectFrostedState
)
state
themeText
:(
NSString
*
)
themeText
progress
:(
CGFloat
)
progress
remainingText
:(
NSString
*
)
remainingText
countdownRemainingSeconds
:(
NSInteger
)
countdownRemainingSeconds
newTicketCount
:(
NSInteger
)
newTicketCount
giftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
mvpUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
mvpUserModel
;
/// 取消按钮点击回调(预留服务端入口)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
cancelHandler
)(
void
);
/// 展示模式(默认主播端)
@property
(
nonatomic
,
assign
)
FUSLiveShowTimeCollectFrostedDisplayMode
displayMode
;
/// 用户端按钮点击回调(购票/抢当 MVP),仅 displayMode=Audience 时使用
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
actionHandler
)(
void
);
/// 用户端按钮文案(如“购票支持”“抢当MVP”)
@property
(
nonatomic
,
copy
,
nullable
)
NSString
*
actionTitle
;
/// 阶段状态(来自服务端 stageData.showStatus,用于展示“表演中”等状态标签)
@property
(
nonatomic
,
assign
)
NSInteger
stageStatus
;
/// 移除磨砂条
-
(
void
)
fus_dismiss
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
View file @
ba85dfc7
This diff is collapsed.
Click to expand it.
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.h
View file @
ba85dfc7
...
...
@@ -10,12 +10,14 @@ typedef void(^FUSLiveShowTimeStartCollectHandler)(NSString *themeText, NSInteger
/// “限时表演”底部弹窗(集票数量配置)
@interface
FUSLiveShowTimePopView
:
UIView
/// 在指定容器上展示弹窗
/// - Parameter onView: 承载弹窗的父视图
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
;
/// 在指定容器上展示弹窗,并传入配置
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
;
/// 在指定容器上展示弹窗,并传入配置与默认主题文案
/// - Parameters:
/// - onView: 承载弹窗的父视图
/// - ticketShowConfig: 集票数量范围等配置
/// - themeText: 默认主题文案(例如主播标题 introduce),为空则保持当前展示值
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
themeText
:(
nullable
NSString
*
)
themeText
;
/// 点击“开启集票”后的回调(外部决定怎么展示集票磨砂条/调用接口)
@property
(
nonatomic
,
copy
,
nullable
)
FUSLiveShowTimeStartCollectHandler
startCollectHandler
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.m
View file @
ba85dfc7
...
...
@@ -53,14 +53,12 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
@implementation
FUSLiveShowTimePopView
/// 创建并展示弹窗
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
{
return
[
self
fus_showOnView
:
onView
ticketShowConfig
:
nil
];
}
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
{
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
themeText
:(
nullable
NSString
*
)
themeText
{
FUSLiveShowTimePopView
*
view
=
[[
FUSLiveShowTimePopView
alloc
]
initWithFrame
:
onView
.
bounds
];
[
view
fus_updateWithTicketShowConfig
:
ticketShowConfig
];
[
view
fus_updateThemeTextIfNeeded
:
themeText
];
[
onView
addSubview
:
view
];
[
view
fus_show
];
return
view
;
...
...
@@ -427,4 +425,13 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
}
}
-
(
void
)
fus_updateThemeTextIfNeeded
:
(
nullable
NSString
*
)
themeText
{
if
(
self
.
themeTextField
.
text
.
length
>
0
)
{
return
;
}
if
(
!
[
NSString
isNull
:
themeText
])
{
self
.
themeTextField
.
text
=
themeText
;
}
}
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/FUSLiveFunctionView.m
View file @
ba85dfc7
...
...
@@ -6127,6 +6127,7 @@ BDAlphaPlayerMetalViewDelegate
[
self
fus_reloadRealtimeActivityWebView
];
[
self
fus_refreshLiveTheme
];
[
self
fus_refreshLiveTopicWindow
];
[
self
.
chatInputHelper
fus_syncShowTimeFrostedWithRoomInfoModel
:
model
];
if
(
!
[
model
.
roomId
isEqualToString
:[[
FUSCacheDataShare
shareStore
]
userDetailInfo
].
uid
]
&&
model
.
liked
&&
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
ba85dfc7
...
...
@@ -589,6 +589,9 @@ NS_ASSUME_NONNULL_BEGIN
/// Ticket Show - 功能 - 主播端切换限时表演的集票(开始/取消)
+
(
NSString
*
)
fus_URL_TicketShow_CollectTicket_Toggle
;
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
;
@end
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
ba85dfc7
...
...
@@ -970,6 +970,12 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/ticketshow/collectTicket/toggle"
];
}
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/ticketshow/progress/getinfo"
];
}
@end
...
...
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