瀏覽代碼

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework
合并代码

jsonwang 3 年之前
父節點
當前提交
daab4ea542

+ 1 - 1
BFFramework/Classes/Base/Controller/PQBaseViewController.swift

@@ -158,7 +158,7 @@ open class PQBaseViewController: UIViewController, UIGestureRecognizerDelegate {
 
     deinit {
         PQNotification.removeObserver(self)
-        BFLog(message: "\(String(describing: type(of: self)))被销毁")
+        BFLog(1, message: "\(String(describing: type(of: self)))被销毁 release")
     }
 
     override open var preferredStatusBarStyle: UIStatusBarStyle {

+ 10 - 10
BFFramework/Classes/Base/Controller/PQPhotoAlbumController.swift

@@ -42,28 +42,28 @@ open class PQPhotoAlbumController: PQBaseViewController {
     }()
 
     lazy  public var emptyRemindView: PQEmptyRemindView = {
-        let emptyRemindView = PQEmptyRemindView(frame: albaumCollectionView.bounds)
-        emptyRemindView.isHidden = true
+        let remindView = PQEmptyRemindView(frame: albaumCollectionView.bounds)
+        remindView.isHidden = true
         albaumCollectionView.addSubview(emptyRemindView)
-        emptyRemindView.backgroundColor = PQBFConfig.shared.styleBackGroundColor
-        emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
-            if emptyRemindView.refreshBtn.currentTitle == "授予权限" {
+        remindView.backgroundColor = PQBFConfig.shared.styleBackGroundColor
+        remindView.fullRefreshBloc = { [weak self] _, _ in
+            if self?.emptyRemindView.refreshBtn.currentTitle == "授予权限" {
                 openAppSetting()
-            } else if emptyRemindView.refreshBtn.currentTitle == "刷新" {
+            } else if self?.emptyRemindView.refreshBtn.currentTitle == "刷新" {
                 self?.albaumsData.removeAll()
                 self?.loadPhotoData()
             }
         }
-        emptyRemindView.remindLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
-        emptyRemindView.refreshBtn.setTitle("授予权限", for: .normal)
+        remindView.remindLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
+        remindView.refreshBtn.setTitle("授予权限", for: .normal)
         let anthorEmptyData = PQEmptyModel()
         anthorEmptyData.title = "挑选相册素材"
         anthorEmptyData.summary = "要挑选相册素材,请先授予相册使用权限"
         anthorEmptyData.emptyImage = "icon_authorError"
         anthorEmptyData.isRefreshHidden = false
         anthorEmptyData.refreshBgColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
-        emptyRemindView.emptyData = anthorEmptyData
-        return emptyRemindView
+        remindView.emptyData = anthorEmptyData
+        return remindView
     }()
 
     lazy  public var albaumView: UIView = {

+ 10 - 10
BFFramework/Classes/Base/Controller/PQPhotoMaterialController.swift

@@ -97,22 +97,22 @@ class PQPhotoMaterialController: PQBaseViewController {
     }()
 
     lazy var emptyRemindView: PQEmptyRemindView = {
-        let emptyRemindView = PQEmptyRemindView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))
-        emptyRemindView.isHidden = true
-        photoCollectionView.addSubview(emptyRemindView)
-        emptyRemindView.backgroundColor = PQBFConfig.shared.styleBackGroundColor
-        emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
-            if emptyRemindView.refreshBtn.currentTitle == "授予权限" {
+        let remindView = PQEmptyRemindView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))
+        remindView.isHidden = true
+        photoCollectionView.addSubview(remindView)
+        remindView.backgroundColor = PQBFConfig.shared.styleBackGroundColor
+        remindView.fullRefreshBloc = { [weak self] _, _ in
+            if self?.emptyRemindView.refreshBtn.currentTitle == "授予权限" {
                 openAppSetting()
-            } else if emptyRemindView.refreshBtn.currentAttributedTitle == NSMutableAttributedString(string: "刷新") {
+            } else if self?.emptyRemindView.refreshBtn.currentAttributedTitle == NSMutableAttributedString(string: "刷新") {
                 self?.loadLocalData()
             } else if self?.emptyRefreshHandle != nil {
                 self?.emptyRefreshHandle!(self?.msgType ?? .all)
             }
         }
-        emptyRemindView.remindLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
-        emptyRemindView.refreshBtn.addCorner(corner: 4)
-        return emptyRemindView
+        remindView.remindLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
+        remindView.refreshBtn.addCorner(corner: 4)
+        return remindView
     }()
 
     override func viewDidLoad() {

+ 1 - 1
BFFramework/Classes/PQGPUImage/akfilters/PQImageFilter.swift

@@ -37,7 +37,7 @@ open class PQImageFilter: PQBaseFilter {
             FilterLog(message: "图片数据为空,创建失败")
             return
         }
-        print("mSticker path : \(String(describing: mSticker!.locationPath))")
+//        print("mSticker path : \(String(describing: mSticker!.locationPath))")
 
         newImage = UIImage(contentsOfFile: documensDirectory + sticker.locationPath)
 

+ 8 - 7
BFFramework/Classes/PQGPUImage/akfilters/PQMovieInput.swift

@@ -195,8 +195,8 @@ public class PQMovieInput: ImageSource {
         self.videoInputStatusObserver?.invalidate()
         self.audioInputStatusObserver?.invalidate()
         self.avPlayerTimeObserver?.invalidate()
-        
-        BFLog(message: "movieinput 销毁")
+
+        BFLog(1, message: "movieinput release")
     }
 
     // MARK: -
@@ -426,7 +426,7 @@ public class PQMovieInput: ImageSource {
             FilterLog(message: "assetReader init \(assetReader)  asset url is \(asset)")
             if audioMix == nil {
                 if let audioTrack = asset.tracks(withMediaType: .audio).first, let _ = audioEncodingTarget {
-                    FilterLog(message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
+                    BFLog(1, message: "audioTrack start \(audioTrack.timeRange.start) \(audioTrack.timeRange.duration.value)")
 
                     let readerAudioTrackOutput = AVAssetReaderTrackOutput(track: audioTrack, outputSettings: audioSettings)
                     readerAudioTrackOutput.alwaysCopiesSampleData = false
@@ -471,7 +471,7 @@ public class PQMovieInput: ImageSource {
             
     
             let prgressValue = (currTime - start) / (duration - start)
-            FilterLog(message: "\(mIsExport) movinput 当前时间 is \(currTime) 当前进度:\(prgressValue)")
+//            BFLog(1, message: "\(mIsExport) movinput 当前时间 is \(currTime) curr当前进度:\(prgressValue)")
             progress?(currTime, duration, prgressValue)
 
             sharedImageProcessingContext.runOperationSynchronously {
@@ -498,6 +498,7 @@ public class PQMovieInput: ImageSource {
          case cancelled = 4
          */
         FilterLog(message: "音频解码状态\(assetReader.status.rawValue)")
+        BFLog(1, message:  "音频解码状态\(assetReader.status.rawValue)")
         
         autoreleasepool {
             guard let sampleBuffer = audioTrackOutput.copyNextSampleBuffer(),CMSampleBufferIsValid(sampleBuffer) else {
@@ -700,7 +701,7 @@ extension PQMovieInput {
                 let range = strongSelf.musicPlayRanges?[strongSelf.indexRage]
                 playerItem.forwardPlaybackEndTime = range!.end
                 playerItem.reversePlaybackEndTime = range!.start
-//                HHZPrint("curr: start ********************\(CMTimeGetSeconds(range.start)) - \(playerItem.reversePlaybackEndTime) - \(playerItem.forwardPlaybackEndTime)")
+//                BFLog(1, message: "curr: start ********************\(CMTimeGetSeconds(range.start)) - \(playerItem.reversePlaybackEndTime) - \(playerItem.forwardPlaybackEndTime)")
                 strongSelf.avPlayer!.seek(to: playerItem.reversePlaybackEndTime) { isSuccess in
                     playerItem.seek(to: playerItem.reversePlaybackEndTime) { isSuccess in
                         strongSelf.avPlayer!.play()
@@ -712,8 +713,8 @@ extension PQMovieInput {
         }
         
 //        avPlayerTimeObserver = avPlayer!.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 4), queue: DispatchQueue.global()) {[weak self] time in
-            // 进度监控
-//            HHZPrint("index:\(self?.indexRage), curr:\(CMTimeGetSeconds(time))")
+//             进度监控
+//            BFLog(1, message: "cont:\(CMTimeGetSeconds(time) - CMTimeGetSeconds((self?.musicPlayRanges?.first!.start)!)), curr:\(CMTimeGetSeconds(time))")
 //        } as? NSKeyValueObservation
     }
     

+ 19 - 17
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -144,7 +144,7 @@ class PQStuckPointEditerController: PQBaseViewController {
         }
         /// 拖缀结束的回调 type - 1-拖动左边裁剪结束 2--拖动右边裁剪结束 3-进度条拖动结束 4-滑动结束
         stuckPointCuttingView.videoDidEndDragging = { [weak self] type, startTime, endTime, progress in
-            BFLog(message: "拖拽结束返回--type = \(type),startTime = \(startTime),endTime = \(endTime),progress = \(progress)")
+            BFLog(1, message: "拖拽结束返回--type = \(type),startTime = \(startTime),endTime = \(endTime),progress = \(progress)")
             self?.playerView.pause()
             self?.musicEditBGView.pausePlayer()
 
@@ -335,21 +335,21 @@ class PQStuckPointEditerController: PQBaseViewController {
 
     // 固定速度 UI
     lazy var speedSettingView: PQSpeedSettingView = {
-        let speedSettingView = PQSpeedSettingView()
-        speedSettingView.backgroundColor = .clear
-        speedSettingView.selectSpeedCallBack = { [weak self] maxSpeed, minSpeed, selectIndex, isSettingPlayer in
+        let speedSetView = PQSpeedSettingView()
+        speedSetView.backgroundColor = .clear
+        speedSetView.selectSpeedCallBack = { [weak self] maxSpeed, minSpeed, selectIndex, isSettingPlayer in
             BFLog(message: "固定maxSpeed is\(maxSpeed) minSpeed \(minSpeed)")
             self?.musicEditBGView.pausePlayer()
 
             if maxSpeed == -1.0 && minSpeed == -1.0 {
                 self?.customSpeedSettingView.isHidden = false
-                self?.customSpeedSettingView.viewType = speedSettingView.viewType
+                self?.customSpeedSettingView.viewType = self?.speedSettingView.viewType ?? 2
             } else {
                 if maxSpeed != 0.0 {
                     // 更新最后一次选择的位置恢复时使用
-                    if speedSettingView.viewType == 1 {
+                    if self?.speedSettingView.viewType == 1 {
                         self?.lastSpeedSelectIndex = selectIndex
-                    } else if speedSettingView.viewType == 2 {
+                    } else if self?.speedSettingView.viewType == 2 {
                         self?.lastJumpSpeedSelectIndex = selectIndex
                     } else {
                         self?.lastCyclesSelectIndex = selectIndex
@@ -364,7 +364,7 @@ class PQStuckPointEditerController: PQBaseViewController {
                 self?.settingPlayerView()
             }
         }
-        return speedSettingView
+        return speedSetView
 
     }()
     
@@ -379,9 +379,9 @@ class PQStuckPointEditerController: PQBaseViewController {
 
     // 自定义速度
     lazy var customSpeedSettingView: PQCustomSpeedSettingView = {
-        let customSpeedSettingView = PQCustomSpeedSettingView(frame: CGRect(x: 0, y: cScreenHeigth - 354, width: cScreenWidth, height: 354))
-        customSpeedSettingView.isHidden = true
-        customSpeedSettingView.selectSpeedCallBack = { [weak self] maxSpeed, minSpeed, isJumpSpeedModel, isCancle in
+        let customSpeedSetView = PQCustomSpeedSettingView(frame: CGRect(x: 0, y: cScreenHeigth - 354, width: cScreenWidth, height: 354))
+        customSpeedSetView.isHidden = true
+        customSpeedSetView.selectSpeedCallBack = { [weak self, weak customSpeedSetView] maxSpeed, minSpeed, isJumpSpeedModel, isCancle in
             if !isCancle {
                 self?.maxSpeed = maxSpeed
                 self?.minSpeed = minSpeed
@@ -410,10 +410,10 @@ class PQStuckPointEditerController: PQBaseViewController {
                     self?.speedSettingView.setSelectItem(index: self?.lastCyclesSelectIndex ?? 0, isSettingPlayer: false)
                 }
 
-                customSpeedSettingView.isHidden = true
+                customSpeedSetView?.isHidden = true
             }
         }
-        return customSpeedSettingView
+        return customSpeedSetView
 
     }()
 
@@ -1041,7 +1041,7 @@ class PQStuckPointEditerController: PQBaseViewController {
         PQSingletoMemoryUtil.shared.allExportSession.forEach { _, exportSession in
             exportSession.cancelExport()
         }
-        BFLog(message: "卡点视频预览界面销毁")
+        BFLog(1, message: "卡点视频预览界面release")
     }
 }
 
@@ -1140,6 +1140,9 @@ extension PQStuckPointEditerController {
                                 if deepCopySticker != nil {
                                     deepCopySticker?.generateDefaultValues()
                                     stickers.append(deepCopySticker!)
+                                    
+                                    BFLog(1, message: "测试人员index is 纯图片 timelineOut:\(deepCopySticker!.timelineIn) timelineOut :\(deepCopySticker!.timelineOut)")
+
                                 }
                             }
                         }
@@ -1254,8 +1257,7 @@ extension PQStuckPointEditerController {
 
                                         lastOutTime = deepCopySticker?.out ?? 0
                                     }
-
-                                    BFLog(message: "测试人员创建 sticker  crilp is in 视频 \(String(format: "%.6f", deepCopySticker?.model_in ?? 0))  out  \(String(format: "%.6f", deepCopySticker?.out ?? 0)) ,分段素材时长:\(String(format: "%.6f", (deepCopySticker?.out ?? 0) - (deepCopySticker?.model_in ?? 0))) ,分段显示时长:\(String(format: "%.6f", (deepCopySticker?.timelineOut ?? 0) - (deepCopySticker?.timelineIn ?? 0))), 视频素材原时长\(CMTimeGetSeconds(asset.duration)) timelineIN: \(String(format: "%.6f", deepCopySticker?.timelineIn ?? 0)) timelineOUT:\(String(format: "%.6f", deepCopySticker?.timelineOut ?? 0)) speedRate:\(deepCopySticker?.speedRate ?? 0.0)")
+                                    BFLog(1, message: "测试人员创建 sticker  crilp is in 视频 \(String(format: "%.6f", deepCopySticker?.model_in ?? 0))  out  \(String(format: "%.6f", deepCopySticker?.out ?? 0)) ,分段素材时长:\(String(format: "%.6f", (deepCopySticker?.out ?? 0) - (deepCopySticker?.model_in ?? 0))) ,分段显示时长:\(String(format: "%.6f", (deepCopySticker?.timelineOut ?? 0) - (deepCopySticker?.timelineIn ?? 0))), 视频素材原时长\(CMTimeGetSeconds(asset.duration)) timelineIN: \(String(format: "%.6f", deepCopySticker?.timelineIn ?? 0)) timelineOUT:\(String(format: "%.6f", deepCopySticker?.timelineOut ?? 0)) speedRate:\(deepCopySticker?.speedRate ?? 0.0)")
 
                                     if deepCopySticker != nil {
                                         stickers.append(deepCopySticker!)
@@ -1271,7 +1273,7 @@ extension PQStuckPointEditerController {
                                 sticker.timelineIn = Float64(String(format: "%.6f",finallyStuckPoints[stickers.count])) ?? 0.0
                                 sticker.timelineOut = Float64(String(format: "%.6f",finallyStuckPoints[stickers.count + 1])) ?? 0.0
                                 stickers.append(sticker)
-                                BFLog(message: "测试人员创建 sticker  crilp is in 图片 \(String(format: "%.6f", sticker.model_in))  out  \(String(format: "%.6f", sticker.out)) ,分段素材时长:\(String(format: "%.6f", (sticker.out) - (sticker.model_in))) ,分段显示时长:\(String(format: "%.6f", (sticker.timelineOut) - (sticker.timelineIn))),   timelineIN: \(String(format: "%.6f", sticker.timelineIn)) timelineOUT:\(String(format: "%.6f", sticker.timelineOut)) speedRate:\(sticker.speedRate)")
+                                BFLog(1, message: "测试人员创建 sticker  crilp is in 图片 \(String(format: "%.6f", sticker.model_in))  out  \(String(format: "%.6f", sticker.out)) ,分段素材时长:\(String(format: "%.6f", (sticker.out) - (sticker.model_in))) ,分段显示时长:\(String(format: "%.6f", (sticker.timelineOut) - (sticker.timelineIn))),   timelineIN: \(String(format: "%.6f", sticker.timelineIn)) timelineOUT:\(String(format: "%.6f", sticker.timelineOut)) speedRate:\(sticker.speedRate)")
                             }
                         }
                     }

+ 4 - 0
BFFramework/Classes/Stuckpoint/View/PQCustomSpeedSettingView.swift

@@ -166,6 +166,10 @@ class PQCustomSpeedSettingView: UIView {
     required init?(coder _: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
+    
+    deinit {
+        BFLog(1, message: "custom speed setting view release")
+    }
 
     func showHiddenView() {
         customSpeedFastView.isHidden = !(viewType == 1)

+ 5 - 0
BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

@@ -113,6 +113,11 @@ class PQSpeedSettingView: UIView {
     required init?(coder _: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
+    
+    
+    deinit {
+        BFLog(1, message: "speed setting view release")
+    }
     //设置默认选择的
     /// - Parameters:
     ///   - index: index: 第几位 从0 开始

+ 2 - 3
BFFramework/Classes/Stuckpoint/View/PQStuckPointCuttingView.swift

@@ -167,7 +167,7 @@ class PQStuckPointCuttingView: UIView {
         
         tatalTimeLabel.text = "\(Float64(stuckPointEndTime - stuckPointStartTime).formatDurationToHMS())"
   
-        BFLog(message: "推荐开始\(stuckPointStartTime) 结束\(stuckPointEndTime) 时长为:\(stuckPointEndTime - stuckPointStartTime)  音乐总时长为:\(videoDuration)")
+        BFLog(1, message: "推荐开始\(stuckPointStartTime) 结束\(stuckPointEndTime) 时长为:\(stuckPointEndTime - stuckPointStartTime)  音乐总时长为:\(videoDuration)")
         backgroundColor = PQBFConfig.shared.styleBackGroundColor
         addSubview(scrollView)
 
@@ -210,8 +210,7 @@ class PQStuckPointCuttingView: UIView {
         }
         scrollView.contentSize = CGSize(width: contentWidth, height: scrollView.frame.height)
         
-//        HHZPrint("框内个数:\(wavSelectCount), 总线条数:\(wavTotalCount), 框宽:\(cropViewWidth)")
-        
+        BFLog(1, message: "框内个数:\(wavSelectCount), 总线条数:\(wavTotalCount), 框宽:\(cropViewWidth)")
         scrollView.subviews.forEach { lable in
             if lable is UILabel && lable.tag != 66 {
                 lable.removeFromSuperview()

+ 12 - 9
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -213,13 +213,13 @@ public class PQGPUImagePlayerView: UIView {
 
     }()
 
+    //进度的开始时间
+    var showProgressStartTime:Float = 0.0
+
     required public init?(coder _: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
     
-    //进度的开始时间
-    var showProgressStartTime:Float = 0.0
-
     override public init(frame: CGRect) {
         super.init(frame: frame)
 
@@ -351,6 +351,7 @@ public class PQGPUImagePlayerView: UIView {
         stop()
         movie = nil
         speaker = nil
+        BFLog(1, message: "play view release")
     }
 
     /// XXXX 这里的 URL 使用的是全路径 ,如果不是全的会 crash ,方便复用 (不用处理业务的文件放在哪里)
@@ -360,7 +361,9 @@ public class PQGPUImagePlayerView: UIView {
         var composition: AVMutableComposition?
 
         let asset = AVURLAsset(url: url, options: nil)
-        FilterLog(message: "播放器初始化的音频时长\(asset.duration.seconds)  url is \(url),最终使用时长\(originMusicDuration),裁剪范围\(CMTimeGetSeconds(clipAudioRange.start)) 到 \(CMTimeGetSeconds(clipAudioRange.end))")
+//        FilterLog(message: "播放器初始化的音频时长\(asset.duration.seconds)  url is \(url),最终使用时长\(originMusicDuration),裁剪范围\(CMTimeGetSeconds(clipAudioRange.start)) 到 \(CMTimeGetSeconds(clipAudioRange.end))")
+        BFLog(1, message:  "播放器初始化的音频时长\(asset.duration.seconds)  url is \(url),最终使用时长\(originMusicDuration),裁剪范围\(CMTimeGetSeconds(clipAudioRange.start)) 到 \(CMTimeGetSeconds(clipAudioRange.end))")
+
         self.asset = asset
         if (audioMixModel != nil && audioMixModel?.localPath != nil) || (videoStickers != nil && (videoStickers?.count ?? 0) > 0 || originMusicDuration != 0) {
             FilterLog(message: "有参加混音的数据。")
@@ -413,7 +416,7 @@ public class PQGPUImagePlayerView: UIView {
         movie.progress = { [weak self] currTime, duration, prgressValue in
             guard let strongSelf = self else { return }
 
-//            HHZPrint(" movie 进度\(currTime)")
+//            BFLog(1, message: " movie 进度\(currTime)")
             strongSelf.changeFilter(currTime: currTime)
             strongSelf.progress?(currTime, duration, prgressValue)
 
@@ -548,23 +551,23 @@ public class PQGPUImagePlayerView: UIView {
     func changeFilter(currTime: Float64) {
         let  starts:CFTimeInterval = CFAbsoluteTimeGetCurrent()
          
-        FilterLog(message: " 要查找的 currTime is \(currTime)")
+        BFLog(message: " 要查找的 currTime is \(currTime)")
         //1,删除已经显示过的 filter
         self.cacheFilters.removeAll(where: {(filter) -> Bool in
 
-            (currTime > (filter.stickerInfo?.timelineOut ?? 0.0))
+            (Int(currTime * 1000) > Int((filter.stickerInfo?.timelineOut ?? 0.0) * 1000))
         })
  
         // 2,找出一个要显示的 fitler
         let showIndex = cacheFilters.firstIndex(where: { (filter) -> Bool in
-            (currTime >= (filter.stickerInfo?.timelineIn ?? 0.0) && currTime <= (filter.stickerInfo?.timelineOut ?? 0.0))
+            (Int(currTime * 1000) >= Int((filter.stickerInfo?.timelineIn ?? 0.0) * 1000) && Int(currTime * 1000) <= Int((filter.stickerInfo?.timelineOut ?? 0.0) * 1000))
         })
   
         if(showIndex == nil){
           
             FilterLog(message: "缓存没有查找到?出现数据错误!!!!")
             for (index,bsFilter )in cacheFilters.enumerated() {
-                print( "22222缓存操作   没要查找到要查找的显示是为:\(currTime) 缓存数据timeline in :\(bsFilter.stickerInfo?.timelineIn ?? 0.0)) timelineOut:\(bsFilter.stickerInfo?.timelineOut ?? 0.0) 缓存数 \(cacheFilters.count) index: \(index)")
+                BFLog(1, message: "22222缓存操作   没要查找到要查找的显示是为:\(currTime) 缓存数据timeline in :\(bsFilter.stickerInfo?.timelineIn ?? 0.0)) timelineOut:\(bsFilter.stickerInfo?.timelineOut ?? 0.0) 缓存数 \(cacheFilters.count) index: \(index)")
             }
             
             return

+ 19 - 11
BFFramework/Classes/Utils/PQCommonMethodUtil.swift

@@ -133,17 +133,25 @@ public func kf_imageCacheImage(originUrl: String, completeHandle: @escaping (_ i
 }
 
 /** 打印 */
-public func BFLog<T>(message: T) {
+public func BFLog<T>( _ type : Int = 0, message: T) {
  
-    let logger = NXLogger.shared
-
-    logger.level = .info
-    logger.ouput = .deviceConsoleAndFile
-
-    logger.d(message as? String ?? "")
-    
-    BuglyLog.level(.warn, logs: message as? String)
-    
+    if type == 2 {
+        let logger = NXLogger.shared
+        
+        logger.level = .info
+        logger.ouput = .deviceConsoleAndFile
+        
+        logger.d(message as? String ?? "")
+        
+        BuglyLog.level(.warn, logs: message as? String)
+    }else if type == 1 {
+#if DEBUG
+        let file = (#file as NSString).lastPathComponent;
+        let dateFmt = DateFormatter()
+        dateFmt.dateFormat = "HH:mm:ss:SSS"
+        print("hhz-\(dateFmt.string(from: Date())) \(file):(\(#line))--\(message)");
+#endif
+    }
 //    if PQENVUtil.shared.envMode == .ENVModeTest {
 //     
 //    }else{
@@ -408,7 +416,7 @@ public func getMachineCode() -> String {
         uuid = NSUUID().uuidString
         keychain["machineCode"] = uuid
     }
-    BFLog(message: "正式账号mid:\(uuid)")
+//    BFLog(message: "正式账号mid:\(uuid)")
     return uuid
 }
 

+ 7 - 7
BFFramework/Classes/selectImage/PQUploadController.swift

@@ -157,17 +157,17 @@ class PQUploadController: PQBaseViewController {
     }()
 
     lazy var emptyRemindView: PQEmptyRemindView = {
-        let emptyRemindView = PQEmptyRemindView(frame: CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth, height: cScreenHeigth - cDevice_iPhoneNavBarAndStatusBarHei))
-        emptyRemindView.isHidden = true
-        emptyRemindView.emptyData = anthorEmptyData
-        view.addSubview(emptyRemindView)
-        emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
+        let remindView = PQEmptyRemindView(frame: CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth, height: cScreenHeigth - cDevice_iPhoneNavBarAndStatusBarHei))
+        remindView.isHidden = true
+        remindView.emptyData = anthorEmptyData
+        view.addSubview(remindView)
+        remindView.fullRefreshBloc = { [weak self] _, _ in
             self?.isJumpToAuthorization = true
-            if emptyRemindView.refreshBtn.currentTitle == "授予权限" {
+            if self?.emptyRemindView.refreshBtn.currentTitle == "授予权限" {
                 openAppSetting()
             }
         }
-        return emptyRemindView
+        return remindView
     }()
 
     lazy var collectionView: UICollectionView = {