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
b6f574a1
authored
Mar 25, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复处理倒计时结束没调用api问题
parent
7c0eaf49
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
19 deletions
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/FUSLiveChatInputHelper.m
View file @
b6f574a1
...
@@ -305,6 +305,45 @@
...
@@ -305,6 +305,45 @@
}];
}];
}
}
-
(
void
)
fus_onTicketCollectCountdownEnd
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
return
;
}
NSString
*
roundId
=
self
.
showTimeRoundId
;
if
([
NSString
isNull
:
roundId
])
{
return
;
}
FUSRoomInfoModel
*
roomInfoModel
=
FUSLiveHelper
.
shareInstance
.
roomInfoModel
;
NSString
*
roomId
=
roomInfoModel
.
roomId
;
NSString
*
channelId
=
roomInfoModel
.
channelId
;
if
([
NSString
isNull
:
roomId
]
||
[
NSString
isNull
:
channelId
])
{
return
;
}
__weak
typeof
(
self
)
weakSelf
=
self
;
[
FUSLiveHttpHelper
fus_ticketShowCollectTicketToggleWithRoomId
:
roomId
channelId
:
channelId
toggleType
:-
1
roundId
:
roundId
ticketTargetNum
:
0
showTheme
:
nil
succeed
:^
(
FUSTicketShowCollectTicketToggleResultModel
*
_Nonnull
cancelModel
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
return
;
}
[
strongSelf
fus_destroyShowTimeFrostedIfNeeded
];
[
strongSelf
fus_resetShowTimeStateValues
];
[
strongSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
UIView
*
onView
=
[[
FUSLiveHelper
shareInstance
].
currentFunctionView
fus_viewWithLayer
:
FUSLiveFunctionLayerManualPopView
];
if
(
!
onView
)
onView
=
[
UIViewController
fus_topViewController
].
view
;
if
(
!
onView
)
return
;
FUSLiveShowTimeFrostCardPopView
*
pop
=
[
FUSLiveShowTimeFrostCardPopView
fus_showOnView
:
onView
];
[
pop
fus_updateFinalTicketNum
:
cancelModel
.
finalTicketNum
];
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSString
*
toastMsg
=
([
NSString
isNull
:
msg
]
?
[
NSString
fus_localString
:
@"取消失败"
]
:
msg
);
[
FUSDialogView
fus_showDialog
:
toastMsg
];
});
}];
}
/// 展示“票的贡献”弹窗,并拉取贡献列表数据
/// 展示“票的贡献”弹窗,并拉取贡献列表数据
-
(
void
)
fus_presentShowTimeTicketContributionPopupFromBar
:
(
FUSLiveShowTimeCollectFrostedView
*
)
bar
{
-
(
void
)
fus_presentShowTimeTicketContributionPopupFromBar
:
(
FUSLiveShowTimeCollectFrostedView
*
)
bar
{
(
void
)
bar
;
(
void
)
bar
;
...
@@ -419,6 +458,7 @@
...
@@ -419,6 +458,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_resetShowTimeStateValues
];
[
self
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
[
self
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
});
});
return
;
return
;
...
@@ -466,6 +506,17 @@
...
@@ -466,6 +506,17 @@
bar
.
actionTitle
=
nil
;
bar
.
actionTitle
=
nil
;
bar
.
stageStatus
=
stageStatus
;
bar
.
stageStatus
=
stageStatus
;
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
if
(
stageStatus
==
0
)
{
bar
.
collectCountdownEndHandler
=
^
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
if
(
!
strongSelf
)
{
return
;
}
[
strongSelf
fus_onTicketCollectCountdownEnd
];
};
}
else
{
bar
.
collectCountdownEndHandler
=
nil
;
}
bar
.
cancelHandler
=
^
{
bar
.
cancelHandler
=
^
{
__strong
typeof
(
weakSelf
)
cancelSelf
=
weakSelf
;
__strong
typeof
(
weakSelf
)
cancelSelf
=
weakSelf
;
if
(
!
cancelSelf
)
{
if
(
!
cancelSelf
)
{
...
@@ -492,13 +543,7 @@
...
@@ -492,13 +543,7 @@
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSLoadingView
fus_dismissProgressView
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
cancelSelf
.
showTimeRoundId
=
@""
;
[
cancelSelf
fus_resetShowTimeStateValues
];
cancelSelf
.
showTimeLastFinalTicketNum
=
-
1
;
cancelSelf
.
showTimeStageStatus
=
-
1
;
cancelSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
cancelSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
cancelSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
cancelSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
// 取消成功后弹出磨砂卡片,展示最终集票数
// 取消成功后弹出磨砂卡片,展示最终集票数
...
@@ -1062,6 +1107,19 @@
...
@@ -1062,6 +1107,19 @@
return
nil
;
return
nil
;
}
}
-
(
void
)
fus_resetShowTimeStateValues
{
self
.
showTimeRoundId
=
@""
;
self
.
showTimeLastFinalTicketNum
=
-
1
;
self
.
showTimeCountdownRemainSeconds
=
-
1
;
self
.
showTimeTargetTicketNum
=
-
1
;
self
.
showTimeStageStatus
=
-
1
;
self
.
showTimeShowEndRequestedRoundId
=
@""
;
self
.
showTimeMvpNeedTicketCount
=
-
1
;
self
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
self
.
isRequestingShowTimeReadyShowStart
=
NO
;
self
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
}
-
(
void
)
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
{
-
(
void
)
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
if
(
FUSLiveHelper
.
shareInstance
.
liveType
!=
FUSLiveTypeAnchor
)
{
return
;
return
;
...
@@ -1234,8 +1292,7 @@
...
@@ -1234,8 +1292,7 @@
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSLoadingView
fus_dismissProgressView
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
[
cancelSelf
fus_destroyShowTimeFrostedIfNeeded
];
cancelSelf
.
showTimeRoundId
=
@""
;
[
cancelSelf
fus_resetShowTimeStateValues
];
cancelSelf
.
showTimeStageStatus
=
-
1
;
cancelSelf
.
showTimeDidRemoveTool2
=
tool2ExistedBeforeStart
;
cancelSelf
.
showTimeDidRemoveTool2
=
tool2ExistedBeforeStart
;
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
[
cancelSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
...
@@ -1891,17 +1948,8 @@
...
@@ -1891,17 +1948,8 @@
[
popToDismiss
fus_dismiss
];
[
popToDismiss
fus_dismiss
];
}
}
[
strongSelf
fus_destroyShowTimeFrostedIfNeeded
];
[
strongSelf
fus_destroyShowTimeFrostedIfNeeded
];
strongSelf
.
showTimeRoundId
=
@""
;
[
strongSelf
fus_resetShowTimeStateValues
];
strongSelf
.
showTimeLastFinalTicketNum
=
-
1
;
strongSelf
.
showTimeCountdownRemainSeconds
=
-
1
;
strongSelf
.
showTimeTargetTicketNum
=
-
1
;
strongSelf
.
showTimeStageStatus
=
-
1
;
strongSelf
.
showTimeShowEndRequestedRoundId
=
@""
;
strongSelf
.
showTimeDidRemoveTool2
=
YES
;
strongSelf
.
showTimeDidRemoveTool2
=
YES
;
strongSelf
.
showTimeMvpNeedTicketCount
=
-
1
;
strongSelf
.
showTimeReadyShowStartRequestedRoundId
=
@""
;
strongSelf
.
isRequestingShowTimeReadyShowStart
=
NO
;
strongSelf
.
showTimeAnchorPopupRemainingSeconds
=
-
1
;
[
strongSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
[
strongSelf
fus_restoreBottomToolButtonsAfterShowTimeIfNeeded
];
});
});
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
}
failure
:^
(
NSString
*
_Nonnull
msg
,
NSInteger
code
)
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.h
View file @
b6f574a1
...
@@ -101,6 +101,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
...
@@ -101,6 +101,9 @@ typedef NS_ENUM(NSInteger, FUSLiveShowTimeCollectFrostedAvatarTapType) {
/// 表演倒计时结束回调(仅 stageStatus=2 且倒计时归零时触发)
/// 表演倒计时结束回调(仅 stageStatus=2 且倒计时归零时触发)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
performanceCountdownEndHandler
)(
void
);
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
performanceCountdownEndHandler
)(
void
);
/// 集票倒计时结束回调(仅 stageStatus=0 且倒计时归零时触发)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
collectCountdownEndHandler
)(
void
);
/// 移除磨砂条
/// 移除磨砂条
-
(
void
)
fus_dismiss
;
-
(
void
)
fus_dismiss
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/ChatInputView/FUSLiveShowTimeCollectFrostedView.m
View file @
b6f574a1
...
@@ -102,6 +102,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
...
@@ -102,6 +102,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
/// 标记倒计时归零事件是否已回调,避免重复触发
/// 标记倒计时归零事件是否已回调,避免重复触发
@property
(
nonatomic
,
assign
)
BOOL
didNotifyPerformanceCountdownEnd
;
@property
(
nonatomic
,
assign
)
BOOL
didNotifyPerformanceCountdownEnd
;
@property
(
nonatomic
,
assign
)
BOOL
didNotifyCollectCountdownEnd
;
@end
@end
...
@@ -658,6 +659,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
...
@@ -658,6 +659,7 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
-
(
void
)
setStageStatus
:
(
NSInteger
)
stageStatus
{
-
(
void
)
setStageStatus
:
(
NSInteger
)
stageStatus
{
_stageStatus
=
stageStatus
;
_stageStatus
=
stageStatus
;
self
.
didNotifyPerformanceCountdownEnd
=
NO
;
self
.
didNotifyPerformanceCountdownEnd
=
NO
;
self
.
didNotifyCollectCountdownEnd
=
NO
;
self
.
statusTagLabel
.
text
=
@""
;
self
.
statusTagLabel
.
text
=
@""
;
self
.
statusTagLabel
.
hidden
=
YES
;
self
.
statusTagLabel
.
hidden
=
YES
;
[
self
fus_applyBottomInfoLayout
];
[
self
fus_applyBottomInfoLayout
];
...
@@ -720,6 +722,12 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
...
@@ -720,6 +722,12 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60;
self
.
performanceCountdownEndHandler
();
self
.
performanceCountdownEndHandler
();
}
}
}
}
if
(
self
.
stageStatus
==
0
&&
!
self
.
didNotifyCollectCountdownEnd
)
{
self
.
didNotifyCollectCountdownEnd
=
YES
;
if
(
self
.
collectCountdownEndHandler
)
{
self
.
collectCountdownEndHandler
();
}
}
return
;
return
;
}
}
...
...
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