Commit 7c0eaf49 by suolong

添加表演结束api,修复点界面ui

parent 60b77571
......@@ -969,6 +969,19 @@ NS_ASSUME_NONNULL_BEGIN
succeed:(void (^)(FUSTicketShowCollectTicketToggleResultModel *model))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure;
/// Ticket Show - 功能 - 主播端表演结束
/// 接口:POST /ticketshow/show/end
/// @param roomId 房间ID
/// @param channelId 频道ID
/// @param roundId 回合ID
/// @param succeed 成功回调(复用 TicketShow 返回模型字段进行存储)
/// @param failure 失败回调(参数错误 code=-3)
+ (void)fus_ticketShowShowEndWithRoomId:(NSString *)roomId
channelId:(NSString *)channelId
roundId:(NSString *)roundId
succeed:(void (^)(FUSTicketShowCollectTicketToggleResultModel *model))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure;
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// @param roomId 房间ID
/// @param channelId 频道ID
......
......@@ -3157,6 +3157,35 @@
}];
}
+ (void)fus_ticketShowShowEndWithRoomId:(NSString *)roomId
channelId:(NSString *)channelId
roundId:(NSString *)roundId
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]
|| [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_Show_End 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_ticketShowProgressGetInfoWithRoomId:(NSString *)roomId
channelId:(NSString *)channelId
roundId:(NSString *)roundId
......
......@@ -74,7 +74,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
newTicketCount:(NSInteger)newTicketCount
giftUserModel:(FUSOnlineUserModel * _Nullable)giftUserModel
mvpUserModel:(FUSOnlineUserModel * _Nullable)mvpUserModel;
/// 更新顶部赠票用户信息(新票贡献时调用)
/// @param giftUserModel 赠票用户信息
/// @param newTicketCount 新票数
- (void)fus_updateTopTicketInfoWithGiftUserModel:(FUSOnlineUserModel * _Nullable)giftUserModel
newTicketCount:(NSInteger)newTicketCount;
......@@ -96,6 +98,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
/// 点击顶部头像回调(抛到外层处理:如展示“票的贡献”弹窗)
@property (nonatomic, copy, nullable) void (^avatarTapHandler)(FUSLiveShowTimeCollectFrostedAvatarTapType tapType);
/// 表演倒计时结束回调(仅 stageStatus=2 且倒计时归零时触发)
@property (nonatomic, copy, nullable) void (^performanceCountdownEndHandler)(void);
/// 移除磨砂条
- (void)fus_dismiss;
......
......@@ -9,7 +9,7 @@
#import "FUSOnlineUserModel.h"
static const CGFloat kFUSShowTimeFrostedHeight = 120.0;
static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
static const NSInteger kFUSShowTimeCollectSeconds = 60;
@interface FUSShowTimePaddingLabel : UILabel
@property (nonatomic, assign) UIEdgeInsets textInsets;
......@@ -100,6 +100,9 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
/// 倒计时刷新计时器
@property (nonatomic, strong) dispatch_source_t countdownTimer;
/// 标记倒计时归零事件是否已回调,避免重复触发
@property (nonatomic, assign) BOOL didNotifyPerformanceCountdownEnd;
@end
@implementation FUSLiveShowTimeCollectFrostedView
......@@ -654,6 +657,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
- (void)setStageStatus:(NSInteger)stageStatus {
_stageStatus = stageStatus;
self.didNotifyPerformanceCountdownEnd = NO;
self.statusTagLabel.text = @"";
self.statusTagLabel.hidden = YES;
[self fus_applyBottomInfoLayout];
......@@ -710,6 +714,12 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
if (remain <= 0) {
self.countdownLabel.text = @"00:00";
[self fus_stopCountdownTimer];
if (self.stageStatus == 2 && !self.didNotifyPerformanceCountdownEnd) {
self.didNotifyPerformanceCountdownEnd = YES;
if (self.performanceCountdownEndHandler) {
self.performanceCountdownEndHandler();
}
}
return;
}
......
......@@ -2,13 +2,15 @@
NS_ASSUME_NONNULL_BEGIN
/// 底部确认弹窗:展示 MVP 头像/标识/昵称,仅“确认”可关闭
/// 确认弹窗:展示“表演结束”/本场票数/MVP 信息,仅“确认”可关闭
@interface FUSLiveShowTimeMVPConfirmPopView : UIView
/// 展示到指定父视图(存在则复用)
+ (instancetype)fus_showOnView:(UIView *)onView;
/// 更新头像/昵称/MVP 标签文案
- (void)fus_updateAvatarURL:(nullable NSString *)url nickname:(nullable NSString *)nickname tagText:(nullable NSString *)tagText;
/// 更新“本场票数”
- (void)fus_updateTicketCount:(NSInteger)ticketCount;
/// 设置确认按钮点击回调
- (void)fus_setConfirmHandler:(void (^)(void))confirmHandler;
/// 主动关闭弹窗
......
......@@ -596,6 +596,9 @@ NS_ASSUME_NONNULL_BEGIN
/// Ticket Show - 功能 - 主播端开始/取消表演
+ (NSString *)fus_URL_TicketShow_Show_Toggle;
/// Ticket Show - 功能 - 主播端表演结束
+ (NSString *)fus_URL_TicketShow_Show_End;
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+ (NSString *)fus_URL_TicketShow_Progress_GetInfo;
......
......@@ -982,6 +982,12 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/ticketshow/show/toggle"];
}
/// Ticket Show - 功能 - 主播端表演结束
+ (NSString *)fus_URL_TicketShow_Show_End
{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/ticketshow/show/end"];
}
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+ (NSString *)fus_URL_TicketShow_Progress_GetInfo
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment