Commit c0758565 by ludi

补充一些洗代码

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