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
7c0eaf49
authored
Mar 25, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加表演结束api,修复点界面ui
parent
60b77571
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
286 additions
and
60 deletions
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/FUSLiveShowTimeCollectFrostedView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
7c0eaf49
...
@@ -969,6 +969,19 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -969,6 +969,19 @@ NS_ASSUME_NONNULL_BEGIN
succeed
:(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
succeed
:(
void
(
^
)(
FUSTicketShowCollectTicketToggleResultModel
*
model
))
succeed
failure
:(
void
(
^
)(
NSString
*
msg
,
NSInteger
code
))
failure
;
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 - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// @param roomId 房间ID
/// @param roomId 房间ID
/// @param channelId 频道ID
/// @param channelId 频道ID
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
7c0eaf49
...
@@ -3157,6 +3157,35 @@
...
@@ -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
+
(
void
)
fus_ticketShowProgressGetInfoWithRoomId
:
(
NSString
*
)
roomId
channelId
:
(
NSString
*
)
channelId
channelId
:
(
NSString
*
)
channelId
roundId
:
(
NSString
*
)
roundId
roundId
:
(
NSString
*
)
roundId
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveChatInputHelper.m
View file @
7c0eaf49
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#import "FUSLiveRoomThemePopView.h"
#import "FUSLiveRoomThemePopView.h"
#import "FUSLiveShowTimeTicketActionPopView.h"
#import "FUSLiveShowTimeTicketActionPopView.h"
#import "FUSLiveShowTimeTicketContributionPopView.h"
#import "FUSLiveShowTimeTicketContributionPopView.h"
#import "FUSLiveShowTimeMVPConfirmPopView.h"
#import "FUSLiveShowTimeCancelConfirmPopView.h"
#import "FUSLiveShowTimeCancelConfirmPopView.h"
#import "FUSLiveShowTimeFrostCardPopView.h"
#import "FUSLiveShowTimeFrostCardPopView.h"
#import "FUSLiveFunctionLayerView.h"
#import "FUSLiveFunctionLayerView.h"
...
@@ -82,6 +83,12 @@
...
@@ -82,6 +83,12 @@
/// 主播端“票已集齐/取消确认”弹窗倒计时剩余秒数(两层弹窗之间需要延续同一倒计时)
/// 主播端“票已集齐/取消确认”弹窗倒计时剩余秒数(两层弹窗之间需要延续同一倒计时)
@property
(
nonatomic
,
assign
)
NSInteger
showTimeAnchorPopupRemainingSeconds
;
@property
(
nonatomic
,
assign
)
NSInteger
showTimeAnchorPopupRemainingSeconds
;
/// 记录已触发“表演结束”接口的回合,避免倒计时触底后重复请求
@property
(
nonatomic
,
copy
)
NSString
*
showTimeShowEndRequestedRoundId
;
/// 标记限时表演流程中是否移除了底部 Tool2(用于结束/取消后恢复)
@property
(
nonatomic
,
assign
)
BOOL
showTimeDidRemoveTool2
;
@end
@end
@implementation
FUSLiveChatInputHelper
@implementation
FUSLiveChatInputHelper
...
@@ -103,6 +110,8 @@
...
@@ -103,6 +110,8 @@
_showTimeReadyShowStartRequestedRoundId
=
@""
;
_showTimeReadyShowStartRequestedRoundId
=
@""
;
_isRequestingShowTimeReadyShowStart
=
NO
;
_isRequestingShowTimeReadyShowStart
=
NO
;
_showTimeAnchorPopupRemainingSeconds
=
-
1
;
_showTimeAnchorPopupRemainingSeconds
=
-
1
;
_showTimeShowEndRequestedRoundId
=
@""
;
_showTimeDidRemoveTool2
=
NO
;
[
self
registerReceiptNotification
];
[
self
registerReceiptNotification
];
...
@@ -229,6 +238,71 @@
...
@@ -229,6 +238,71 @@
}
}
[
strongSelf
fus_presentShowTimeTicketContributionPopupFromBar
:
strongBar
];
[
strongSelf
fus_presentShowTimeTicketContributionPopupFromBar
:
strongBar
];
};
};
bar
.
performanceCountdownEndHandler
=
^
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
return
;
}
[
strongSelf
fus_onShowTimePerformanceCountdownEnd
];
};
}
/// 表演阶段倒计时结束:调用结束接口并移除磨砂条
-
(
void
)
fus_onShowTimePerformanceCountdownEnd
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
return
;
}
NSString
*
roundId
=
self
.
showTimeRoundId
;
if
([
NSString
isNull
:
roundId
])
{
return
;
}
if
(
!
[
NSString
isNull
:
self
.
showTimeShowEndRequestedRoundId
]
&&
[
self
.
showTimeShowEndRequestedRoundId
isEqualToString
:
roundId
])
{
return
;
}
self
.
showTimeShowEndRequestedRoundId
=
roundId
;
[
self
fus_destroyShowTimeFrostedIfNeeded
];
self
.
showTimeStageStatus
=
9999
;
self
.
showTimeCountdownRemainSeconds
=
0
;
[
self
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
FUSRoomInfoModel
*
roomInfoModel
=
FUSLiveHelper
.
shareInstance
.
roomInfoModel
;
NSString
*
roomId
=
roomInfoModel
.
roomId
;
NSString
*
channelId
=
roomInfoModel
.
channelId
;
if
([
NSString
isNull
:
roomId
]
||
[
NSString
isNull
:
channelId
])
{
return
;
}
[
FUSLiveHttpHelper
fus_ticketShowShowEndWithRoomId
:
roomId
channelId
:
channelId
roundId
:
roundId
succeed
:^
(
FUSTicketShowCollectTicketToggleResultModel
*
_Nonnull
model
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
UIView
*
containerView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
if
(
!
containerView
)
{
containerView
=
[
UIViewController
fus_topViewController
].
view
;
}
if
(
!
containerView
)
{
return
;
}
NSInteger
safeFinalTicketNum
=
MAX
(
0
,
model
.
finalTicketNum
);
FUSOnlineUserModel
*
mvpUser
=
model
.
mvpInfo
.
mvpUserInfo
;
NSString
*
mvpUserId
=
[
NSString
stringWithObject
:
model
.
mvpInfo
.
mvpUserId
];
NSString
*
avatarURL
=
(
mvpUser
.
face
.
length
>
0
?
mvpUser
.
face
:
nil
);
NSString
*
nickname
=
nil
;
if
(
mvpUser
.
nickname
.
length
>
0
)
{
nickname
=
mvpUser
.
nickname
;
}
else
if
(
mvpUser
.
uid
.
length
>
0
)
{
nickname
=
mvpUser
.
uid
;
}
else
if
(
!
[
NSString
isNull
:
mvpUserId
])
{
nickname
=
mvpUserId
;
}
FUSLiveShowTimeMVPConfirmPopView
*
popView
=
[
FUSLiveShowTimeMVPConfirmPopView
fus_showOnView
:
containerView
];
[
popView
fus_updateTicketCount
:
safeFinalTicketNum
];
[
popView
fus_updateAvatarURL
:
avatarURL
nickname
:
nickname
tagText
:
@"MVP"
];
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
}];
}
}
/// 展示“票的贡献”弹窗,并拉取贡献列表数据
/// 展示“票的贡献”弹窗,并拉取贡献列表数据
...
@@ -345,6 +419,7 @@
...
@@ -345,6 +419,7 @@
if
(
dataType
==
9999
)
{
if
(
dataType
==
9999
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
fus_destroyShowTimeFrostedIfNeeded
];
[
self
fus_destroyShowTimeFrostedIfNeeded
];
[
self
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
});
});
return
;
return
;
}
}
...
@@ -374,7 +449,15 @@
...
@@ -374,7 +449,15 @@
NSInteger
previousFinalTicketNum
=
self
.
showTimeLastFinalTicketNum
;
NSInteger
previousFinalTicketNum
=
self
.
showTimeLastFinalTicketNum
;
NSString
*
incomingRoundId
=
(
model
.
stageData
.
roundId
.
length
>
0
?
model
.
stageData
.
roundId
:
model
.
roundId
);
NSString
*
incomingRoundId
=
(
model
.
stageData
.
roundId
.
length
>
0
?
model
.
stageData
.
roundId
:
model
.
roundId
);
self
.
showTimeRoundId
=
(
incomingRoundId
.
length
>
0
?
incomingRoundId
:
@""
);
self
.
showTimeRoundId
=
(
incomingRoundId
.
length
>
0
?
incomingRoundId
:
@""
);
if
(
previousRoundId
.
length
>
0
&&
!
[
previousRoundId
isEqualToString
:
self
.
showTimeRoundId
])
{
self
.
showTimeShowEndRequestedRoundId
=
@""
;
}
NSInteger
stageStatus
=
(
model
.
stageData
?
model
.
stageData
.
showStatus
:
model
.
showStatus
);
NSInteger
stageStatus
=
(
model
.
stageData
?
model
.
stageData
.
showStatus
:
model
.
showStatus
);
if
(
stageStatus
==
9999
)
{
[
self
fus_destroyShowTimeFrostedIfNeeded
];
[
self
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
return
;
}
self
.
showTimeStageStatus
=
stageStatus
;
self
.
showTimeStageStatus
=
stageStatus
;
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
)
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
)
{
...
@@ -412,20 +495,11 @@
...
@@ -412,20 +495,11 @@
cancelSelf
.
showTimeRoundId
=
@""
;
cancelSelf
.
showTimeRoundId
=
@""
;
cancelSelf
.
showTimeLastFinalTicketNum
=
-
1
;
cancelSelf
.
showTimeLastFinalTicketNum
=
-
1
;
cancelSelf
.
showTimeStageStatus
=
-
1
;
cancelSelf
.
showTimeStageStatus
=
-
1
;
cancelSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
cancelSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
cancelSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
cancelSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
cancelSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
cancelSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
cancelSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
)
{
FUSLiveBottomToolView
*
bottomToolView
=
[
cancelSelf
fus_currentBottomToolView
];
if
(
bottomToolView
)
{
BOOL
hasTool2
=
!
CGRectEqualToRect
([
bottomToolView
fus_getBtnFrameWithToolType
:
FUSLiveBottomToolTypeTool2
],
CGRectZero
);
if
(
!
hasTool2
)
{
[
bottomToolView
fus_insertBtnWithType
:
FUSLiveBottomToolTypeTool2
index
:
2
];
}
[
bottomToolView
fus_updateRoomScoreType
];
}
}
// 取消成功后弹出磨砂卡片,展示最终集票数
// 取消成功后弹出磨砂卡片,展示最终集票数
UIView
*
onView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
UIView
*
onView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
...
@@ -988,6 +1062,24 @@
...
@@ -988,6 +1062,24 @@
return
nil
;
return
nil
;
}
}
-
(
void
)
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
return
;
}
FUSLiveBottomToolView
*
bottomToolView
=
[
self
fus_currentBottomToolView
];
if
(
!
bottomToolView
)
{
return
;
}
if
(
self
.
showTimeDidRemoveTool2
)
{
BOOL
hasTool2
=
!
CGRectEqualToRect
([
bottomToolView
fus_getBtnFrameWithToolType
:
FUSLiveBottomToolTypeTool2
],
CGRectZero
);
if
(
!
hasTool2
)
{
[
bottomToolView
fus_insertBtnWithType
:
FUSLiveBottomToolTypeTool2
index
:
2
];
}
self
.
showTimeDidRemoveTool2
=
NO
;
}
[
bottomToolView
fus_updateRoomScoreType
];
}
-
(
NSString
*
)
fus_toastTextForBlockingRoomScopeSetting
{
-
(
NSString
*
)
fus_toastTextForBlockingRoomScopeSetting
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
return
nil
;
return
nil
;
...
@@ -1111,6 +1203,7 @@
...
@@ -1111,6 +1203,7 @@
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
&&
weakBottomToolView
)
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
&&
weakBottomToolView
)
{
[
weakBottomToolView
fus_removeBtnWithType
:
FUSLiveBottomToolTypeTool2
];
[
weakBottomToolView
fus_removeBtnWithType
:
FUSLiveBottomToolTypeTool2
];
innerSelf
.
showTimeDidRemoveTool2
=
YES
;
UIImage
*
ticketImage
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_bottom_ticket"
];
UIImage
*
ticketImage
=
[
FUSShowRoomCenterBunble
imageNamed
:
@"Live_bottom_ticket"
];
if
(
ticketImage
)
{
if
(
ticketImage
)
{
[
weakBottomToolView
fus_updateBtnImageWithType
:
FUSLiveBottomToolTypeRoomScope
image
:
ticketImage
state
:
UIControlStateNormal
];
[
weakBottomToolView
fus_updateBtnImageWithType
:
FUSLiveBottomToolTypeRoomScope
image
:
ticketImage
state
:
UIControlStateNormal
];
...
@@ -1122,6 +1215,7 @@
...
@@ -1122,6 +1215,7 @@
innerSelf
.
showTimeFrostedView
=
bar
;
innerSelf
.
showTimeFrostedView
=
bar
;
innerSelf
.
showTimeRoundId
=
model
.
stageData
.
roundId
?:
@""
;
innerSelf
.
showTimeRoundId
=
model
.
stageData
.
roundId
?:
@""
;
innerSelf
.
showTimeStageStatus
=
(
model
.
stageData
?
model
.
stageData
.
showStatus
:
model
.
showStatus
);
innerSelf
.
showTimeStageStatus
=
(
model
.
stageData
?
model
.
stageData
.
showStatus
:
model
.
showStatus
);
innerSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
[
innerSelf
fus_bindShowTimeFrostedAvatarTapHandlerIfNeeded
:
bar
];
[
innerSelf
fus_bindShowTimeFrostedAvatarTapHandlerIfNeeded
:
bar
];
__weak
typeof
(
innerSelf
)
weakInnerSelf
=
innerSelf
;
__weak
typeof
(
innerSelf
)
weakInnerSelf
=
innerSelf
;
...
@@ -1142,12 +1236,8 @@
...
@@ -1142,12 +1236,8 @@
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
cancelSelf
.
showTimeRoundId
=
@""
;
cancelSelf
.
showTimeRoundId
=
@""
;
cancelSelf
.
showTimeStageStatus
=
-
1
;
cancelSelf
.
showTimeStageStatus
=
-
1
;
if
(
FUSLiveHelper
.
shareInstance
.
liveType
==
FUSLiveTypeAnchor
&&
weakBottomToolView
)
{
cancelSelf
.
showTimeDidRemoveTool2
=
tool2ExistedBeforeStart
;
if
(
tool2ExistedBeforeStart
)
{
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
[
weakBottomToolView
fus_insertBtnWithType
:
FUSLiveBottomToolTypeTool2
index
:
2
];
}
[
weakBottomToolView
fus_updateRoomScoreType
];
}
// 取消成功后弹出磨砂卡片,展示最终集票数
// 取消成功后弹出磨砂卡片,展示最终集票数
UIView
*
onView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
UIView
*
onView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
...
@@ -1574,6 +1664,7 @@
...
@@ -1574,6 +1664,7 @@
NSString
*
incomingRoundId
=
(
model
.
stageData
.
roundId
.
length
>
0
?
model
.
stageData
.
roundId
:
model
.
roundId
);
NSString
*
incomingRoundId
=
(
model
.
stageData
.
roundId
.
length
>
0
?
model
.
stageData
.
roundId
:
model
.
roundId
);
strongSelf
.
showTimeRoundId
=
(
incomingRoundId
.
length
>
0
?
incomingRoundId
:
@""
);
strongSelf
.
showTimeRoundId
=
(
incomingRoundId
.
length
>
0
?
incomingRoundId
:
@""
);
strongSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
NSInteger
target
=
MAX
(
0
,
model
.
targetTicketNum
);
NSInteger
target
=
MAX
(
0
,
model
.
targetTicketNum
);
NSInteger
finalNum
=
MAX
(
0
,
model
.
finalTicketNum
);
NSInteger
finalNum
=
MAX
(
0
,
model
.
finalTicketNum
);
...
@@ -1805,10 +1896,13 @@
...
@@ -1805,10 +1896,13 @@
strongSelf
.
showTimeCountdownRemainSeconds
=
-
1
;
strongSelf
.
showTimeCountdownRemainSeconds
=
-
1
;
strongSelf
.
showTimeTargetTicketNum
=
-
1
;
strongSelf
.
showTimeTargetTicketNum
=
-
1
;
strongSelf
.
showTimeStageStatus
=
-
1
;
strongSelf
.
showTimeStageStatus
=
-
1
;
strongSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
strongSelf
.
showTimeDidRemoveTool2
=
YES
;
strongSelf
.
showTimeMvpNeedTicketCount
=
-
1
;
strongSelf
.
showTimeMvpNeedTicketCount
=
-
1
;
strongSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
strongSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
strongSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
strongSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
strongSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
strongSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
[
strongSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
});
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.h
View file @
7c0eaf49
...
@@ -74,7 +74,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
...
@@ -74,7 +74,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
newTicketCount
:(
NSInteger
)
newTicketCount
newTicketCount
:(
NSInteger
)
newTicketCount
giftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
giftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
mvpUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
mvpUserModel
;
mvpUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
mvpUserModel
;
/// 更新顶部赠票用户信息(新票贡献时调用)
/// @param giftUserModel 赠票用户信息
/// @param newTicketCount 新票数
-
(
void
)
fus_updateTopTicketInfoWithGiftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
-
(
void
)
fus_updateTopTicketInfoWithGiftUserModel
:(
FUSOnlineUserModel
*
_Nullable
)
giftUserModel
newTicketCount
:(
NSInteger
)
newTicketCount
;
newTicketCount
:(
NSInteger
)
newTicketCount
;
...
@@ -96,6 +98,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
...
@@ -96,6 +98,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
/// 点击顶部头像回调(抛到外层处理:如展示“票的贡献”弹窗)
/// 点击顶部头像回调(抛到外层处理:如展示“票的贡献”弹窗)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
avatarTapHandler
)(
FUSLiveShowTimeCollectFrostedAvatarTapType
tapType
);
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
avatarTapHandler
)(
FUSLiveShowTimeCollectFrostedAvatarTapType
tapType
);
/// 表演倒计时结束回调(仅 stageStatus=2 且倒计时归零时触发)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
performanceCountdownEndHandler
)(
void
);
/// 移除磨砂条
/// 移除磨砂条
-
(
void
)
fus_dismiss
;
-
(
void
)
fus_dismiss
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
View file @
7c0eaf49
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#import "FUSOnlineUserModel.h"
#import "FUSOnlineUserModel.h"
static
const
CGFloat
kFUSShowTimeFrostedHeight
=
120
.
0
;
static
const
CGFloat
kFUSShowTimeFrostedHeight
=
120
.
0
;
static
const
NSInteger
kFUSShowTimeCollectSeconds
=
10
*
60
;
static
const
NSInteger
kFUSShowTimeCollectSeconds
=
60
;
@interface
FUSShowTimePaddingLabel
:
UILabel
@interface
FUSShowTimePaddingLabel
:
UILabel
@property
(
nonatomic
,
assign
)
UIEdgeInsets
textInsets
;
@property
(
nonatomic
,
assign
)
UIEdgeInsets
textInsets
;
...
@@ -100,6 +100,9 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
...
@@ -100,6 +100,9 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
/// 倒计时刷新计时器
/// 倒计时刷新计时器
@property
(
nonatomic
,
strong
)
dispatch_source_t
countdownTimer
;
@property
(
nonatomic
,
strong
)
dispatch_source_t
countdownTimer
;
/// 标记倒计时归零事件是否已回调,避免重复触发
@property
(
nonatomic
,
assign
)
BOOL
didNotifyPerformanceCountdownEnd
;
@end
@end
@implementation
FUSLiveShowTimeCollectFrostedView
@implementation
FUSLiveShowTimeCollectFrostedView
...
@@ -654,6 +657,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
...
@@ -654,6 +657,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
-
(
void
)
setStageStatus
:
(
NSInteger
)
stageStatus
{
-
(
void
)
setStageStatus
:
(
NSInteger
)
stageStatus
{
_stageStatus
=
stageStatus
;
_stageStatus
=
stageStatus
;
self
.
didNotifyPerformanceCountdownEnd
=
NO
;
self
.
statusTagLabel
.
text
=
@""
;
self
.
statusTagLabel
.
text
=
@""
;
self
.
statusTagLabel
.
hidden
=
YES
;
self
.
statusTagLabel
.
hidden
=
YES
;
[
self
fus_applyBottomInfoLayout
];
[
self
fus_applyBottomInfoLayout
];
...
@@ -710,6 +714,12 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
...
@@ -710,6 +714,12 @@ static const NSInteger kFUSShowTimeCollectSeconds = 10 * 60;
if
(
remain
<=
0
)
{
if
(
remain
<=
0
)
{
self
.
countdownLabel
.
text
=
@"00:00"
;
self
.
countdownLabel
.
text
=
@"00:00"
;
[
self
fus_stopCountdownTimer
];
[
self
fus_stopCountdownTimer
];
if
(
self
.
stageStatus
==
2
&&
!
self
.
didNotifyPerformanceCountdownEnd
)
{
self
.
didNotifyPerformanceCountdownEnd
=
YES
;
if
(
self
.
performanceCountdownEndHandler
)
{
self
.
performanceCountdownEndHandler
();
}
}
return
;
return
;
}
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.h
View file @
7c0eaf49
...
@@ -2,13 +2,15 @@
...
@@ -2,13 +2,15 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
///
底部确认弹窗:展示 MVP 头像/标识/昵称
,仅“确认”可关闭
///
确认弹窗:展示“表演结束”/本场票数/MVP 信息
,仅“确认”可关闭
@interface
FUSLiveShowTimeMVPConfirmPopView
:
UIView
@interface
FUSLiveShowTimeMVPConfirmPopView
:
UIView
/// 展示到指定父视图(存在则复用)
/// 展示到指定父视图(存在则复用)
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
;
+
(
instancetype
)
fus_showOnView
:(
UIView
*
)
onView
;
/// 更新头像/昵称/MVP 标签文案
/// 更新头像/昵称/MVP 标签文案
-
(
void
)
fus_updateAvatarURL
:(
nullable
NSString
*
)
url
nickname
:(
nullable
NSString
*
)
nickname
tagText
:(
nullable
NSString
*
)
tagText
;
-
(
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
;
-
(
void
)
fus_setConfirmHandler
:(
void
(
^
)(
void
))
confirmHandler
;
/// 主动关闭弹窗
/// 主动关闭弹窗
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ShowTimePopups/FUSLiveShowTimeMVPConfirmPopView.m
View file @
7c0eaf49
...
@@ -9,13 +9,19 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -9,13 +9,19 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
/// 背景遮罩按钮(拦截点击,空白区域不关闭)
/// 背景遮罩按钮(拦截点击,空白区域不关闭)
@property
(
nonatomic
,
strong
)
UIButton
*
bgBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
bgBtn
;
///
底部
内容容器(白底圆角)
/// 内容容器(白底圆角)
@property
(
nonatomic
,
strong
)
UIView
*
contentView
;
@property
(
nonatomic
,
strong
)
UIView
*
contentView
;
/// 内容容器底约束(控制上/下滑动画)
/// 内容容器的中心Y约束(控制入场/退场动画)
@property
(
nonatomic
,
strong
)
MASConstraint
*
contentBottomConstraint
;
@property
(
nonatomic
,
strong
)
MASConstraint
*
contentCenterYConstraint
;
/// 头部占位视图(用于头像悬停效果)
/// 标题灰色背景(高度 45)
@property
(
nonatomic
,
strong
)
UIView
*
headerHolderView
;
@property
(
nonatomic
,
strong
)
UIView
*
titleBgView
;
/// 标题:表演结束
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
/// 小标题:本场票数
@property
(
nonatomic
,
strong
)
UILabel
*
subtitleLabel
;
/// 票数值
@property
(
nonatomic
,
strong
)
UILabel
*
ticketCountLabel
;
/// MVP 头像
/// MVP 头像
@property
(
nonatomic
,
strong
)
UIImageView
*
avatarView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
avatarView
;
/// MVP 标识标签
/// MVP 标识标签
...
@@ -29,6 +35,8 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -29,6 +35,8 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
/// 确认回调
/// 确认回调
@property
(
nonatomic
,
copy
)
void
(
^
confirmHandler
)(
void
);
@property
(
nonatomic
,
copy
)
void
(
^
confirmHandler
)(
void
);
@property
(
nonatomic
,
assign
)
BOOL
didAnimateIn
;
@end
@end
@implementation
FUSLiveShowTimeMVPConfirmPopView
@implementation
FUSLiveShowTimeMVPConfirmPopView
...
@@ -54,45 +62,63 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -54,45 +62,63 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
!
self
)
return
nil
;
if
(
!
self
)
return
nil
;
self
.
didAnimateIn
=
NO
;
self
.
bgBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
bgBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
bgBtn
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
alpha
:
0
.
35
];
self
.
bgBtn
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
alpha
:
0
.
35
];
[
self
addSubview
:
self
.
bgBtn
];
[
self
addSubview
:
self
.
bgBtn
];
CGFloat
safeBottom
=
UIView
.
fus_SafeBottom
;
CGFloat
contentH
=
MIN
(
300
,
UIView
.
fus_screenH
*
0
.
45
)
+
safeBottom
;
self
.
contentView
=
[[
UIView
alloc
]
init
];
self
.
contentView
=
[[
UIView
alloc
]
init
];
self
.
contentView
.
backgroundColor
=
UIColor
.
whiteColor
;
self
.
contentView
.
backgroundColor
=
UIColor
.
whiteColor
;
self
.
contentView
.
layer
.
cornerRadius
=
1
6
;
self
.
contentView
.
layer
.
cornerRadius
=
1
2
;
self
.
contentView
.
layer
.
masksToBounds
=
YES
;
self
.
contentView
.
layer
.
masksToBounds
=
YES
;
if
(
@available
(
iOS
11
.
0
,
*
))
{
self
.
contentView
.
layer
.
maskedCorners
=
kCALayerMinXMinYCorner
|
kCALayerMaxXMinYCorner
;
}
[
self
addSubview
:
self
.
contentView
];
[
self
addSubview
:
self
.
contentView
];
self
.
headerHolderView
=
[[
UIView
alloc
]
init
];
self
.
titleBgView
=
[[
UIView
alloc
]
init
];
[
self
.
contentView
addSubview
:
self
.
headerHolderView
];
self
.
titleBgView
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#F2F2F2"
];
[
self
.
contentView
addSubview
:
self
.
titleBgView
];
self
.
titleLabel
=
[[
UILabel
alloc
]
init
];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
titleLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
18
];
self
.
titleLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#333333"
];
self
.
titleLabel
.
text
=
[
NSString
fus_localString
:
@"表演结束"
];
[
self
.
titleBgView
addSubview
:
self
.
titleLabel
];
self
.
subtitleLabel
=
[[
UILabel
alloc
]
init
];
self
.
subtitleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
subtitleLabel
.
font
=
[
UIFont
fus_themeFont
:
15
];
self
.
subtitleLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#9AA0A6"
];
self
.
subtitleLabel
.
text
=
[
NSString
fus_localString
:
@"本场票数"
];
[
self
.
contentView
addSubview
:
self
.
subtitleLabel
];
self
.
ticketCountLabel
=
[[
UILabel
alloc
]
init
];
self
.
ticketCountLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
ticketCountLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
44
];
self
.
ticketCountLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#01D9E0"
];
self
.
ticketCountLabel
.
text
=
@"--"
;
[
self
.
contentView
addSubview
:
self
.
ticketCountLabel
];
self
.
avatarView
=
[[
UIImageView
alloc
]
init
];
self
.
avatarView
=
[[
UIImageView
alloc
]
init
];
self
.
avatarView
.
layer
.
cornerRadius
=
2
8
;
self
.
avatarView
.
layer
.
cornerRadius
=
2
5
;
self
.
avatarView
.
layer
.
masksToBounds
=
YES
;
self
.
avatarView
.
layer
.
masksToBounds
=
YES
;
self
.
avatarView
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
.
95
alpha
:
1
];
self
.
avatarView
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
.
95
alpha
:
1
];
[
self
addSubview
:
self
.
avatarView
];
self
.
avatarView
.
image
=
[
UIImage
fus_defaultIcon
];
[
self
.
contentView
addSubview
:
self
.
avatarView
];
self
.
mvpTagLabel
=
[[
UILabel
alloc
]
init
];
self
.
mvpTagLabel
=
[[
UILabel
alloc
]
init
];
self
.
mvpTagLabel
.
text
=
@"MVP"
;
self
.
mvpTagLabel
.
text
=
@"MVP"
;
self
.
mvpTagLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
mvpTagLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
mvpTagLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
12
];
self
.
mvpTagLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
12
];
self
.
mvpTagLabel
.
textColor
=
UIColor
.
blackColor
;
self
.
mvpTagLabel
.
textColor
=
UIColor
.
blackColor
;
self
.
mvpTagLabel
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#
52DDE2
"
];
self
.
mvpTagLabel
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#
01D9E0
"
];
self
.
mvpTagLabel
.
layer
.
cornerRadius
=
10
;
self
.
mvpTagLabel
.
layer
.
cornerRadius
=
10
;
self
.
mvpTagLabel
.
layer
.
masksToBounds
=
YES
;
self
.
mvpTagLabel
.
layer
.
masksToBounds
=
YES
;
[
self
.
contentView
addSubview
:
self
.
mvpTagLabel
];
[
self
.
contentView
addSubview
:
self
.
mvpTagLabel
];
self
.
nicknameLabel
=
[[
UILabel
alloc
]
init
];
self
.
nicknameLabel
=
[[
UILabel
alloc
]
init
];
self
.
nicknameLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
nicknameLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
nicknameLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
1
6
];
self
.
nicknameLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
1
5
];
self
.
nicknameLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#333333"
];
self
.
nicknameLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#333333"
];
[
self
.
contentView
addSubview
:
self
.
nicknameLabel
];
[
self
.
contentView
addSubview
:
self
.
nicknameLabel
];
...
@@ -100,8 +126,8 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -100,8 +126,8 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
[
self
.
confirmBtn
setTitle
:[
NSString
fus_localString
:
@"确认"
]
forState
:
UIControlStateNormal
];
[
self
.
confirmBtn
setTitle
:[
NSString
fus_localString
:
@"确认"
]
forState
:
UIControlStateNormal
];
self
.
confirmBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
16
];
self
.
confirmBtn
.
titleLabel
.
font
=
[
UIFont
fus_themeBoldFont
:
16
];
[
self
.
confirmBtn
setTitleColor
:
UIColor
.
blackColor
forState
:
UIControlStateNormal
];
[
self
.
confirmBtn
setTitleColor
:
UIColor
.
blackColor
forState
:
UIControlStateNormal
];
self
.
confirmBtn
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#
52DDE2
"
];
self
.
confirmBtn
.
backgroundColor
=
[
UIColor
colorWithHex
:
@"#
01D9E0
"
];
self
.
confirmBtn
.
layer
.
cornerRadius
=
2
4
;
self
.
confirmBtn
.
layer
.
cornerRadius
=
2
2
;
self
.
confirmBtn
.
layer
.
masksToBounds
=
YES
;
self
.
confirmBtn
.
layer
.
masksToBounds
=
YES
;
[
self
.
confirmBtn
addTarget
:
self
action
:
@selector
(
onConfirm
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
confirmBtn
addTarget
:
self
action
:
@selector
(
onConfirm
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
self
.
confirmBtn
];
[
self
.
contentView
addSubview
:
self
.
confirmBtn
];
...
@@ -110,46 +136,80 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -110,46 +136,80 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
make
.
edges
.
equalTo
(
self
);
make
.
edges
.
equalTo
(
self
);
}];
}];
[
self
.
contentView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
contentView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
equalTo
(
self
);
make
.
centerX
.
equalTo
(
self
);
make
.
height
.
mas_equalTo
(
contentH
);
self
.
contentCenterYConstraint
=
make
.
centerY
.
equalTo
(
self
).
offset
(
UIView
.
fus_screenH
);
self
.
contentBottomConstraint
=
make
.
bottom
.
equalTo
(
self
).
offset
(
contentH
);
make
.
width
.
equalTo
(
@295
).
priorityHigh
();
make
.
left
.
greaterThanOrEqualTo
(
self
).
offset
(
40
);
make
.
right
.
lessThanOrEqualTo
(
self
).
offset
(
-
40
);
make
.
height
.
mas_equalTo
(
290
);
}];
[
self
.
titleBgView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
left
.
right
.
equalTo
(
self
.
contentView
);
make
.
height
.
mas_equalTo
(
45
);
}];
[
self
.
titleLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
edges
.
equalTo
(
self
.
titleBgView
);
}];
[
self
.
subtitleLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
equalTo
(
self
.
titleBgView
.
mas_bottom
).
offset
(
16
);
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
16
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
16
);
make
.
height
.
mas_equalTo
(
16
);
}];
}];
[
self
.
headerHolderView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
ticketCountLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
equalTo
(
self
.
contentView
);
make
.
top
.
equalTo
(
self
.
subtitleLabel
.
mas_bottom
).
offset
(
2
);
make
.
top
.
equalTo
(
self
.
contentView
);
make
.
left
.
right
.
equalTo
(
self
.
subtitleLabel
);
make
.
height
.
mas_equalTo
(
48
);
make
.
height
.
mas_equalTo
(
52
);
}];
}];
[
self
.
avatarView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
avatarView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
.
contentView
);
make
.
centerX
.
equalTo
(
self
.
contentView
);
make
.
centerY
.
equalTo
(
self
.
contentView
.
mas_top
).
offset
(
0
);
make
.
top
.
equalTo
(
self
.
ticketCountLabel
.
mas_bottom
).
offset
(
8
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
5
6
,
56
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
5
0
,
50
));
}];
}];
[
self
.
mvpTagLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
mvpTagLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerX
.
equalTo
(
self
.
content
View
);
make
.
centerX
.
equalTo
(
self
.
avatar
View
);
make
.
top
.
equalTo
(
self
.
headerHolderView
.
mas_bottom
).
offset
(
16
);
make
.
top
.
equalTo
(
self
.
avatarView
.
mas_bottom
).
offset
(
-
8
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
54
,
20
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
54
,
20
));
}];
}];
[
self
.
nicknameLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
nicknameLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
16
);
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
16
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
16
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
16
);
make
.
top
.
equalTo
(
self
.
mvpTagLabel
.
mas_bottom
).
offset
(
8
);
make
.
top
.
equalTo
(
self
.
mvpTagLabel
.
mas_bottom
).
offset
(
6
);
make
.
height
.
mas_equalTo
(
2
2
);
make
.
height
.
mas_equalTo
(
2
0
);
}];
}];
[
self
.
confirmBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
confirmBtn
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
24
);
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
24
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
24
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
24
);
make
.
height
.
mas_equalTo
(
4
8
);
make
.
height
.
mas_equalTo
(
4
4
);
make
.
bottom
.
equalTo
(
self
.
contentView
).
offset
(
-
(
safeBottom
+
16
)
);
make
.
bottom
.
equalTo
(
self
.
contentView
).
offset
(
-
18
);
}];
}];
return
self
;
return
self
;
}
}
-
(
void
)
didMoveToSuperview
{
[
super
didMoveToSuperview
];
if
(
!
self
.
superview
||
self
.
didAnimateIn
)
{
return
;
}
self
.
didAnimateIn
=
YES
;
self
.
alpha
=
0
;
[
self
.
superview
layoutIfNeeded
];
[
self
.
contentCenterYConstraint
setOffset
:
0
];
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
self
.
alpha
=
1
;
[
self
.
superview
layoutIfNeeded
];
}];
}
/// 点击确认:回调并关闭弹窗
/// 点击确认:回调并关闭弹窗
-
(
void
)
onConfirm
{
-
(
void
)
onConfirm
{
if
(
self
.
confirmHandler
)
{
if
(
self
.
confirmHandler
)
{
...
@@ -167,6 +227,11 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -167,6 +227,11 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
self
.
mvpTagLabel
.
text
=
(
tagText
.
length
>
0
?
tagText
:
@"MVP"
);
self
.
mvpTagLabel
.
text
=
(
tagText
.
length
>
0
?
tagText
:
@"MVP"
);
}
}
-
(
void
)
fus_updateTicketCount
:
(
NSInteger
)
ticketCount
{
NSInteger
safeCount
=
MAX
(
0
,
ticketCount
);
self
.
ticketCountLabel
.
text
=
[
NSString
stringWithFormat
:
@"%zd"
,
(
NSInteger
)
safeCount
];
}
/// 设置确认按钮回调
/// 设置确认按钮回调
-
(
void
)
fus_setConfirmHandler
:
(
void
(
^
)(
void
))
confirmHandler
{
-
(
void
)
fus_setConfirmHandler
:
(
void
(
^
)(
void
))
confirmHandler
{
self
.
confirmHandler
=
[
confirmHandler
copy
];
self
.
confirmHandler
=
[
confirmHandler
copy
];
...
@@ -174,11 +239,10 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
...
@@ -174,11 +239,10 @@ static const NSInteger kFUSLiveShowTimeMVPConfirmPopViewTag = 8817401;
/// 关闭弹窗:下滑动画后移除
/// 关闭弹窗:下滑动画后移除
-
(
void
)
fus_dismiss
{
-
(
void
)
fus_dismiss
{
CGFloat
safeBottom
=
UIView
.
fus_SafeBottom
;
[
self
.
contentCenterYConstraint
setOffset
:
UIView
.
fus_screenH
];
CGFloat
contentH
=
MIN
(
300
,
UIView
.
fus_screenH
*
0
.
45
)
+
safeBottom
;
[
self
.
contentBottomConstraint
setOffset
:
contentH
];
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
[
self
layoutIfNeeded
];
self
.
alpha
=
0
;
[
self
.
superview
layoutIfNeeded
];
}
completion
:^
(
BOOL
finished
)
{
}
completion
:^
(
BOOL
finished
)
{
[
self
removeFromSuperview
];
[
self
removeFromSuperview
];
}];
}];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
7c0eaf49
...
@@ -596,6 +596,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -596,6 +596,9 @@ NS_ASSUME_NONNULL_BEGIN
/// Ticket Show - 功能 - 主播端开始/取消表演
/// Ticket Show - 功能 - 主播端开始/取消表演
+
(
NSString
*
)
fus_URL_TicketShow_Show_Toggle
;
+
(
NSString
*
)
fus_URL_TicketShow_Show_Toggle
;
/// Ticket Show - 功能 - 主播端表演结束
+
(
NSString
*
)
fus_URL_TicketShow_Show_End
;
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
;
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
7c0eaf49
...
@@ -982,6 +982,12 @@
...
@@ -982,6 +982,12 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/ticketshow/show/toggle"
];
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 - 视图 - 获取表演票的集票信息(观众端进房刷新)
/// Ticket Show - 视图 - 获取表演票的集票信息(观众端进房刷新)
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
+
(
NSString
*
)
fus_URL_TicketShow_Progress_GetInfo
{
{
...
...
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