Browse Source

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework

wenweiwei 3 years ago
parent
commit
13fa5db712

BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_friend.png


BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_friend@2x.png


BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_friend@3x.png


BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_wechat.png


BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_wechat@2x.png


BIN
BFFramework/Assets/Stuckpoint/reCreate_opration_wechat@3x.png


+ 1 - 1
BFFramework/Classes/Base/Model/PQBaseModel.swift

@@ -31,7 +31,7 @@ public class PQBaseModel: Object {
         return "uniqueId"
     }
 
-    override required init() {
+    override required public init() {
         super.init()
         uniqueId = getUniqueId(desc: "uniqueId")
     }

+ 352 - 11
BFFramework/Classes/Base/View/PQRemindView.swift

@@ -1,18 +1,218 @@
+
+// MARK: - 设置页退出登录跟注销账号提示视图
+
+/// 设置页退出登录跟注销账号提示视图
+public class PQRemindView: UIView {
+    public var isBanned: Bool = false // 是否是拉黑用户提示
+    public var isBlank: Bool = false { // 是否是黑色弹窗
+        didSet {
+            if isBlank {
+                contentView.backgroundColor = UIColor.hexColor(hexadecimal: "#212223")
+                titleLab.textColor = UIColor.white
+                contentLab.textColor = UIColor.white
+                cancelBtn.setTitleColor(UIColor.white, for: .normal)
+                confirmBtn.setTitleColor(UIColor.white, for: .normal)
+            } else {
+                contentView.backgroundColor = UIColor.white
+                contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
+                titleLab.textColor = UIColor.black
+                cancelBtn.setTitleColor(UIColor.black, for: .normal)
+                confirmBtn.setTitleColor(UIColor.black, for: .normal)
+            }
+        }
+    }
+
+    public var remindBlock: ((_ sender: UIButton, _ remindData: PQBaseModel?) -> Void)?
+
+    lazy public var contentView: UIView = {
+        let contentView = UIView()
+        contentView.backgroundColor = UIColor.white
+        contentView.addCorner(corner: 4)
+        return contentView
+    }()
+
+    lazy public var titleLab: UILabel = {
+        let titleLab = UILabel()
+        titleLab.font = UIFont.systemFont(ofSize: 18, weight: .medium)
+        titleLab.textAlignment = .center
+        titleLab.numberOfLines = 0
+        titleLab.textColor = UIColor.black
+        return titleLab
+    }()
+
+    lazy public var contentLab: UILabel = {
+        //        let contentLab = TYAttributedLabel.init()
+        //        contentLab.textAlignment = CTTextAlignment.center
+        //        contentLab.verticalAlignment = .center
+        //        contentLab.highlightedLinkBackgroundColor = UIColor.white
+        //        contentLab.numberOfLines = 0
+        //        contentLab.font = UIFont.systemFont(ofSize: 14)
+        //        contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
+        let contentLab = UILabel()
+        contentLab.font = UIFont.systemFont(ofSize: 16)
+        contentLab.textAlignment = .center
+        contentLab.numberOfLines = 0
+        contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
+        return contentLab
+    }()
+
+    lazy public var cancelBtn: UIButton = {
+        let cancelBtn = UIButton(type: .custom)
+        cancelBtn.setTitle("取消", for: .normal)
+        cancelBtn.setTitleColor(UIColor.black, for: .normal)
+        cancelBtn.tag = 1
+        cancelBtn.addTarget(self, action: #selector(btnClck(sender:)), for: .touchUpInside)
+        cancelBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
+        return cancelBtn
+    }()
+
+    lazy public var confirmBtn: UIButton = {
+        let confirmBtn = UIButton(type: .custom)
+        confirmBtn.setTitle("确定", for: .normal)
+        confirmBtn.setTitleColor(UIColor.black, for: .normal)
+        confirmBtn.tag = 2
+        confirmBtn.addTarget(self, action: #selector(btnClck(sender:)), for: .touchUpInside)
+        confirmBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
+        return confirmBtn
+    }()
+
+    lazy public var verticalLine: UIView = {
+        let verticalLine = UIView()
+        verticalLine.backgroundColor = UIColor.hexColor(hexadecimal: "#E5E5E5")
+        return verticalLine
+    }()
+
+    lazy public var horizonLine: UIView = {
+        let horizonLine = UIView()
+        horizonLine.backgroundColor = UIColor.hexColor(hexadecimal: "#E5E5E5")
+        return horizonLine
+    }()
+
+    override public init(frame: CGRect) {
+        super.init(frame: frame)
+        addSubview(contentView)
+        contentView.addSubview(titleLab)
+        contentView.addSubview(contentLab)
+        contentView.addSubview(cancelBtn)
+        contentView.addSubview(confirmBtn)
+        contentView.addSubview(verticalLine)
+        contentView.addSubview(horizonLine)
+        backgroundColor = cShadowColor
+    }
+
+    required init?(coder _: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    public var  remindData: PQBaseModel? {
+        didSet {
+            addData()
+            addLayout()
+        }
+    }
+
+    public func addData() {
+        titleLab.text = remindData?.title
+        contentLab.text = remindData?.summary
+        cancelBtn.setTitleColor(isBanned ? (isBlank ? UIColor.white : UIColor.black) : (isBlank ? UIColor.white : UIColor.hexColor(hexadecimal: "#666666")), for: .normal)
+        if isBanned {
+            titleLab.textAlignment = .center
+        } else {
+            titleLab.textAlignment = .left
+        }
+    }
+
+   public func addLayout() {
+        var summH: CGFloat = 0
+        var titleH: CGFloat = 0
+        if (remindData?.summary?.count ?? 0) > 0 {
+            summH = sizeWithText(text: remindData?.summary ?? "", font: UIFont.systemFont(ofSize: 16, weight: .medium), size: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
+        }
+        if (remindData?.title?.count ?? 0) > 0 {
+            titleH = sizeWithText(text: remindData?.title ?? "", font: UIFont.systemFont(ofSize: 18, weight: .medium), size: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
+            if titleH < cDefaultMargin * 2 {
+                titleH = cDefaultMargin * 2
+            }
+        }
+        let contentH: CGFloat = cDefaultMargin * 2 + (titleH > 0 ? titleH + cDefaultMargin : 0) + (summH > 0 ? summH + cDefaultMargin : 0) + cDefaultMargin * 3 + (isBanned ? cDefaultMargin * 2 : 0)
+        contentView.snp.makeConstraints { make in
+            make.left.equalTo(self).offset(cDefaultMargin * 4)
+            make.right.equalTo(self).offset(-cDefaultMargin * 4)
+            make.height.equalTo(contentH)
+            make.center.equalTo(self)
+        }
+        titleLab.snp.makeConstraints { make in
+            make.left.equalTo(contentView).offset(cDefaultMargin * 2)
+            make.right.equalTo(contentView).offset(-cDefaultMargin * 2)
+            make.height.equalTo(titleH)
+            make.top.equalTo(contentView).offset(cDefaultMargin * 2)
+        }
+        contentLab.snp.makeConstraints { make in
+            make.top.equalTo(titleLab.snp_bottom).offset(summH > 0 ? cDefaultMargin : 0)
+            make.left.right.equalTo(titleLab)
+            make.height.equalTo(summH)
+        }
+        if isBanned {
+            let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
+            verticalLine.snp.makeConstraints { make in
+                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.height.equalTo(1)
+                make.left.width.equalToSuperview()
+            }
+            cancelBtn.snp.makeConstraints { make in
+                make.left.equalToSuperview()
+                make.top.equalTo(verticalLine.snp_bottom)
+                make.width.equalTo(btnW)
+                make.bottom.equalTo(contentView)
+            }
+            horizonLine.snp.makeConstraints { make in
+                make.left.equalTo(cancelBtn.snp_right)
+                make.height.top.equalTo(cancelBtn)
+                make.width.equalTo(1)
+            }
+            confirmBtn.snp.makeConstraints { make in
+                make.right.equalToSuperview()
+                make.height.width.bottom.equalTo(cancelBtn)
+            }
+        } else {
+            confirmBtn.snp.makeConstraints { make in
+                make.right.equalTo(titleLab)
+                make.height.equalTo(cDefaultMargin * 4)
+                make.width.equalTo(cDefaultMargin * 6)
+                make.bottom.equalTo(contentView).offset(-cDefaultMargin)
+            }
+            cancelBtn.snp.makeConstraints { make in
+                make.right.equalTo(confirmBtn.snp_left).offset(-cDefaultMargin)
+                make.height.equalTo(cDefaultMargin * 4)
+                make.width.equalTo(cDefaultMargin * 6)
+                make.bottom.equalTo(confirmBtn)
+            }
+        }
+    }
+
+    @objc func btnClck(sender: UIButton) {
+        removeFromSuperview()
+        if remindBlock != nil {
+            remindBlock!(sender, remindData!)
+        }
+    }
+}
+
 // MARK: 空白提示页
 
 /// 空白提示页
-class PQEmptyRemindView: UIView {
+public class PQEmptyRemindView: UIView {
     // 回调
-    var fullRefreshBloc: ((_ isNetConnected: Bool, _ emptyData: PQEmptyModel?) -> Void)?
+    public var fullRefreshBloc: ((_ isNetConnected: Bool, _ emptyData: PQEmptyModel?) -> Void)?
 
-    lazy var imageView: UIImageView = {
+    lazy public var imageView: UIImageView = {
         let imageView = UIImageView()
         imageView.backgroundColor = UIColor.clear
         imageView.contentMode = .scaleAspectFit
         return imageView
     }()
 
-    lazy var remindLab: UILabel = {
+    lazy public var remindLab: UILabel = {
         let remindLab = UILabel()
         remindLab.font = UIFont.systemFont(ofSize: 16)
         remindLab.numberOfLines = 1
@@ -21,7 +221,7 @@ class PQEmptyRemindView: UIView {
         return remindLab
     }()
 
-    lazy var shimmeringView: FBShimmeringView = {
+    lazy public var shimmeringView: FBShimmeringView = {
         let shimmeringView = FBShimmeringView()
         shimmeringView.isShimmering = false
         shimmeringView.shimmeringBeginFadeDuration = 0.3
@@ -32,7 +232,7 @@ class PQEmptyRemindView: UIView {
         return shimmeringView
     }()
 
-    lazy var remindSubLab: UILabel = {
+    lazy public var remindSubLab: UILabel = {
         let remindSubLab = UILabel()
         remindSubLab.font = UIFont.systemFont(ofSize: 14)
         remindSubLab.numberOfLines = 1
@@ -65,11 +265,11 @@ class PQEmptyRemindView: UIView {
         backgroundColor = UIColor.black
     }
 
-    required init?(coder _: NSCoder) {
+    required public init?(coder _: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
 
-    @objc var emptyData: PQEmptyModel? {
+    @objc public var emptyData: PQEmptyModel? {
         didSet {
             addData()
             addLayout()
@@ -78,7 +278,7 @@ class PQEmptyRemindView: UIView {
 }
 
 extension PQEmptyRemindView {
-    func addData() {
+    public func addData() {
         if !isNetConnected() {
             remindLab.text = "网络连接失败,请检查网络后重试"
             remindSubLab.isHidden = true
@@ -108,14 +308,14 @@ extension PQEmptyRemindView {
         }
     }
 
-    override var isHidden: Bool {
+    override public var isHidden: Bool {
         didSet {
             addData()
             addLayout()
         }
     }
 
-    func addLayout() {
+    public func addLayout() {
         var imageH: CGFloat = cDefaultMargin * 7
         var contentH: CGFloat = 0
 
@@ -172,3 +372,144 @@ extension PQEmptyRemindView {
 
     func removeShimmeringView() {}
 }
+
+// MARK: - 上传提示框
+
+/// 上传提示框
+public class PQUploadRemindView: PQRemindView {
+    public var canMoreOpration: Bool = false // 是否还有更多操作
+    public var confirmTitle: String = "我知道了"
+    public var cancelTitle: String = "取消"
+    public var cacelColor: UIColor = UIColor.hexColor(hexadecimal: "#666666")
+    public var attributedTitle: NSAttributedString?
+
+    override public func addData() {
+        titleLab.textAlignment = .center
+        if attributedTitle != nil {
+            titleLab.attributedText = attributedTitle
+        } else {
+            titleLab.text = remindData?.title
+        }
+        if remindData?.attributedTitle != nil {
+            contentLab.attributedText = remindData?.attributedTitle
+        } else {
+            contentLab.text = remindData?.summary
+        }
+        cancelBtn.setTitleColor(cacelColor, for: .normal)
+        confirmBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#EE0051"), for: .normal)
+        confirmBtn.setTitle(confirmTitle, for: .normal)
+        cancelBtn.setTitle(cancelTitle, for: .normal)
+        let ges = UITapGestureRecognizer(target: self, action: #selector(removeView))
+        addGestureRecognizer(ges)
+    }
+
+    override public func addLayout() {
+        let titleH: CGFloat = ((remindData?.title != nil && (remindData?.title?.count ?? 0) > 0) || attributedTitle != nil) ? cDefaultMargin * 2 : 0
+
+        let summH: CGFloat = sizeTextFits(attributedText: remindData?.attributedTitle != nil ? remindData?.attributedTitle : NSMutableAttributedString(string: remindData?.summary ?? ""), text: nil, numberOfLines: 0, font: UIFont.systemFont(ofSize: 14), maxSize: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
+
+        let contentH: CGFloat = (titleH == 0 ? 0 : cDefaultMargin * 3) + cDefaultMargin * 2 + summH + cDefaultMargin + cDefaultMargin * 5
+
+        contentView.snp.makeConstraints { make in
+            make.left.equalTo(self).offset(cDefaultMargin * 3)
+            make.right.equalTo(self).offset(-cDefaultMargin * 3)
+            make.height.equalTo(contentH)
+            make.center.equalTo(self)
+        }
+        titleLab.snp.makeConstraints { make in
+            make.left.equalTo(contentView).offset(cDefaultMargin * 2)
+            make.right.equalTo(contentView).offset(-cDefaultMargin * 2)
+            make.height.equalTo(titleH)
+            make.top.equalTo(contentView).offset(titleH == 0 ? 0 : cDefaultMargin * 2)
+        }
+        contentLab.snp.makeConstraints { make in
+            make.top.equalTo(titleLab.snp_bottom).offset(cDefaultMargin)
+            make.left.right.equalTo(titleLab)
+            make.height.equalTo(summH)
+        }
+        if canMoreOpration {
+            let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
+            verticalLine.snp.makeConstraints { make in
+                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.height.equalTo(1)
+                make.left.width.equalToSuperview()
+            }
+            cancelBtn.snp.makeConstraints { make in
+                make.left.equalToSuperview()
+                make.top.equalTo(verticalLine.snp_bottom)
+                make.width.equalTo(btnW)
+                make.bottom.equalTo(contentView)
+            }
+            horizonLine.snp.makeConstraints { make in
+                make.left.equalTo(cancelBtn.snp_right)
+                make.height.top.equalTo(cancelBtn)
+                make.width.equalTo(1)
+            }
+            confirmBtn.snp.makeConstraints { make in
+                make.right.equalToSuperview()
+                make.height.width.bottom.equalTo(cancelBtn)
+            }
+        } else {
+            verticalLine.snp.makeConstraints { make in
+                make.top.equalTo(contentLab.snp_bottom).offset(cDefaultMargin)
+                make.height.equalTo(1)
+                make.left.width.equalToSuperview()
+            }
+            confirmBtn.snp.makeConstraints { make in
+                make.right.left.equalTo(titleLab)
+                make.top.equalTo(verticalLine.snp_bottom)
+                make.bottom.equalTo(contentView)
+            }
+        }
+    }
+
+    @objc func removeView() {
+        removeFromSuperview()
+    }
+
+    @objc override func btnClck(sender: UIButton) {
+        removeFromSuperview()
+        if remindBlock != nil {
+            remindBlock!(sender, remindData!)
+        }
+    }
+
+    /// 快速生成
+    /// - Parameters:
+    ///   - title: <#title description#>
+    ///   - summary: <#summary description#>
+    ///   - confirmTitle: <#confirmTitle description#>
+    ///   - remindHandle: <#remindHandle description#>
+    /// - Returns: <#description#>
+    class public func showUploadRemindView(title: String?, attributedTitle: NSAttributedString? = nil, summary: String, canMoreOpration: Bool = false, confirmTitle: String?, cancelTitle: String? = nil, cancelColor: UIColor? = nil, remindHandle: @escaping (_ sender: UIButton, _ baseModel: PQBaseModel?) -> Void) {
+        if UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag) != nil {
+            UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag)?.removeFromSuperview()
+        }
+        let remindData = PQBaseModel()
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.lineSpacing = 3.0
+        paragraphStyle.alignment = .center
+        remindData.title = title
+        remindData.attributedTitle = NSMutableAttributedString(string: summary, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), NSAttributedString.Key.foregroundColor: UIColor.hexColor(hexadecimal: "#666666"), NSAttributedString.Key.paragraphStyle: paragraphStyle])
+        let remindView = PQUploadRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
+        remindView.canMoreOpration = canMoreOpration
+        if confirmTitle != nil {
+            remindView.confirmTitle = confirmTitle!
+        }
+        if cancelTitle != nil {
+            remindView.cancelTitle = cancelTitle!
+        }
+        if cancelColor != nil {
+            remindView.cacelColor = cancelColor!
+        }
+        if attributedTitle != nil {
+            remindView.attributedTitle = attributedTitle
+        }
+        remindView.remindBlock = { sender, baseModel in
+            remindHandle(sender, baseModel)
+        }
+        remindView.tag = cUploadViewRemindTag
+        UIApplication.shared.keyWindow?.addSubview(remindView)
+        remindView.remindData = remindData
+    }
+}

+ 3 - 3
BFFramework/Classes/Categorys/UIView+Ext.swift

@@ -409,7 +409,7 @@ extension UIImageView {
     /// imageView加载网络图片
     /// - Parameters:
     ///   - url: 网络url
-     public func setNetImage(url: String?, placeholder: UIImage = UIImage(named: "placehold_image")!) {
+     public func setNetImage(url: String?, placeholder: UIImage = UIImage.init().BF_Image(named: "placehold_image")) {
         if url == nil || (url?.count ?? 0) <= 0 {
             BFLog(message: "设置按钮网络图片地址为空")
             return
@@ -461,7 +461,7 @@ extension UIButton {
     /// UIButton加载网络图片
     /// - Parameters:
     ///   - url: 网络url
-     public func setNetImage(url: String?, placeholder: UIImage = UIImage(named: "placehold_image")!) {
+     public func setNetImage(url: String?, placeholder: UIImage = UIImage.init().BF_Image(named: "placehold_image")) {
         if url == nil || (url?.count ?? 0) <= 0 {
             BFLog(message: "设置按钮网络图片地址为空")
             return
@@ -475,7 +475,7 @@ extension UIButton {
     /// UIButton加载网络背景图片
     /// - Parameters:
     ///   - url: 网络url
-     public func setNetBackgroundImage(url: String, placeholder: UIImage = UIImage(named: "placehold_image")!) {
+     public func setNetBackgroundImage(url: String, placeholder: UIImage = UIImage.init().BF_Image(named: "placehold_image")) {
         kf.setBackgroundImage(with: URL(string: url), for: .normal, placeholder: placeholder, options: url.suffix(5) == ".webp" ? [.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)] : nil, progressBlock: { _, _ in
 
         }) { _, _, _, _ in

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMaterialController.swift

@@ -24,7 +24,7 @@ public class PQStuckPointMaterialController: PQBaseViewController {
     // 选择的图片总数
     var selectedImageDataCount: Int = 0
     // 再创作音乐数据
-    var reCreateMusicData: PQVoiceModel?
+   public var reCreateMusicData: PQVoiceModel?
     lazy var changeCollecBtn: UIButton = {
         let changeCollecBtn = UIButton(frame: CGRect(x: cDefaultMargin * 5, y: cDevice_iPhoneStatusBarHei, width: cScreenWidth - cDefaultMargin * 10, height: cDefaultMargin * 4))
         changeCollecBtn.titleLabel?.lineBreakMode = .byTruncatingTail

+ 1 - 0
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -898,6 +898,7 @@ extension PQStuckPointPublicController {
                 
                 // 点击上报:完成
                 PQEventTrackViewModel.baseReportUpload(businessType: .bt_buttonClick, objectType: .ot_click_finished, pageSource: .sp_stuck_publishSyncedUp, extParams: ["videoId": videoData?.uniqueId ?? ""], remindmsg: "卡点视频数据上报-(点击上报:完成)")
+                navigationController?.popToRootViewController(animated: true)
             }
         default:
             break

+ 3 - 3
BFFramework/Classes/Stuckpoint/Model/PQVoiceModel.swift

@@ -8,14 +8,14 @@
 
 import Foundation
 
-enum voiceStatue: Int {
+public enum voiceStatue: Int {
     case isLoading = 0 // 加载中
     case isPlaying = 1 // 播放中
     case isNormal = 2 // 正常状态
     case isSelected = 3 // 选中状态,有红框 字红色 ,别的都没有
 }
 
-class PQVoiceModel: NSObject, NSCopying {
+public class PQVoiceModel: NSObject, NSCopying {
     public var name: String = ""
     // 对应接口的 KEY
     public var voice: String = ""
@@ -82,7 +82,7 @@ class PQVoiceModel: NSObject, NSCopying {
     var rhythmMusicOut: Float64 = 0
     // 卡点视频-源项目ID(从那个项目做同款)
     var originProjectId: String?
-    func copy(with _: NSZone? = nil) -> Any {
+    public func copy(with _: NSZone? = nil) -> Any {
         let voice = PQVoiceModel()
         voice.name = name
         voice.channel = channel

+ 2 - 2
BFFramework/Classes/Stuckpoint/ViewModel/PQStuckPointViewModel.swift

@@ -8,7 +8,7 @@
 
 import UIKit
 
-class PQStuckPointViewModel: NSObject {
+public class PQStuckPointViewModel: NSObject {
     /// 获取卡点音乐分类列表
     /// - Parameters:
     /// 通过 parentTagId 来区分层级,第一级会带上 '热门' 标签音乐列表,获取第二级标签列表会带上所选第二级的 '全部' 标签音乐列表
@@ -121,7 +121,7 @@ class PQStuckPointViewModel: NSObject {
     /// 请求再创作项目信息
     /// - Parameter projectId: 项目id
     /// - Returns: <#description#>
-    class func stuckPointProjectMusicInfo(projectId: String, complateHandle: @escaping (_ musicDetaiData: PQVoiceModel?, _ msg: String?) -> Void) {
+    class public func stuckPointProjectMusicInfo(projectId: String, complateHandle: @escaping (_ musicDetaiData: PQVoiceModel?, _ msg: String?) -> Void) {
         SWNetRequest.postRequestData(url: PQENVUtil.shared.longvideoapi + stuckPointProjectMusicInfoUrl, parames: ["projectId": projectId]) { response, _, error, _ in
             if response is NSNull || response == nil {
                 complateHandle(nil, error?.msg)

+ 1 - 1
BFFramework/Classes/Utils/PQCommonMethodUtil.swift

@@ -97,7 +97,7 @@ public func cIPHONE_X() -> Bool {
 /// - Parameters:
 ///   - url: 网络url
 ///   - mainView: 需要加载的视图
-public func netImage(url: String, mainView: Any, placeholder: UIImage = UIImage(named: "placehold_image")!) {
+public func netImage(url: String, mainView: Any, placeholder: UIImage = UIImage.init().BF_Image(named: "placehold_image")) {
     if mainView is UIImageView {
         (mainView as! UIImageView).kf.setImage(with: URL(string: url), placeholder: placeholder, options: url.suffix(5) == ".webp" ? [.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)] : nil, progressBlock: { _, _ in
 

+ 3 - 2
BFFramework/Classes/Utils/PQSingletoVideoPlayer.swift

@@ -21,7 +21,7 @@ public class PQSingletoVideoPlayer: NSObject {
 
     var playId: String = getUniqueId(desc: "playId") // 播放ID
     /// 进度回调
-    var progressBloc: ((_ loadProgress: Float, _ playProgress: Float, _ duration: Float) -> Void)?
+    public var progressBloc: ((_ loadProgress: Float, _ playProgress: Float, _ duration: Float) -> Void)?
     /// 播放状态回调
     public var playStatusBloc: ((_ playStatus: PQVIDEO_PLAY_STATUS) -> Void)?
     public var playControllerView: UIView?
@@ -75,7 +75,7 @@ public class PQSingletoVideoPlayer: NSObject {
         }
     }
 
-    func resetPlayer() {
+    public func resetPlayer() {
         if (playControllerView != nil) {
             player.removeVideoWidget()
             player.setupVideoWidget(playControllerView, insert: 0)
@@ -150,6 +150,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
                     PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_realPlay, videoData: playVideoData, pageSource: nil, businessType: .bt_videoRealPlay, objectType: nil, extParams: nil, shareId: nil, videoIds: nil, playId: playId)
                 }
             }
+            playVideoData!.playProgress = CGFloat(playProgress)
             if progressBloc != nil {
                 progressBloc!(loadProgress, playProgress, duration)
             }