Commit c0758565 by ludi

补充一些洗代码

parent 424e9bed
Showing with 30 additions and 71 deletions
...@@ -6030,7 +6030,7 @@ ...@@ -6030,7 +6030,7 @@
path = PKReasultAnimate; path = PKReasultAnimate;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
00E2A8182F21C44C003B779E /* FFUserGuideTipsView */ = { 00E2A8182F21C44C003B779E /* UserGuideTipsView */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
00E2A8142F21C44C003B779E /* FUSUserGuideCloseInfoAlertView.swift */, 00E2A8142F21C44C003B779E /* FUSUserGuideCloseInfoAlertView.swift */,
...@@ -6038,7 +6038,7 @@ ...@@ -6038,7 +6038,7 @@
00E2A8162F21C44C003B779E /* FUSUserGuideTipsView.swift */, 00E2A8162F21C44C003B779E /* FUSUserGuideTipsView.swift */,
00E2A8172F21C44C003B779E /* RectRadarAnimationView.swift */, 00E2A8172F21C44C003B779E /* RectRadarAnimationView.swift */,
); );
path = FFUserGuideTipsView; path = UserGuideTipsView;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
00E6CB202F4E9AB800B63797 /* FUSPunishment */ = { 00E6CB202F4E9AB800B63797 /* FUSPunishment */ = {
...@@ -7196,7 +7196,7 @@ ...@@ -7196,7 +7196,7 @@
BED657A62C5B745D00668116 /* FunctionView */ = { BED657A62C5B745D00668116 /* FunctionView */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
00E2A8182F21C44C003B779E /* FFUserGuideTipsView */, 00E2A8182F21C44C003B779E /* UserGuideTipsView */,
BEEAB2712D34F8DF008CD059 /* PopularListView */, BEEAB2712D34F8DF008CD059 /* PopularListView */,
BEEAB2502D337F87008CD059 /* AnchorReward */, BEEAB2502D337F87008CD059 /* AnchorReward */,
BEB504712D2E8FD100EA6E6F /* LiveThemeView */, BEB504712D2E8FD100EA6E6F /* LiveThemeView */,
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
@property (nonatomic, strong) UIButton *inputChatBtn; @property (nonatomic, strong) UIButton *inputChatBtn;
/// 引导波纹的view /// 引导波纹的view
@property (nonatomic, strong) FFUserGuideRippleView *inputChatGuideRippleView; @property (nonatomic, strong) FUSUserGuideRippleView *inputChatGuideRippleView;
@property (nonatomic, strong) FUSLiveBottomToolWebpButton *linkMicroBtn; @property (nonatomic, strong) FUSLiveBottomToolWebpButton *linkMicroBtn;
......
import SwiftyJSON import SwiftyJSON
// MARK: - FFPKVsPointModel // MARK: - FUSPKContributeUserModel
class FUSPKContributeUserModel: FUSSwiftBaseModel { class FUSPKContributeUserModel: FUSSwiftBaseModel {
/// 用户ID /// 用户ID
......
...@@ -10,7 +10,7 @@ import RxSwift ...@@ -10,7 +10,7 @@ import RxSwift
import RxRelay import RxRelay
import SwiftyJSON import SwiftyJSON
/// 当前 PK 到了哪个流程,关联了FFOCPKState这个oc映射,如果添加减少这里的类型,那么记得在FFOCPKState里也进行添加减少 /// 当前 PK 到了哪个流程,关联了FUSOCPKState这个oc映射,如果添加减少这里的类型,那么记得在FUSOCPKState里也进行添加减少
@objc public enum FUSPKState: Int, Codable { @objc public enum FUSPKState: Int, Codable {
/// 没有在 PK 中(空闲状态) /// 没有在 PK 中(空闲状态)
case none = 0 case none = 0
...@@ -559,9 +559,6 @@ import SwiftyJSON ...@@ -559,9 +559,6 @@ import SwiftyJSON
private var isPrepareReloadGiftBombData: Bool = false private var isPrepareReloadGiftBombData: Bool = false
/// 重新请求礼物暴击信息 /// 重新请求礼物暴击信息
@objc public func fus_reloadGiftBombDataHandle() { @objc public func fus_reloadGiftBombDataHandle() {
// if FFConfig.develop.environment != .release {
// FFToastIndicator.showToastMessage("----- 重新请求礼物暴击信息!")
// }
FUSSwiftLiveHelper.shared.pkHelper.fus_reloadPKGiftbombInfo() FUSSwiftLiveHelper.shared.pkHelper.fus_reloadPKGiftbombInfo()
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// 桥接给oc的FFPKViewModel相关信息 /// 桥接给oc的FUSPKViewModel相关信息
@interface FUSPKViewModelOCBridge : NSObject @interface FUSPKViewModelOCBridge : NSObject
/// 激活的惩罚改变的时候 /// 激活的惩罚改变的时候
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
+ (void)fus_activatedPunishInPKModelDidChange{ + (void)fus_activatedPunishInPKModelDidChange{
// 处理FFLivePunishmentManager // 处理FUSLivePunishmentManager
FUSPKState pkState = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.currentPKState; FUSPKState pkState = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.currentPKState;
FUSVSPunishSelectActivatedModel *model = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.oc_activatedPunishInPKModel; FUSVSPunishSelectActivatedModel *model = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.oc_activatedPunishInPKModel;
FUSPKAnchorModel *localAnchor = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.oc_localAnchorModel; FUSPKAnchorModel *localAnchor = [FUSSwiftLiveHelper shared].pkHelper.ocViewModel.oc_localAnchorModel;
......
...@@ -13,20 +13,20 @@ import SJAttributesStringMaker ...@@ -13,20 +13,20 @@ import SJAttributesStringMaker
// 注意。有内在的宽高,不需要设定宽高 // 注意。有内在的宽高,不需要设定宽高
class FUSPKPunishTypesView: FUSBaseView { class FUSPKPunishTypesView: FUSBaseView {
enum FFPKPunishTypesViewState { enum FUSPKPunishTypesViewState {
case selectButton case selectButton
case waiting case waiting
case typesIcon case typesIcon
} }
enum FFPKPunishTypesViewPosition { enum FUSPKPunishTypesViewPosition {
case left case left
case right case right
} }
// public var clickHandler: ((FFPKPunishTypesViewState, FUSVSPunishGetListDataModel) -> Void)? // public var clickHandler: ((FUSPKPunishTypesViewState, FUSVSPunishGetListDataModel) -> Void)?
public var position: FFPKPunishTypesViewPosition = .left { public var position: FUSPKPunishTypesViewPosition = .left {
didSet { didSet {
selectBtn.snp.remakeConstraints { make in selectBtn.snp.remakeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
...@@ -62,7 +62,7 @@ class FUSPKPunishTypesView: FUSBaseView { ...@@ -62,7 +62,7 @@ class FUSPKPunishTypesView: FUSBaseView {
} }
} }
public var state: FFPKPunishTypesViewState = .typesIcon{ public var state: FUSPKPunishTypesViewState = .typesIcon{
didSet { didSet {
self.selectBtn.isHidden = state != .selectButton self.selectBtn.isHidden = state != .selectButton
self.waitingView.isHidden = state != .waiting self.waitingView.isHidden = state != .waiting
...@@ -109,17 +109,6 @@ class FUSPKPunishTypesView: FUSBaseView { ...@@ -109,17 +109,6 @@ class FUSPKPunishTypesView: FUSBaseView {
make.width.greaterThanOrEqualTo(24*3) make.width.greaterThanOrEqualTo(24*3)
} }
// 测试代码
// if FFConfig.develop.environment == .developing {
// reamingTimeLabel.font = .fus_themeFont(14)
// reamingTimeLabel.textColor = .red
// self.addSubview(reamingTimeLabel)
// reamingTimeLabel.snp.makeConstraints { make in
// make.centerX.equalToSuperview()
// make.top.equalTo(self.snp.top).offset(-10)
// }
// }
selectBtn.backgroundColor = .init(hex: "#000000", alpha: 0.4) selectBtn.backgroundColor = .init(hex: "#000000", alpha: 0.4)
selectBtn.layer.cornerRadius = 20 / 2.0 selectBtn.layer.cornerRadius = 20 / 2.0
selectBtn.layer.masksToBounds = true selectBtn.layer.masksToBounds = true
...@@ -193,38 +182,11 @@ class FUSPKPunishTypesView: FUSBaseView { ...@@ -193,38 +182,11 @@ class FUSPKPunishTypesView: FUSBaseView {
super.bindViewModel() super.bindViewModel()
selectBtn.rx.tap.subscribe(onNext: {[weak self] in selectBtn.rx.tap.subscribe(onNext: {[weak self] in
// self?.clickHandler?(FFPKPunishTypesViewState.selectButton, .init()) // self?.clickHandler?(FUSPKPunishTypesViewState.selectButton, .init())
self?.fus_showPunishSelectAlertView() self?.fus_showPunishSelectAlertView()
}) })
.disposed(by: disposeBag) .disposed(by: disposeBag)
// 测试代码
// if FFConfig.develop.environment == .developing {
// FUSSwiftLiveHelper.shared.pkHelper.viewModel.flatMap({ $0.activatedPunishInPKModel })
// .subscribe(onNext: {[weak self] activatedPunishInPKModel in
// guard let self = self else { return }
// self.activatedPunishInPKModelDisposeBag = .init()
//
// if let activatedPunishInPKModel = activatedPunishInPKModel {
// activatedPunishInPKModel.currentRemaintime
// .subscribe(onNext: {[weak self] currentRemaintime in
//
// if self?.punishList.first(where: { $0.pid == activatedPunishInPKModel.punishModel.pid }) != nil {
// self?.reamingTimeLabel.text = "\(currentRemaintime)"
// }
// else {
// self?.reamingTimeLabel.text = "0"
// }
// })
// .disposed(by: activatedPunishInPKModelDisposeBag)
// }
// else {
// self.reamingTimeLabel.text = "0"
// }
// })
// .disposed(by: activatedPunishInPKModelDisposeBag)
// }
} }
var positionDisposeBag = DisposeBag() var positionDisposeBag = DisposeBag()
......
...@@ -580,7 +580,7 @@ class FUSPKScoreProgressView: FUSBaseView { ...@@ -580,7 +580,7 @@ class FUSPKScoreProgressView: FUSBaseView {
func fus_addPointImagePopAnim(_ left: Bool) { func fus_addPointImagePopAnim(_ left: Bool) {
let animKey = "FFScoreViePopAnim" let animKey = "FUSScoreViePopAnim"
let anima = CAKeyframeAnimation(keyPath: "transform.scale") let anima = CAKeyframeAnimation(keyPath: "transform.scale")
// 字体变化大小 // 字体变化大小
......
// //
// FFPKTopStateCountdownModel.swift // FUSPKTopStateCountdownModel.swift
// LiveRoom // LiveRoom
// //
// Created by pppidan on 2025/8/4. // Created by pppidan on 2025/8/4.
......
...@@ -144,7 +144,7 @@ class FUSPKUserContributeCell: FUSSwiftCollectionViewCell { ...@@ -144,7 +144,7 @@ class FUSPKUserContributeCell: FUSSwiftCollectionViewCell {
class FUSPKUserCountCell: FUSSwiftCollectionViewCell { class FUSPKUserCountCell: FUSSwiftCollectionViewCell {
let countLabel = UILabel() let countLabel = UILabel()
static let FFPKUserCountCellIdentifier = "FFPKUserCountCellIdentifier" static let cellIdentifier = "FUSPKUserCountCell"
override func makeUI() { override func makeUI() {
super.makeUI() super.makeUI()
......
...@@ -89,7 +89,7 @@ class FUSPKUserContributeListView: FUSBaseView { ...@@ -89,7 +89,7 @@ class FUSPKUserContributeListView: FUSBaseView {
collectionView.backgroundColor = .clear collectionView.backgroundColor = .clear
collectionView.register(FUSPKUserCountCell.self, collectionView.register(FUSPKUserCountCell.self,
forCellWithReuseIdentifier: FUSPKUserCountCell.FFPKUserCountCellIdentifier) forCellWithReuseIdentifier: FUSPKUserCountCell.cellIdentifier)
collectionView.register(FUSPKUserContributeCell.self, collectionView.register(FUSPKUserContributeCell.self,
forCellWithReuseIdentifier: FUSPKUserContributeCell.pkUserContributeCellCollectionViewCellId) forCellWithReuseIdentifier: FUSPKUserContributeCell.pkUserContributeCellCollectionViewCellId)
collectionView.dataSource = self collectionView.dataSource = self
...@@ -535,7 +535,7 @@ extension FUSPKUserContributeListView: UICollectionViewDataSource, UICollectionV ...@@ -535,7 +535,7 @@ extension FUSPKUserContributeListView: UICollectionViewDataSource, UICollectionV
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUSPKUserCountCell.FFPKUserCountCellIdentifier, for: indexPath) as! FUSPKUserCountCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUSPKUserCountCell.cellIdentifier, for: indexPath) as! FUSPKUserCountCell
cell.countLabel.text = "\(self.totalUser)" cell.countLabel.text = "\(self.totalUser)"
return cell return cell
} else { } else {
......
...@@ -13,7 +13,7 @@ import SwiftyJSON ...@@ -13,7 +13,7 @@ import SwiftyJSON
public class FUSPKControlContributionView: FUSPKControlSubBaseView { public class FUSPKControlContributionView: FUSPKControlSubBaseView {
/// section的类型 /// section的类型
enum FFPKControlContributionSectionType: Int { enum FUSPKControlContributionSectionType: Int {
case user case user
case banner case banner
case hotData case hotData
...@@ -30,7 +30,7 @@ public class FUSPKControlContributionView: FUSPKControlSubBaseView { ...@@ -30,7 +30,7 @@ public class FUSPKControlContributionView: FUSPKControlSubBaseView {
let pkStatusBgView = FUSPKControlContributionPkStatusView(frame: .zero) let pkStatusBgView = FUSPKControlContributionPkStatusView(frame: .zero)
/// 控制section的显示 /// 控制section的显示
var sectionTypeList: [FFPKControlContributionSectionType] = [.user, .hotData] var sectionTypeList: [FUSPKControlContributionSectionType] = [.user, .hotData]
// 日期选择相关 // 日期选择相关
let dateTitleList: [String] = [.fus_versionLocalString("今日"), .fus_versionLocalString("昨日")] let dateTitleList: [String] = [.fus_versionLocalString("今日"), .fus_versionLocalString("昨日")]
...@@ -488,22 +488,22 @@ extension FUSPKControlContributionView: UITableViewDelegate, UITableViewDataSour ...@@ -488,22 +488,22 @@ extension FUSPKControlContributionView: UITableViewDelegate, UITableViewDataSour
class FUSPKControlContributionPkStatusView: FUSBaseView { class FUSPKControlContributionPkStatusView: FUSBaseView {
enum FFPKControlContributionPkStatusType: Equatable { enum FUSPKControlContributionPkStatusType: Equatable {
case matching case matching
case waitingAccept case waitingAccept
case inPk(face: String, nickName: String) case inPk(face: String, nickName: String)
} }
/// 点击事件 /// 点击事件
public var clickHanlde: ((FFPKControlContributionPkStatusType) -> Void)? public var clickHanlde: ((FUSPKControlContributionPkStatusType) -> Void)?
/// pk状态 /// pk状态
let pkStatus: BehaviorRelay<FFPKControlContributionPkStatusType> = .init(value: .matching) let pkStatus: BehaviorRelay<FUSPKControlContributionPkStatusType> = .init(value: .matching)
let bgView = UIButton(type: .custom) let bgView = UIButton(type: .custom)
let pkIconImageView = YYAnimatedImageView(image: FUSShowRoomCenterBunble.webpImageName("live_pk_control_contribute_bottom_inpk_animate")) let pkIconImageView = YYAnimatedImageView(image: FUSShowRoomCenterBunble.webpImageName("live_pk_control_contribute_bottom_inpk_animate"))
let pkHeadImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("live_pk_control_contribution_pkStatus_pk_avatar")) let pkHeadImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("live_pk_control_contribution_pkStatus_pk_avatar"))
var raderView = FFUserGuideRippleView() var raderView = FUSUserGuideRippleView()
let descLabel = UILabel() let descLabel = UILabel()
override func makeUI() { override func makeUI() {
......
...@@ -17,7 +17,7 @@ class FUSPKControlMatchingView: FUSPKControlSubBaseView { ...@@ -17,7 +17,7 @@ class FUSPKControlMatchingView: FUSPKControlSubBaseView {
let matchingNameLabel = UILabel() let matchingNameLabel = UILabel()
let matchingStateLabel = UILabel() let matchingStateLabel = UILabel()
let cancelBtn = FUSStyleButton(type: .custom) let cancelBtn = FUSStyleButton(type: .custom)
var raderView = FFUserGuideRippleView() var raderView = FUSUserGuideRippleView()
/// 选中的pk模式 /// 选中的pk模式
public var pkMode: FUSVSTypeGetListModel? public var pkMode: FUSVSTypeGetListModel?
......
...@@ -427,7 +427,7 @@ class FUSPKScoreProgressLargeSmallView: FUSBaseView { ...@@ -427,7 +427,7 @@ class FUSPKScoreProgressLargeSmallView: FUSBaseView {
func fus_addPointImagePopAnim(_ left: Bool) { func fus_addPointImagePopAnim(_ left: Bool) {
let animKey = "FFScoreViePopAnim" let animKey = "FUSScoreViePopAnim"
let anima = CAKeyframeAnimation(keyPath: "transform.scale") let anima = CAKeyframeAnimation(keyPath: "transform.scale")
// 字体变化大小 // 字体变化大小
......
...@@ -53,7 +53,7 @@ public class FUSPKControlViewModel: NSObject { ...@@ -53,7 +53,7 @@ public class FUSPKControlViewModel: NSObject {
/// 惩罚信息,punish需要 /// 惩罚信息,punish需要
public var arg_punishData: BehaviorRelay<FUSVSPunishGetListDataModel?> = .init(value: nil) public var arg_punishData: BehaviorRelay<FUSVSPunishGetListDataModel?> = .init(value: nil)
/// 是否是当前直播间的激活惩罚数据,FFPKControlViewTypePunishActivate需要 /// 是否是当前直播间的激活惩罚数据,FUSPKControlViewTypePunishActivate需要
public var arg_isLocalPunishActivateData: BehaviorRelay<Bool> = .init(value: true) public var arg_isLocalPunishActivateData: BehaviorRelay<Bool> = .init(value: true)
/// 0:人气值 1:竞技规则 2:惩罚 /// 0:人气值 1:竞技规则 2:惩罚
......
...@@ -36,7 +36,7 @@ class FUSUserGuideTipsView: UIView { ...@@ -36,7 +36,7 @@ class FUSUserGuideTipsView: UIView {
// private let layerView = UIView() // private let layerView = UIView()
// private let rippleView = UIView() // private let rippleView = UIView()
// private var radarAnimationView: RectRadarAnimationView? // private var radarAnimationView: RectRadarAnimationView?
private let rippleView = FFUserGuideRippleView(frame: .zero) private let rippleView = FUSUserGuideRippleView(frame: .zero)
private let connectImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("user_guide_tips_connect_upon_image")) private let connectImageView = UIImageView(image: FUSShowRoomCenterBunble.imageNamed("user_guide_tips_connect_upon_image"))
private let textContentBgView = UIView() private let textContentBgView = UIView()
private let iconImageView = UIImageView() private let iconImageView = UIImageView()
...@@ -260,7 +260,7 @@ class FUSUserGuideTipsView: UIView { ...@@ -260,7 +260,7 @@ class FUSUserGuideTipsView: UIView {
} }
@objc public class FFUserGuideRippleView: UIView{ @objc public class FUSUserGuideRippleView: UIView{
@objc public enum FFUserGuideRippleViewAnimationType: Int { @objc public enum FFUserGuideRippleViewAnimationType: Int {
case ripple = 1 case ripple = 1
......
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