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
0a936b0b
authored
Mar 20, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集票 开启界面以及api
parent
cc72931c
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
335 additions
and
30 deletions
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.m
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.m
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.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/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.h
View file @
0a936b0b
...
@@ -85,10 +85,17 @@
...
@@ -85,10 +85,17 @@
@property
(
nonatomic
,
copy
)
NSString
*
warnSubTitle
;
@property
(
nonatomic
,
copy
)
NSString
*
warnSubTitle
;
@end
@end
@interface
FUSRoomTicketShowConfig
:
FUSBaseModel
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketMin
;
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketMax
;
@property
(
nonatomic
,
copy
)
NSString
*
collectTicketTips
;
@end
@interface
FUSRoomInfoModel
:
FUSBaseModel
@interface
FUSRoomInfoModel
:
FUSBaseModel
@property
(
nonatomic
,
copy
)
NSString
*
bonds
;
// 主播的萤火
@property
(
nonatomic
,
copy
)
NSString
*
bonds
;
// 主播的萤火
@property
(
nonatomic
,
copy
)
NSString
*
code
;
// 状态码
@property
(
nonatomic
,
copy
)
NSString
*
code
;
// 状态码
@property
(
nonatomic
,
copy
)
NSString
*
face
;
// 房主头像
@property
(
nonatomic
,
copy
)
NSString
*
face
;
// 房主头像
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/LiveRouter/FUSPublicModels/Live/FUSRoomInfoModel.m
View file @
0a936b0b
...
@@ -84,6 +84,10 @@
...
@@ -84,6 +84,10 @@
@end
@end
@implementation
FUSRoomTicketShowConfig
@end
@implementation
FUSLiveRoomFansGroupModel
@implementation
FUSLiveRoomFansGroupModel
-
(
NSString
*
)
realGroupName
{
-
(
NSString
*
)
realGroupName
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
View file @
0a936b0b
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
004773262F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773252F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp */
;
};
004773262F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773252F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp */
;
};
004773382F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
;
};
004773382F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
;
};
004773392F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
;
};
004773392F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
;
};
00F1A6022F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00F1A6002F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.h */
;
};
00F1A6032F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00F1A6012F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.m */
;
};
004773412F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773402F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift */
;
};
004773412F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
004773402F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift */
;
};
0089F9552D1979A900714CE3
/* FUSRegalValueUpgradeView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0089FD702D13F3460030DAA7
/* FUSRegalValueUpgradeView.xib */
;
};
0089F9552D1979A900714CE3
/* FUSRegalValueUpgradeView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0089FD702D13F3460030DAA7
/* FUSRegalValueUpgradeView.xib */
;
};
0089FD732D13F3460030DAA7
/* FUSLiveParcelGiftAndPropsCollectionViewCell.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0089FD612D13F3460030DAA7
/* FUSLiveParcelGiftAndPropsCollectionViewCell.h */
;
};
0089FD732D13F3460030DAA7
/* FUSLiveParcelGiftAndPropsCollectionViewCell.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0089FD612D13F3460030DAA7
/* FUSLiveParcelGiftAndPropsCollectionViewCell.h */
;
};
...
@@ -2440,6 +2442,8 @@
...
@@ -2440,6 +2442,8 @@
004773252F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
liveRoom_newComer_gift_animate.webp
;
sourceTree
=
"<group>"
;
};
004773252F5C281300E46A79
/* liveRoom_newComer_gift_animate.webp */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
liveRoom_newComer_gift_animate.webp
;
sourceTree
=
"<group>"
;
};
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSGetSuccessRecommendResultModel.h
;
sourceTree
=
"<group>"
;
};
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSGetSuccessRecommendResultModel.h
;
sourceTree
=
"<group>"
;
};
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSGetSuccessRecommendResultModel.m
;
sourceTree
=
"<group>"
;
};
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSGetSuccessRecommendResultModel.m
;
sourceTree
=
"<group>"
;
};
00F1A6002F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSTicketShowCollectTicketToggleResultModel.h
;
sourceTree
=
"<group>"
;
};
00F1A6012F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSTicketShowCollectTicketToggleResultModel.m
;
sourceTree
=
"<group>"
;
};
004773402F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FUSNewUserSevenDayCheckInControl.swift
;
sourceTree
=
"<group>"
;
};
004773402F5EBADE00E46A79
/* FUSNewUserSevenDayCheckInControl.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FUSNewUserSevenDayCheckInControl.swift
;
sourceTree
=
"<group>"
;
};
0089FD4A2D13F3460030DAA7
/* FUSGiftNumSelectView.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSGiftNumSelectView.h
;
sourceTree
=
"<group>"
;
};
0089FD4A2D13F3460030DAA7
/* FUSGiftNumSelectView.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FUSGiftNumSelectView.h
;
sourceTree
=
"<group>"
;
};
0089FD4B2D13F3460030DAA7
/* FUSGiftNumSelectView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSGiftNumSelectView.m
;
sourceTree
=
"<group>"
;
};
0089FD4B2D13F3460030DAA7
/* FUSGiftNumSelectView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FUSGiftNumSelectView.m
;
sourceTree
=
"<group>"
;
};
...
@@ -6692,6 +6696,8 @@
...
@@ -6692,6 +6696,8 @@
00E6CD902F52FA3900B63797
/* FUSLiveChatTableClickTypeRangeModel.m */
,
00E6CD902F52FA3900B63797
/* FUSLiveChatTableClickTypeRangeModel.m */
,
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
,
004773362F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h */
,
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
,
004773372F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m */
,
00F1A6002F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.h */
,
00F1A6012F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.m */
,
);
);
path
=
Model
;
path
=
Model
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -8996,6 +9002,7 @@
...
@@ -8996,6 +9002,7 @@
00A3AB702CB665EA007646E1
/* FUSLiveQuickChatSetCell.h in Headers */
,
00A3AB702CB665EA007646E1
/* FUSLiveQuickChatSetCell.h in Headers */
,
BED65A3B2C5B745F00668116
/* FUSTreasureBoxOptionModel.h in Headers */
,
BED65A3B2C5B745F00668116
/* FUSTreasureBoxOptionModel.h in Headers */
,
004773382F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h in Headers */
,
004773382F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.h in Headers */
,
00F1A6022F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.h in Headers */
,
BED65AC62C5B745F00668116
/* FUSBroadcastModel.h in Headers */
,
BED65AC62C5B745F00668116
/* FUSBroadcastModel.h in Headers */
,
BED65B042C5B746000668116
/* FUSBaoFangTagView.h in Headers */
,
BED65B042C5B746000668116
/* FUSBaoFangTagView.h in Headers */
,
BE189E132C733B460008418B
/* FSREffectdictGiftShowRoomRoomGuarderView.h in Headers */
,
BE189E132C733B460008418B
/* FSREffectdictGiftShowRoomRoomGuarderView.h in Headers */
,
...
@@ -10968,6 +10975,7 @@
...
@@ -10968,6 +10975,7 @@
BED659C62C5B745F00668116
/* FUSLiveScrollView.m in Sources */
,
BED659C62C5B745F00668116
/* FUSLiveScrollView.m in Sources */
,
BECF743F2D2FBC4500F5ABBC
/* FUSLiveBitrateModel.swift in Sources */
,
BECF743F2D2FBC4500F5ABBC
/* FUSLiveBitrateModel.swift in Sources */
,
004773392F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m in Sources */
,
004773392F5E7E7800E46A79
/* FUSGetSuccessRecommendResultModel.m in Sources */
,
00F1A6032F60C11000B81234
/* FUSTicketShowCollectTicketToggleResultModel.m in Sources */
,
BED6590F2C5B745E00668116
/* FUSLiveShareView.m in Sources */
,
BED6590F2C5B745E00668116
/* FUSLiveShareView.m in Sources */
,
BE189DC02C733B460008418B
/* FSRActiveMotorEffectViewController.m in Sources */
,
BE189DC02C733B460008418B
/* FSRActiveMotorEffectViewController.m in Sources */
,
BEB504702D2E8C2E00EA6E6F
/* FUSLiveThemeModel+FUSRequest.m in Sources */
,
BEB504702D2E8C2E00EA6E6F
/* FUSLiveThemeModel+FUSRequest.m in Sources */
,
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.h
View file @
0a936b0b
...
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@property
(
nonatomic
,
strong
)
FUSRoomEncryptionData
*
__nullable
encryptionData
;
@property
(
nonatomic
,
strong
)
FUSRoomEncryptionData
*
__nullable
encryptionData
;
//付费房
//付费房
@property
(
nonatomic
,
strong
)
FUSRoomPayData
*
__nullable
payData
;
@property
(
nonatomic
,
strong
)
FUSRoomPayData
*
__nullable
payData
;
@property
(
nonatomic
,
strong
)
FUSRoomTicketShowConfig
*
__nullable
ticketShowConfig
;
@end
@end
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSLiveBeforeReadyModel.m
View file @
0a936b0b
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
+
(
NSDictionary
*
)
modelContainerPropertyGenericClass
{
+
(
NSDictionary
*
)
modelContainerPropertyGenericClass
{
return
@{
@"beforeLiveCond"
:
[
FUSBeforeLiveCondModel
class
],
return
@{
@"beforeLiveCond"
:
[
FUSBeforeLiveCondModel
class
],
@"encryptionData"
:
[
FUSRoomEncryptionData
class
],
@"encryptionData"
:
[
FUSRoomEncryptionData
class
],
@"payData"
:
[
FUSRoomPayData
class
]};
@"payData"
:
[
FUSRoomPayData
class
],
@"ticketShowConfig"
:
[
FUSRoomTicketShowConfig
class
]};
}
}
@end
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.h
0 → 100644
View file @
0a936b0b
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@class
FUSOnlineUserModel
;
@interface
FUSTicketShowCollectTicketStageDataModel
:
FUSBaseModel
/// 房间ID
@property
(
nonatomic
,
copy
)
NSString
*
roomId
;
/// 频道ID
@property
(
nonatomic
,
copy
)
NSString
*
channelId
;
/// 回合ID
@property
(
nonatomic
,
copy
)
NSString
*
roundId
;
/// 当前阶段状态(0:集票中 1:待表演 2:表演中 9999:已结束)
@property
(
nonatomic
,
assign
)
NSInteger
showStatus
;
/// 阶段时长(毫秒)
@property
(
nonatomic
,
assign
)
NSInteger
showStatusTime
;
/// 剩余时间(毫秒)
@property
(
nonatomic
,
assign
)
NSInteger
remaintime
;
@end
@interface
FUSTicketShowCollectTicketMVPInfoModel
:
FUSBaseModel
/// MVP用户ID
@property
(
nonatomic
,
copy
)
NSString
*
mvpUserId
;
/// MVP购买数量
@property
(
nonatomic
,
assign
)
NSInteger
mvpUserNum
;
/// MVP用户信息
@property
(
nonatomic
,
strong
,
nullable
)
FUSOnlineUserModel
*
mvpUserInfo
;
@end
/// Ticket Show - 主播端 - 主播切换限时表演的集票(collectTicket/toggle)
@interface
FUSTicketShowCollectTicketToggleResultModel
:
FUSBaseModel
/// 响应码(接口返回)
@property
(
nonatomic
,
assign
)
NSInteger
code
;
/// 响应描述
@property
(
nonatomic
,
copy
)
NSString
*
msg
;
/// 集票目标总数
@property
(
nonatomic
,
assign
)
NSInteger
targetTicketNum
;
/// 集票完成总数
@property
(
nonatomic
,
assign
)
NSInteger
finalTicketNum
;
/// 集票表演主题标题
@property
(
nonatomic
,
copy
)
NSString
*
showTheme
;
/// 阶段信息
@property
(
nonatomic
,
strong
,
nullable
)
FUSTicketShowCollectTicketStageDataModel
*
stageData
;
/// MVP信息(为空对象表示无MVP)
@property
(
nonatomic
,
strong
,
nullable
)
FUSTicketShowCollectTicketMVPInfoModel
*
mvpInfo
;
@end
NS_ASSUME_NONNULL_END
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Model/FUSTicketShowCollectTicketToggleResultModel.m
0 → 100644
View file @
0a936b0b
#import "FUSTicketShowCollectTicketToggleResultModel.h"
#import "FUSOnlineUserModel.h"
@implementation
FUSTicketShowCollectTicketStageDataModel
@end
@implementation
FUSTicketShowCollectTicketMVPInfoModel
+
(
NSDictionary
<
NSString
*
,
id
>
*
)
modelContainerPropertyGenericClass
{
return
@{
@"mvpUserInfo"
:
[
FUSOnlineUserModel
class
]};
}
@end
@implementation
FUSTicketShowCollectTicketToggleResultModel
+
(
NSDictionary
<
NSString
*
,
id
>
*
)
modelContainerPropertyGenericClass
{
return
@{
@"stageData"
:
[
FUSTicketShowCollectTicketStageDataModel
class
],
@"mvpInfo"
:
[
FUSTicketShowCollectTicketMVPInfoModel
class
]};
}
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
0a936b0b
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@class
FUSTicketShowCollectTicketToggleResultModel
;
@class
FUSBarrageCardModel
;
@class
FUSBarrageCardModel
;
@interface
FUSLiveHttpHelper
:
NSObject
@interface
FUSLiveHttpHelper
:
NSObject
...
@@ -928,6 +930,22 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -928,6 +930,22 @@ NS_ASSUME_NONNULL_BEGIN
succeed
:(
void
(
^
)(
NSDictionary
*
dataDict
,
int
code
))
succeed
succeed
:(
void
(
^
)(
NSDictionary
*
dataDict
,
int
code
))
succeed
failure
:(
void
(
^
)(
NSString
*
,
NSInteger
))
failure
;
failure
:(
void
(
^
)(
NSString
*
,
NSInteger
))
failure
;
/// Ticket Show - 主播端切换限时表演的集票(开始/取消)
/// @param roomId 房间ID
/// @param channelId 频道ID
/// @param toggleType 操作类型(-1:取消集票 1:开始集票)
/// @param roundId 回合ID(取消集票需要)
/// @param ticketTargetNum 集票目标数量(开始集票需要)
/// @param showTheme 表演主题(开始集票需要)
+
(
void
)
fus_ticketShowCollectTicketToggleWithRoomId
:(
NSString
*
)
roomId
channelId
:(
NSString
*
)
channelId
toggleType
:(
NSInteger
)
toggleType
roundId
:(
nullable
NSString
*
)
roundId
ticketTargetNum
:(
NSInteger
)
ticketTargetNum
showTheme
:(
nullable
NSString
*
)
showTheme
succeed
:(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
failure
:(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
;
/// 开始直播前准备
/// 开始直播前准备
/// @param succeed 成功回调
/// @param succeed 成功回调
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
0a936b0b
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import "FUSLiveHttpHelper.h"
#import "FUSLiveHttpHelper.h"
#import "FUSTicketShowCollectTicketToggleResultModel.h"
#import "FUSLiveHelper.h"
#import "FUSLiveHelper.h"
#import "FUSSocketMessageHelper.h"
#import "FUSSocketMessageHelper.h"
...
@@ -3038,6 +3039,57 @@
...
@@ -3038,6 +3039,57 @@
if
(
failure
)
failure
(
dataDict
[
@"msg"
],
code
);
if
(
failure
)
failure
(
dataDict
[
@"msg"
],
code
);
}];
}];
}
}
+
(
void
)
fus_ticketShowCollectTicketToggleWithRoomId
:
(
NSString
*
)
roomId
channelId
:
(
NSString
*
)
channelId
toggleType
:
(
NSInteger
)
toggleType
roundId
:
(
nullable
NSString
*
)
roundId
ticketTargetNum
:
(
NSInteger
)
ticketTargetNum
showTheme
:
(
nullable
NSString
*
)
showTheme
succeed
:
(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
failure
:
(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
{
NSString
*
uid
=
FUSCacheDataShare
.
shareStore
.
userDetailInfo
.
uid
;
if
([
NSString
isNull
:
uid
]
||
[
NSString
isNull
:
roomId
]
||
[
NSString
isNull
:
channelId
])
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"参数错误"
],
-
3
);
return
;
}
if
(
toggleType
!=
1
&&
toggleType
!=
-
1
)
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"参数错误"
],
-
3
);
return
;
}
NSMutableDictionary
*
params
=
[
NSMutableDictionary
dictionary
];
params
[
@"uid"
]
=
uid
;
params
[
@"roomId"
]
=
roomId
;
params
[
@"channelId"
]
=
channelId
;
params
[
@"toggleType"
]
=
@
(
toggleType
);
if
(
toggleType
==
-
1
)
{
if
([
NSString
isNull
:
roundId
])
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"参数错误"
],
-
3
);
return
;
}
params
[
@"roundId"
]
=
roundId
;
}
else
{
if
(
ticketTargetNum
<=
0
)
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"参数错误"
],
-
3
);
return
;
}
params
[
@"ticketTargetNum"
]
=
@
(
ticketTargetNum
);
if
(
!
[
NSString
isNull
:
showTheme
])
{
params
[
@"showTheme"
]
=
showTheme
;
}
}
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSShowRoomURLs
.
fus_URL_TicketShow_CollectTicket_Toggle
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
{
+
(
void
)
fus_requestUserliveAssessHistoryGetListWithDateStr
:
(
NSString
*
)
dateStr
succeed
:
(
void
(
^
)(
FUSUserLiveAssessHistoryModel
*
_Nonnull
))
succeed
failure
:
(
void
(
^
)(
NSString
*
_Nonnull
,
NSInteger
))
failure
{
NSDictionary
*
parm
=
@{
@"dateStr"
:
dateStr
};
NSDictionary
*
parm
=
@{
@"dateStr"
:
dateStr
};
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
View file @
0a936b0b
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#import "FUSLiveHelper.h"
#import "FUSLiveHelper.h"
#import "FUSLiveHttpHelper.h"
#import "FUSLiveHttpHelper.h"
#import "FUSTicketShowCollectTicketToggleResultModel.h"
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <FirebaseAnalytics/FirebaseAnalytics.h>
...
@@ -49,6 +50,8 @@
...
@@ -49,6 +50,8 @@
// 限时表演集票磨砂条:由工具栏点击触发创建,用于后续 socket 刷新进度/新票
// 限时表演集票磨砂条:由工具栏点击触发创建,用于后续 socket 刷新进度/新票
@property
(
nonatomic
,
strong
)
FUSLiveShowTimeCollectFrostedView
*
showTimeFrostedView
;
@property
(
nonatomic
,
strong
)
FUSLiveShowTimeCollectFrostedView
*
showTimeFrostedView
;
@property
(
nonatomic
,
copy
)
NSString
*
showTimeRoundId
;
@end
@end
@implementation
FUSLiveChatInputHelper
@implementation
FUSLiveChatInputHelper
...
@@ -454,7 +457,8 @@
...
@@ -454,7 +457,8 @@
-
(
void
)
fus_bottomToolView
:
(
FUSLiveBottomToolView
*
)
bottomToolView
didClickShowTimeOnView
:
(
UIView
*
)
containerView
{
-
(
void
)
fus_bottomToolView
:
(
FUSLiveBottomToolView
*
)
bottomToolView
didClickShowTimeOnView
:
(
UIView
*
)
containerView
{
UIView
*
popContainer
=
(
containerView
?:
[
UIViewController
fus_topViewController
].
view
);
UIView
*
popContainer
=
(
containerView
?:
[
UIViewController
fus_topViewController
].
view
);
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
FUSLiveShowTimePopView
*
popView
=
[
FUSLiveShowTimePopView
fus_showOnView
:
popContainer
];
FUSRoomTicketShowConfig
*
ticketShowConfig
=
[
FUSLiveHelper
shareInstance
].
liveBeforeReadyInfo
.
ticketShowConfig
;
FUSLiveShowTimePopView
*
popView
=
[
FUSLiveShowTimePopView
fus_showOnView
:
popContainer
ticketShowConfig
:
ticketShowConfig
];
popView
.
startCollectHandler
=
^
(
NSString
*
_Nonnull
themeText
,
NSInteger
ticketCount
)
{
popView
.
startCollectHandler
=
^
(
NSString
*
_Nonnull
themeText
,
NSInteger
ticketCount
)
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
if
(
!
strongSelf
)
{
...
@@ -469,26 +473,103 @@
...
@@ -469,26 +473,103 @@
onView
=
[
UIViewController
fus_topViewController
].
view
;
onView
=
[
UIViewController
fus_topViewController
].
view
;
}
}
if
(
strongSelf
.
showTimeFrostedView
.
superview
)
{
FUSRoomInfoModel
*
roomInfoModel
=
FUSLiveHelper
.
shareInstance
.
roomInfoModel
;
[
strongSelf
.
showTimeFrostedView
removeFromSuperview
];
NSString
*
roomId
=
roomInfoModel
.
roomId
;
NSString
*
channelId
=
roomInfoModel
.
channelId
;
if
([
NSString
isNull
:
roomId
]
||
[
NSString
isNull
:
channelId
])
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"当前房间信息异常"
]];
return
;
}
NSInteger
min
=
ticketShowConfig
.
collectTicketMin
.
integerValue
;
NSInteger
max
=
ticketShowConfig
.
collectTicketMax
.
integerValue
;
if
(
min
<=
0
)
{
min
=
5
;
}
if
(
max
<=
0
)
{
max
=
50
;
}
if
(
max
<
min
)
{
max
=
min
;
}
if
(
ticketCount
<
min
||
ticketCount
>
max
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"集票数量需在 %zd~%zd 之间"
],
(
NSInteger
)
min
,
(
NSInteger
)
max
]];
return
;
}
NSString
*
finalTheme
=
(
themeText
.
length
>
0
?
themeText
:
[
NSString
fus_localString
:
@"限时表演"
]);
[
FUSLoadingView
fus_showProgressViewWithMessage
:
@""
];
[
FUSLiveHttpHelper
fus_ticketShowCollectTicketToggleWithRoomId
:
roomId
channelId
:
channelId
toggleType
:
1
roundId
:
nil
ticketTargetNum
:
ticketCount
showTheme
:
finalTheme
succeed
:^
(
FUSTicketShowCollectTicketToggleResultModel
*
_Nonnull
model
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
__strong
typeof
(
weakSelf
)
innerSelf
=
weakSelf
;
if
(
!
innerSelf
)
{
return
;
}
if
(
innerSelf
.
showTimeFrostedView
.
superview
)
{
[
innerSelf
.
showTimeFrostedView
removeFromSuperview
];
}
}
FUSLiveShowTimeCollectFrostedView
*
bar
=
[
FUSLiveShowTimeCollectFrostedView
fus_showOnView
:
onView
];
FUSLiveShowTimeCollectFrostedView
*
bar
=
[
FUSLiveShowTimeCollectFrostedView
fus_showOnView
:
onView
];
strongSelf
.
showTimeFrostedView
=
bar
;
innerSelf
.
showTimeFrostedView
=
bar
;
innerSelf
.
showTimeRoundId
=
model
.
stageData
.
roundId
?:
@""
;
__weak
typeof
(
innerSelf
)
weakInnerSelf
=
innerSelf
;
bar
.
cancelHandler
=
^
{
bar
.
cancelHandler
=
^
{
__strong
typeof
(
weakSelf
)
innerSelf
=
weakSelf
;
__strong
typeof
(
weakInnerSelf
)
cancelSelf
=
weakInnerSelf
;
innerSelf
.
showTimeFrostedView
=
nil
;
if
(
!
cancelSelf
)
{
return
;
}
NSString
*
cancelRoundId
=
cancelSelf
.
showTimeRoundId
;
if
([
NSString
isNull
:
cancelRoundId
])
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"当前回合信息异常"
]];
return
;
}
[
FUSLoadingView
fus_showProgressViewWithMessage
:
@""
];
[
FUSLiveHttpHelper
fus_ticketShowCollectTicketToggleWithRoomId
:
roomId
channelId
:
channelId
toggleType
:-
1
roundId
:
cancelRoundId
ticketTargetNum
:
0
showTheme
:
nil
succeed
:^
(
FUSTicketShowCollectTicketToggleResultModel
*
_Nonnull
cancelModel
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
cancelSelf
.
showTimeRoundId
=
@""
;
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSDialogView
fus_showDialog
:([
NSString
isNull
:
msg
]
?
[
NSString
fus_localString
:
@"取消失败"
]
:
msg
)];
});
}];
};
};
NSString
*
finalTheme
=
(
themeText
.
length
>
0
?
themeText
:
[
NSString
fus_localString
:
@"我是表演主题表演主题"
]);
NSInteger
target
=
(
model
.
targetTicketNum
>
0
?
model
.
targetTicketNum
:
ticketCount
);
NSString
*
remainingText
=
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"还差 %zd 张!"
],
(
NSInteger
)
ticketCount
];
NSInteger
finalNum
=
MAX
(
0
,
model
.
finalTicketNum
);
NSInteger
remaining
=
MAX
(
0
,
target
-
finalNum
);
CGFloat
progress
=
(
target
>
0
?
((
CGFloat
)
finalNum
/
(
CGFloat
)
target
)
:
0
);
NSString
*
remainingText
=
[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"还差 %zd 张!"
],
(
NSInteger
)
remaining
];
NSTimeInterval
nowSec
=
[[
NSDate
date
]
timeIntervalSince1970
];
NSTimeInterval
startTimestamp
=
nowSec
;
NSInteger
durationMs
=
model
.
stageData
.
showStatusTime
;
NSInteger
remainMs
=
model
.
stageData
.
remaintime
;
if
(
durationMs
>
0
&&
remainMs
>=
0
&&
remainMs
<=
durationMs
)
{
NSTimeInterval
elapsedSec
=
((
NSTimeInterval
)(
durationMs
-
remainMs
))
/
1000
.
0
;
startTimestamp
=
nowSec
-
MAX
(
0
,
elapsedSec
);
}
[
bar
fus_updateWithState
:
FUSLiveShowTimeCollectFrostedStateStarted
[
bar
fus_updateWithState
:
FUSLiveShowTimeCollectFrostedStateStarted
themeText
:
finalTheme
themeText
:(
model
.
showTheme
.
length
>
0
?
model
.
showTheme
:
finalTheme
)
progress
:
ticketCount
progress
:
progress
remainingText
:
remainingText
remainingText
:
remainingText
startTimestamp
:
[[
NSDate
date
]
timeIntervalSince1970
]
startTimestamp
:
startTimestamp
newTicketCount
:
0
newTicketCount
:
0
userModel
:
nil
];
userModel
:
nil
];
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSDialogView
fus_showDialog
:([
NSString
isNull
:
msg
]
?
[
NSString
fus_localString
:
@"开启集票失败"
]
:
msg
)];
});
}];
};
};
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.h
View file @
0a936b0b
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@class
FUSRoomTicketShowConfig
;
/// 开启集票点击回调
/// 开启集票点击回调
typedef
void
(
^
FUSLiveShowTimeStartCollectHandler
)(
NSString
*
themeText
,
NSInteger
ticketCount
);
typedef
void
(
^
FUSLiveShowTimeStartCollectHandler
)(
NSString
*
themeText
,
NSInteger
ticketCount
);
...
@@ -12,6 +14,9 @@ typedef void(^FUSLiveShowTimeStartCollectHandler)(NSString *themeText, NSInteger
...
@@ -12,6 +14,9 @@ typedef void(^FUSLiveShowTimeStartCollectHandler)(NSString *themeText, NSInteger
/// - Parameter onView: 承载弹窗的父视图
/// - Parameter onView: 承载弹窗的父视图
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
;
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
;
/// 在指定容器上展示弹窗,并传入配置
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
;
/// 点击“开启集票”后的回调(外部决定怎么展示集票磨砂条/调用接口)
/// 点击“开启集票”后的回调(外部决定怎么展示集票磨砂条/调用接口)
@property
(
nonatomic
,
copy
,
nullable
)
FUSLiveShowTimeStartCollectHandler
startCollectHandler
;
@property
(
nonatomic
,
copy
,
nullable
)
FUSLiveShowTimeStartCollectHandler
startCollectHandler
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimePopView.m
View file @
0a936b0b
...
@@ -41,6 +41,9 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -41,6 +41,9 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
/// 当前集票数量
/// 当前集票数量
@property
(
nonatomic
,
assign
)
NSInteger
ticketCount
;
@property
(
nonatomic
,
assign
)
NSInteger
ticketCount
;
@property
(
nonatomic
,
assign
)
NSInteger
ticketMin
;
@property
(
nonatomic
,
assign
)
NSInteger
ticketMax
;
/// 长按连发计时器(每 1 秒触发一次)
/// 长按连发计时器(每 1 秒触发一次)
@property
(
nonatomic
,
strong
)
dispatch_source_t
longPressTimer
;
@property
(
nonatomic
,
strong
)
dispatch_source_t
longPressTimer
;
/// 长按连发方向(+10 / -10)
/// 长按连发方向(+10 / -10)
...
@@ -52,7 +55,12 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -52,7 +55,12 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
/// 创建并展示弹窗
/// 创建并展示弹窗
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
{
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
{
return
[
self
fus_showOnView
:
onView
ticketShowConfig
:
nil
];
}
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
ticketShowConfig
:(
nullable
FUSRoomTicketShowConfig
*
)
ticketShowConfig
{
FUSLiveShowTimePopView
*
view
=
[[
FUSLiveShowTimePopView
alloc
]
initWithFrame
:
onView
.
bounds
];
FUSLiveShowTimePopView
*
view
=
[[
FUSLiveShowTimePopView
alloc
]
initWithFrame
:
onView
.
bounds
];
[
view
fus_updateWithTicketShowConfig
:
ticketShowConfig
];
[
onView
addSubview
:
view
];
[
onView
addSubview
:
view
];
[
view
fus_show
];
[
view
fus_show
];
return
view
;
return
view
;
...
@@ -61,7 +69,9 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -61,7 +69,9 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
if
(
self
)
{
self
.
ticketCount
=
kFUSShowTimeTicketMin
;
self
.
ticketMin
=
kFUSShowTimeTicketMin
;
self
.
ticketMax
=
kFUSShowTimeTicketMax
;
self
.
ticketCount
=
self
.
ticketMin
;
self
.
bgBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
bgBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
bgBtn
.
frame
=
self
.
bounds
;
self
.
bgBtn
.
frame
=
self
.
bounds
;
...
@@ -315,15 +325,15 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -315,15 +325,15 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
/// 设置票数并刷新 UI
/// 设置票数并刷新 UI
-
(
void
)
fus_setTicketCount
:
(
NSInteger
)
ticketCount
showTipIfOutOfRange
:
(
BOOL
)
showTipIfOutOfRange
{
-
(
void
)
fus_setTicketCount
:
(
NSInteger
)
ticketCount
showTipIfOutOfRange
:
(
BOOL
)
showTipIfOutOfRange
{
NSInteger
newValue
=
ticketCount
;
NSInteger
newValue
=
ticketCount
;
if
(
newValue
<
kFUSShowTimeT
icketMin
)
{
if
(
newValue
<
self
.
t
icketMin
)
{
newValue
=
kFUSShowTimeT
icketMin
;
newValue
=
self
.
t
icketMin
;
if
(
showTipIfOutOfRange
)
{
if
(
showTipIfOutOfRange
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"最低5张"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"最低%zd张"
],
self
.
ticketMin
]];
}
}
}
else
if
(
newValue
>
kFUSShowTimeT
icketMax
)
{
}
else
if
(
newValue
>
self
.
t
icketMax
)
{
newValue
=
kFUSShowTimeT
icketMax
;
newValue
=
self
.
t
icketMax
;
if
(
showTipIfOutOfRange
)
{
if
(
showTipIfOutOfRange
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"最高50张"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"最高%zd张"
],
self
.
ticketMax
]];
}
}
}
}
self
.
ticketCount
=
newValue
;
self
.
ticketCount
=
newValue
;
...
@@ -332,12 +342,12 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -332,12 +342,12 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
/// 启动长按连发(首次立即触发,之后每 1 秒触发一次)
/// 启动长按连发(首次立即触发,之后每 1 秒触发一次)
-
(
void
)
fus_startLongPressTimerWithDelta
:
(
NSInteger
)
delta
{
-
(
void
)
fus_startLongPressTimerWithDelta
:
(
NSInteger
)
delta
{
if
(
delta
<
0
&&
self
.
ticketCount
<=
kFUSShowTimeT
icketMin
)
{
if
(
delta
<
0
&&
self
.
ticketCount
<=
self
.
t
icketMin
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"最低5张"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"最低%zd张"
],
self
.
ticketMin
]];
return
;
return
;
}
}
if
(
delta
>
0
&&
self
.
ticketCount
>=
kFUSShowTimeT
icketMax
)
{
if
(
delta
>
0
&&
self
.
ticketCount
>=
self
.
t
icketMax
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"最高50张"
]];
[
FUSDialogView
fus_showDialog
:[
NSString
stringWithFormat
:[
NSString
fus_localString
:
@"最高%zd张"
],
self
.
ticketMax
]];
return
;
return
;
}
}
[
self
fus_stopLongPressTimer
];
[
self
fus_stopLongPressTimer
];
...
@@ -351,7 +361,6 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -351,7 +361,6 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
[
weakSelf
fus_onLongPressTick
];
[
weakSelf
fus_onLongPressTick
];
});
});
dispatch_resume
(
timer
);
dispatch_resume
(
timer
);
[
self
fus_onLongPressTick
];
}
}
/// 停止长按连发
/// 停止长按连发
...
@@ -365,13 +374,13 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -365,13 +374,13 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
/// 长按连发触发:每次步进 10,触到边界就停止
/// 长按连发触发:每次步进 10,触到边界就停止
-
(
void
)
fus_onLongPressTick
{
-
(
void
)
fus_onLongPressTick
{
if
(
self
.
longPressDelta
<
0
)
{
if
(
self
.
longPressDelta
<
0
)
{
if
(
self
.
ticketCount
<=
kFUSShowTimeT
icketMin
)
{
if
(
self
.
ticketCount
<=
self
.
t
icketMin
)
{
[
self
fus_stopLongPressTimer
];
[
self
fus_stopLongPressTimer
];
return
;
return
;
}
}
NSInteger
target
=
self
.
ticketCount
+
self
.
longPressDelta
;
NSInteger
target
=
self
.
ticketCount
+
self
.
longPressDelta
;
if
(
target
<=
kFUSShowTimeT
icketMin
)
{
if
(
target
<=
self
.
t
icketMin
)
{
[
self
fus_setTicketCount
:
kFUSShowTimeT
icketMin
showTipIfOutOfRange
:
YES
];
[
self
fus_setTicketCount
:
self
.
t
icketMin
showTipIfOutOfRange
:
YES
];
[
self
fus_stopLongPressTimer
];
[
self
fus_stopLongPressTimer
];
return
;
return
;
}
}
...
@@ -380,13 +389,13 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -380,13 +389,13 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
}
}
if
(
self
.
longPressDelta
>
0
)
{
if
(
self
.
longPressDelta
>
0
)
{
if
(
self
.
ticketCount
>=
kFUSShowTimeT
icketMax
)
{
if
(
self
.
ticketCount
>=
self
.
t
icketMax
)
{
[
self
fus_stopLongPressTimer
];
[
self
fus_stopLongPressTimer
];
return
;
return
;
}
}
NSInteger
target
=
self
.
ticketCount
+
self
.
longPressDelta
;
NSInteger
target
=
self
.
ticketCount
+
self
.
longPressDelta
;
if
(
target
>=
kFUSShowTimeT
icketMax
)
{
if
(
target
>=
self
.
t
icketMax
)
{
[
self
fus_setTicketCount
:
kFUSShowTimeT
icketMax
showTipIfOutOfRange
:
YES
];
[
self
fus_setTicketCount
:
self
.
t
icketMax
showTipIfOutOfRange
:
YES
];
[
self
fus_stopLongPressTimer
];
[
self
fus_stopLongPressTimer
];
return
;
return
;
}
}
...
@@ -394,4 +403,24 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
...
@@ -394,4 +403,24 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
}
}
}
}
-
(
void
)
fus_updateWithTicketShowConfig
:
(
nullable
FUSRoomTicketShowConfig
*
)
config
{
NSInteger
min
=
config
.
collectTicketMin
.
integerValue
;
NSInteger
max
=
config
.
collectTicketMax
.
integerValue
;
if
(
min
<=
0
)
{
min
=
kFUSShowTimeTicketMin
;
}
if
(
max
<=
0
)
{
max
=
kFUSShowTimeTicketMax
;
}
if
(
max
<
min
)
{
max
=
min
;
}
self
.
ticketMin
=
min
;
self
.
ticketMax
=
max
;
[
self
fus_setTicketCount
:
self
.
ticketCount
showTipIfOutOfRange
:
NO
];
if
(
!
[
NSString
isNull
:
config
.
collectTicketTips
])
{
self
.
tipLabel
.
text
=
config
.
collectTicketTips
;
}
}
@end
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
0a936b0b
...
@@ -586,6 +586,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -586,6 +586,9 @@ NS_ASSUME_NONNULL_BEGIN
+
(
NSString
*
)
fus_URL_liveChangePay
;
+
(
NSString
*
)
fus_URL_liveChangePay
;
/// 视图-获取用户列表:陪伴中、试看中
/// 视图-获取用户列表:陪伴中、试看中
+
(
NSString
*
)
fus_URL_liveGetPayRoomUserList
;
+
(
NSString
*
)
fus_URL_liveGetPayRoomUserList
;
/// Ticket Show - 功能 - 主播端切换限时表演的集票(开始/取消)
+
(
NSString
*
)
fus_URL_TicketShow_CollectTicket_Toggle
;
@end
@end
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
0a936b0b
...
@@ -964,6 +964,12 @@
...
@@ -964,6 +964,12 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/payRoom/getPayRoomUserList"
];
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/payRoom/getPayRoomUserList"
];
}
}
/// Ticket Show - 功能 - 主播端切换限时表演的集票(开始/取消)
+
(
NSString
*
)
fus_URL_TicketShow_CollectTicket_Toggle
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/ticketshow/collectTicket/toggle"
];
}
@end
@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