Commit c023af92 by suolong

修复些uibug和pk漏洞

parent 9b29687f
...@@ -414,7 +414,7 @@ BDAlphaPlayerMetalViewDelegate ...@@ -414,7 +414,7 @@ BDAlphaPlayerMetalViewDelegate
} }
[self initContentView]; [self initContentView]; //头顶view
[self initCloseButton]; [self initCloseButton];
...@@ -507,7 +507,7 @@ BDAlphaPlayerMetalViewDelegate ...@@ -507,7 +507,7 @@ BDAlphaPlayerMetalViewDelegate
[self initEmitterView]; [self initEmitterView];
// 搭建顶部信息显示 View // 搭建顶部信息显示 View
[self initHeadView]; [self initHeadView]; //头顶view
// 搭建顶部露水增加 View // 搭建顶部露水增加 View
[self initDewIncreaseView]; [self initDewIncreaseView];
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@class FUSLiveHeaderUserListViewModel; @class FUSLiveHeaderUserListViewModel;
#define HEAD_VIEW_HEIGHT 135 #define HEAD_VIEW_HEIGHT 103//135
// 热力值变化通知 // 热力值变化通知
extern NSString * const kDidHotScoreChangeNotification; extern NSString * const kDidHotScoreChangeNotification;
......
...@@ -318,7 +318,15 @@ import SwiftyJSON ...@@ -318,7 +318,15 @@ import SwiftyJSON
case .inPunishTime: case .inPunishTime:
FUSSwiftLiveHelper.shared.pkHelper.getPKNextStep(retryTime: 3) FUSSwiftLiveHelper.shared.pkHelper.getPKNextStep(retryTime: 3)
case .inEndTime: case .inEndTime:
// finalResult是最终结果,如果是1的时候才调用ff_finishPK
if self.finalResult.value == 1 {
FUSSwiftLiveHelper.shared.pkHelper.fus_finishPK(type: .ok, normalHangUp: true, isRemoteFirstStop: false) FUSSwiftLiveHelper.shared.pkHelper.fus_finishPK(type: .ok, normalHangUp: true, isRemoteFirstStop: false)
} else {
// 其他结果调用更新pk信息
if let roomId = FUSSwiftLiveHelper.shared.roomInfoModel?.roomId {
FUSSwiftLiveHelper.shared.pkHelper.getRoomPKInfo(roomId: roomId, reconnect: 0)
}
}
} }
} }
......
...@@ -1239,11 +1239,13 @@ public extension FUSPKHelper { ...@@ -1239,11 +1239,13 @@ public extension FUSPKHelper {
guard let self = self else { return } guard let self = self else { return }
FUSLog.info("---------->上报服务器PK失败") FUSLog.info("---------->上报服务器PK失败")
FUSLog.info("suolong::: 断网弹窗") if code == -1000
//索隆:显示重试弹窗 {
print("suolong::: 断网弹窗")
self.handleNetworkFailure() self.handleNetworkFailure()
} }
} }
}
@objc func fus_ocFinishPk(type: Int, @objc func fus_ocFinishPk(type: Int,
reason: String, reason: String,
...@@ -1333,11 +1335,15 @@ public extension FUSPKHelper { ...@@ -1333,11 +1335,15 @@ public extension FUSPKHelper {
} }
} failure: {[weak self] msg, code in } failure: {[weak self] msg, code in
guard let self = self else { return } guard let self = self else { return }
FUSLog.info("suolong::: 断网弹窗")
FUSDialogView.fus_showDialog(msg) FUSDialogView.fus_showDialog(msg)
//索隆:显示重试弹窗
if code == -1000
{
print("suolong::: 断网弹窗")
self.handleNetworkFailure() self.handleNetworkFailure()
} }
} }
}
@objc func getRoomPKInfo(roomId:String,reconnect:Int) { @objc func getRoomPKInfo(roomId:String,reconnect:Int) {
...@@ -1720,9 +1726,11 @@ public extension FUSPKHelper { ...@@ -1720,9 +1726,11 @@ public extension FUSPKHelper {
} }
} failure: {[weak self] msg , code in } failure: {[weak self] msg , code in
self?.isRequestingPKNextStep = false self?.isRequestingPKNextStep = false
FUSLog.info("suolong::: 断网弹窗") if code == -1000
//索隆:显示重试弹窗 {
print("suolong::: 断网弹窗")
self?.handleNetworkFailure() self?.handleNetworkFailure()
}
failure?(msg, Int(code)) failure?(msg, Int(code))
...@@ -1773,9 +1781,11 @@ public extension FUSPKHelper { ...@@ -1773,9 +1781,11 @@ public extension FUSPKHelper {
success?() success?()
} failure: {[weak self] msg, code in } failure: {[weak self] msg, code in
FUSLoadingView.fus_dismissProgressView() FUSLoadingView.fus_dismissProgressView()
FUSLog.info("suolong::: 断网弹窗") if code == -1000
//索隆:显示重试弹窗 {
print("suolong::: 断网弹窗")
self?.handleNetworkFailure() self?.handleNetworkFailure()
}
failure?(msg, Int(code)) failure?(msg, Int(code))
} }
} }
...@@ -1799,11 +1809,7 @@ public extension FUSPKHelper { ...@@ -1799,11 +1809,7 @@ public extension FUSPKHelper {
// self.fus_finishPK(type: .localTimeoutConnectFail, normalHangUp: false, isRemoteFirstStop: false) // self.fus_finishPK(type: .localTimeoutConnectFail, normalHangUp: false, isRemoteFirstStop: false)
let localhansLink = self.viewModel.value.localAnchorModel.value.hasLink.value let localhansLink = self.viewModel.value.localAnchorModel.value.hasLink.value
let remotehansLink = self.viewModel.value.remoteAnchorModel.value.hasLink.value let remotehansLink = self.viewModel.value.remoteAnchorModel.value.hasLink.value
print("suolong::: 断网弹窗")
print("localhanslink + \(localhansLink) remotehansLink + \(remotehansLink)") print("localhanslink + \(localhansLink) remotehansLink + \(remotehansLink)")
//索隆:显示重试弹窗
// self.handleNetworkFailure()
if self.viewModel.value.localAnchorModel.value.hasLink.value == false { if self.viewModel.value.localAnchorModel.value.hasLink.value == false {
FUSDialogView.fus_showDialog(.fus_localString("PK连线失败")) FUSDialogView.fus_showDialog(.fus_localString("PK连线失败"))
} else if self.viewModel.value.remoteAnchorModel.value.hasLink.value == false { } else if self.viewModel.value.remoteAnchorModel.value.hasLink.value == false {
...@@ -1837,12 +1843,14 @@ public extension FUSPKHelper { ...@@ -1837,12 +1843,14 @@ public extension FUSPKHelper {
FUSLoadingIndicator.fus_dismiss() FUSLoadingIndicator.fus_dismiss()
FUSDialogView.fus_showDialog(msg) FUSDialogView.fus_showDialog(msg)
FUSLog.info("suolong::: 断网弹窗")
self?.isRequestingStartPKing = false self?.isRequestingStartPKing = false
//索隆:显示重试弹窗 if code == -1000
{
print("suolong::: 断网弹窗")
self?.handleNetworkFailure() self?.handleNetworkFailure()
} }
} }
}
/// 获取礼物暴击信息(建议仅在过了阶段但是又没有获取到最新结果的时候调取) /// 获取礼物暴击信息(建议仅在过了阶段但是又没有获取到最新结果的时候调取)
func fus_reloadPKGiftbombInfo(success:(() -> Void)? = nil, func fus_reloadPKGiftbombInfo(success:(() -> Void)? = nil,
...@@ -1869,9 +1877,11 @@ public extension FUSPKHelper { ...@@ -1869,9 +1877,11 @@ public extension FUSPKHelper {
self.viewModel.value.giftBombModel.accept(.createFrom(json["vsGiftBomb"])) self.viewModel.value.giftBombModel.accept(.createFrom(json["vsGiftBomb"]))
} failure: {[weak self] msg, code in } failure: {[weak self] msg, code in
FUSLog.info("suolong::: 断网弹窗") if code == -1000
//索隆:显示重试弹窗 {
print("suolong::: 断网弹窗")
self?.handleNetworkFailure() self?.handleNetworkFailure()
}
failure?(msg, code) failure?(msg, code)
FUSDialogView.fus_showDialog(msg) FUSDialogView.fus_showDialog(msg)
......
...@@ -56,8 +56,8 @@ class FUSPKAnchorView: FUSBaseView { ...@@ -56,8 +56,8 @@ class FUSPKAnchorView: FUSBaseView {
self.muteUserBtn.layer.cornerRadius = 10 self.muteUserBtn.layer.cornerRadius = 10
self.muteUserBtn.layer.masksToBounds = true self.muteUserBtn.layer.masksToBounds = true
self.muteUserBtn.backgroundColor = .init(white: 0, alpha: 0.28) self.muteUserBtn.backgroundColor = .init(white: 0, alpha: 0.28)
self.muteUserBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_remote_anchor_mute"), for: .normal) self.muteUserBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_remote_anchor_cancel_mute"), for: .normal)
self.muteUserBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_remote_anchor_cancel_mute"), for: .selected) self.muteUserBtn.setImage(FUSShowRoomCenterBunble.imageNamed("live_pk_remote_anchor_mute"), for: .selected)
self.infoView.addSubview(self.muteUserBtn) self.infoView.addSubview(self.muteUserBtn)
......
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