Browse Source

合并130分支

huzhiqiang 3 years ago
parent
commit
96730b6f71
23 changed files with 349 additions and 35 deletions
  1. 4 0
      MusicVideoPlus.xcodeproj/project.pbxproj
  2. 22 0
      MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/Contents.json
  3. BIN
      MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/b_pyq@2x.png
  4. BIN
      MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/b_pyq@3x.png
  5. 22 0
      MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/Contents.json
  6. BIN
      MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/b_wx@2x.png
  7. BIN
      MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/b_wx@3x.png
  8. 22 0
      MusicVideoPlus/Assets.xcassets/Home/people.imageset/Contents.json
  9. BIN
      MusicVideoPlus/Assets.xcassets/Home/people.imageset/people@2x.png
  10. BIN
      MusicVideoPlus/Assets.xcassets/Home/people.imageset/people@3x.png
  11. 22 0
      MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/Contents.json
  12. BIN
      MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/pyq@2x.png
  13. BIN
      MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/pyq@3x.png
  14. 22 0
      MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/Contents.json
  15. BIN
      MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/wechat@2x.png
  16. BIN
      MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/wechat@3x.png
  17. 5 1
      MusicVideoPlus/Classes/Modules/Base/Controllers/MVBaseController.swift
  18. 73 3
      MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift
  19. 64 0
      MusicVideoPlus/Classes/Modules/Home/Views/Banner/MVBannerUsageView.swift
  20. 85 26
      MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift
  21. 1 1
      MusicVideoPlus/Classes/Modules/Mine/Controllers/MVMineProductController.swift
  22. 1 1
      MusicVideoPlus/Classes/Modules/Mine/Controllers/PQCollectionViewFlowlayout.swift
  23. 6 3
      Podfile

+ 4 - 0
MusicVideoPlus.xcodeproj/project.pbxproj

@@ -35,6 +35,7 @@
 		41CA6E702667953700874B19 /* MVSettingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E6F2667953700874B19 /* MVSettingController.swift */; };
 		41CA6F4B26689F4400874B19 /* PQMineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6F4A26689F4400874B19 /* PQMineViewModel.swift */; };
 		41CA6F782668B80D00874B19 /* PQPhoneLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6F772668B80D00874B19 /* PQPhoneLoginController.swift */; };
+		4A267701271020C400CEFDA9 /* MVBannerUsageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A267700271020C300CEFDA9 /* MVBannerUsageView.swift */; };
 		94FE06D694DF52C85DEDA82B /* Pods_MusicVideoPlus.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FA19A38D145C54301B3CD85 /* Pods_MusicVideoPlus.framework */; };
 /* End PBXBuildFile section */
 
@@ -72,6 +73,7 @@
 		41CA6E6F2667953700874B19 /* MVSettingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVSettingController.swift; sourceTree = "<group>"; };
 		41CA6F4A26689F4400874B19 /* PQMineViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PQMineViewModel.swift; sourceTree = "<group>"; };
 		41CA6F772668B80D00874B19 /* PQPhoneLoginController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PQPhoneLoginController.swift; sourceTree = "<group>"; };
+		4A267700271020C300CEFDA9 /* MVBannerUsageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVBannerUsageView.swift; sourceTree = "<group>"; };
 		6615FEB8727C4F1C21644B68 /* Pods-MusicVideoPlus.adhoc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MusicVideoPlus.adhoc.xcconfig"; path = "Target Support Files/Pods-MusicVideoPlus/Pods-MusicVideoPlus.adhoc.xcconfig"; sourceTree = "<group>"; };
 		BA41A7982C015630B0037270 /* Pods-MusicVideoPlus.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MusicVideoPlus.debug.xcconfig"; path = "Target Support Files/Pods-MusicVideoPlus/Pods-MusicVideoPlus.debug.xcconfig"; sourceTree = "<group>"; };
 		FA6E2A72ECD6573604333FD8 /* Pods-MusicVideoPlus.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MusicVideoPlus.release.xcconfig"; path = "Target Support Files/Pods-MusicVideoPlus/Pods-MusicVideoPlus.release.xcconfig"; sourceTree = "<group>"; };
@@ -131,6 +133,7 @@
 			children = (
 				4112DD822669BFA600A5AFD9 /* MVBanner.swift */,
 				4112DD852669BFFA00A5AFD9 /* MVBannerFlowLayout.swift */,
+				4A267700271020C300CEFDA9 /* MVBannerUsageView.swift */,
 			);
 			path = Banner;
 			sourceTree = "<group>";
@@ -598,6 +601,7 @@
 				2D076758266E08E700E64472 /* MVHomeController.swift in Sources */,
 				4112DD912669C11C00A5AFD9 /* MVBannerCell.swift in Sources */,
 				41CA6E6C266788F700874B19 /* MVPlayerConntroller.swift in Sources */,
+				4A267701271020C400CEFDA9 /* MVBannerUsageView.swift in Sources */,
 				41CA6E5E266782EC00874B19 /* MVBaseController.swift in Sources */,
 				2D9630D92681947300AE6FFE /* MVRequestURLUtil.swift in Sources */,
 				2D9630E326820B1900AE6FFE /* MVMineProductCell.swift in Sources */,

+ 22 - 0
MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "b_pyq@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "b_pyq@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/b_pyq@2x.png


BIN
MusicVideoPlus/Assets.xcassets/Home/b_pyq.imageset/b_pyq@3x.png


+ 22 - 0
MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "b_wx@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "b_wx@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/b_wx@2x.png


BIN
MusicVideoPlus/Assets.xcassets/Home/b_wx.imageset/b_wx@3x.png


+ 22 - 0
MusicVideoPlus/Assets.xcassets/Home/people.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "people@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "people@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/Assets.xcassets/Home/people.imageset/people@2x.png


BIN
MusicVideoPlus/Assets.xcassets/Home/people.imageset/people@3x.png


+ 22 - 0
MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "pyq@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "pyq@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/pyq@2x.png


BIN
MusicVideoPlus/Assets.xcassets/Home/pyq.imageset/pyq@3x.png


+ 22 - 0
MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "wechat@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "wechat@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/wechat@2x.png


BIN
MusicVideoPlus/Assets.xcassets/Home/wechat.imageset/wechat@3x.png


+ 5 - 1
MusicVideoPlus/Classes/Modules/Base/Controllers/MVBaseController.swift

@@ -42,7 +42,11 @@ public class MVBaseController: UIViewController, UIGestureRecognizerDelegate {
         view.addSubview(navHeadImageView!)
 
         UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
-        automaticallyAdjustsScrollViewInsets = false
+        if #available(iOS 11.0, *) {
+//            self..contentInsetAdjustmentBehavior = .never
+        } else {
+            automaticallyAdjustsScrollViewInsets = false
+        }
         navigationController?.interactivePopGestureRecognizer?.delegate = self
         fd_prefersNavigationBarHidden = true
     }

+ 73 - 3
MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -116,7 +116,7 @@ class MVHomeController: MVBaseController {
         if rootViewController is UINavigationController {
             rootViewController = (rootViewController as? UINavigationController)?.visibleViewController
         }
-        BFLog(message: "rootViewController is \(rootViewController)")
+        BFLog(message: "rootViewController is \(String(describing: rootViewController))")
         if rootViewController is MVHomeController {
             controlPlayrPasueOrResume(isPause: true)
         }
@@ -128,7 +128,7 @@ class MVHomeController: MVBaseController {
         if rootViewController is UINavigationController {
             rootViewController = (rootViewController as? UINavigationController)?.visibleViewController
         }
-        BFLog(message: "rootViewController is \(rootViewController)")
+        BFLog(message: "rootViewController is \(String(describing: rootViewController))")
         if rootViewController is MVHomeController {
             controlPlayrPasueOrResume(isPause: false)
         }
@@ -278,6 +278,7 @@ class MVHomeController: MVBaseController {
             }
             UIApplication.shared.keyWindow?.addSubview(protocalView)
         }
+        try? AVAudioSession.sharedInstance().setCategory(.playback)
     }
 
     func addLayout() {
@@ -345,7 +346,7 @@ class MVHomeController: MVBaseController {
             let remindView = PQRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
             UIApplication.shared.keyWindow?.addSubview(remindView)
             remindView.remindData = remindData
-            remindView.remindBlock = { [weak self] sender, _ in
+            remindView.remindBlock = { sender, _ in
                 if sender.tag == 2 {
                     openAppSetting()
                 }
@@ -569,10 +570,79 @@ extension MVHomeController: MVBannerDataSource, MVBannerDelegate {
             BFLog(message: "点击了创同款")
             self?.createVideo(indexPath: indexPath)
         }
+        cell.sharedBtnClicHandle = {[weak self, weak cell] type in
+            if type == 1 {
+                // 分享朋友圈
+                if !isNetConnected() {
+                    cShowHUB(superView: self?.view, msg: "没有网络连接")
+                    return
+                }
+                if !PQSingletoWXApiUtil.shared.isInstallWX() {
+                    cShowHUB(superView: self?.view, msg: "您还未安装微信客户端!")
+                    return
+                }
+                let shareId = getUniqueId(desc: "\(cell?.videoData?.reCreateVideoData?.videoId ?? "")shareId")
+                PQBaseViewModel.h5ShareLinkInfo(videoId: (cell?.videoData?.uniqueId ?? ""), pageSource: cell?.videoData?.pageSource ?? .sp_category) { [weak self] path, _ in
+                    cHiddenHUB(superView: nil)
+                    if path != nil {
+                        
+                        //判断shareText是否有效
+                        var shareText = ""
+                        shareText =  cell?.videoData?.title?.replacingOccurrences(of: "\n", with: "") ?? ""
+                        shareText = shareText.replacingOccurrences(of: " ", with: "")
+                        if(shareText.count == 0){
+                            shareText = "\(BFLoginUserInfo.shared.nickName)made a music video for you"
+                        }
+                        
+                        PQSingletoWXApiUtil.shared.share(type: 1, scene: 1, title:shareText , description: "", imageUrl: cell?.videoData?.shareImgPath, path: path, videoId: (cell?.videoData?.uniqueId)!, pageSource: cell?.videoData?.pageSource ?? .sp_category, shareId: shareId).wxApiUtilHander = { _, _ in
+                            
+                        }
+                    } else {
+                        cShowHUB(superView: self?.view, msg: "没有网络连接")
+                    }
+                }
+                // 分享朋友圈上报
+                self?.reportUpload(isFriend: false, openId: "", shareId: shareId, videoData: cell?.videoData!)
+            }else if type == 2 {
+                // 分享微信好友
+                if !isNetConnected() {
+                    cShowHUB(superView: self?.view, msg: "没有网络连接")
+                    return
+                }
+                if !PQSingletoWXApiUtil.shared.isInstallWX() {
+                    cShowHUB(superView: self?.view, msg: "您还未安装微信客户端!")
+                    return
+                }
+                cShowHUB(superView: nil, msg: nil)
+                let shareId = getUniqueId(desc: "\(cell?.videoData?.uniqueId ?? "")shareId")
+                PQBaseViewModel.wxFriendShareInfo(videoId: (cell?.videoData?.uniqueId)!) { [weak self] imagePath, title, shareWeappRawId, msg in
+                    if msg != nil {
+                        cShowHUB(superView: self?.view, msg: "网络不佳哦")
+                        return
+                    }
+                    PQSingletoWXApiUtil.shared.share(type: 3, scene: 0, shareWeappRawId: shareWeappRawId, title: title, description: title, imageUrl: imagePath, path: cell?.videoData?.videoPath, videoId: (cell?.videoData?.uniqueId)!, pageSource: cell?.videoData?.pageSource ?? .sp_category, shareId: shareId).wxApiUtilHander = { _, _ in
+                    }
+                    cHiddenHUB(superView: nil)
+                }
+                // 分享好友上报
+                self?.reportUpload(isFriend: true, openId: "", shareId: shareId, videoData: cell?.videoData!)
+     
+            }
+        }
 
         return cell
     }
 
+    func reportUpload(isFriend: Bool, openId _: String, shareId: String, videoData: PQVideoListModel?) {
+        // 分享上报
+        PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: videoData, pageSource: nil, businessType: isFriend ? .bt_videoShareFriend : .bt_videoShareH5, objectType: nil, extParams: nil, shareId: shareId, videoIds: nil, playId: PQSingletoVideoPlayer.shared.playId)
+        if isFriend {
+            PQEventTrackViewModel.shareReportUpload(videoId: videoData?.uniqueId ?? "0", pageSource: videoData!.pageSource, recommendId: videoData?.recommendId, recommendLogVO: videoData?.recommendLogVO, abInfoData: videoData?.abInfoData, measureType: videoData?.measureType, measureId: videoData?.measureId, businessType: isFriend ? .bt_videoShareFriend : .bt_videoShareH5, targetUid: videoData?.userInfo?.uid, shareId: shareId)
+            PQEventTrackViewModel.shareReportUpload(screenType: 3, videoId: videoData?.uniqueId ?? "0", pageSource: videoData!.pageSource, recommendId: videoData?.recommendId, recommendLogVO: videoData?.recommendLogVO, abInfoData: videoData?.abInfoData, measureType: videoData?.measureType, measureId: videoData?.measureId, businessType: isFriend ? .bt_videoShareFriend : .bt_videoShareH5, targetUid: videoData?.userInfo?.uid, shareId: shareId)
+        } else {
+            PQEventTrackViewModel.shareReportUpload(screenType: 2, videoId: videoData?.uniqueId ?? "0", pageSource: videoData!.pageSource, recommendId: videoData?.recommendId, recommendLogVO: videoData?.recommendLogVO, abInfoData: videoData?.abInfoData, measureType: videoData?.measureType, measureId: videoData?.measureId, businessType: isFriend ? .bt_videoShareFriend : .bt_videoShareH5, targetUid: videoData?.userInfo?.uid, shareId: shareId)
+        }
+    }
     // MARK: - GXBannerDelegate
 
     func banner(_: MVBanner, didSelectItemAt indexPath: IndexPath) {

+ 64 - 0
MusicVideoPlus/Classes/Modules/Home/Views/Banner/MVBannerUsageView.swift

@@ -0,0 +1,64 @@
+//
+//  MVBannerUsageView.swift
+//  MusicVideoPlus
+//
+//  Created by Harry Hu on 2021/10/8.
+//
+
+import Foundation
+
+class MVBannerUsageView: UIView {
+    var amount:Int = 0 {
+        didSet {
+            contentL.text = "使用量 \(amount)"
+            contentL.sizeToFit()
+        }
+    }    // 使用量
+    
+    lazy var contentL:UILabel = {
+        let contentL = UILabel(frame: .zero)
+        contentL.textColor = UIColor.white
+        contentL.font = UIFont(name: "PingFangSC-Regular", size: 12)
+        contentL.textAlignment = .left
+        contentL.text = "使用量 0"
+        return contentL
+    }()
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        
+        self.backgroundColor = .clear
+        
+        let backV = UIView()
+        backV.backgroundColor = UIColor.black
+        backV.alpha = 0.3
+        backV.layer.cornerRadius = 5
+        addSubview(backV)
+        backV.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+        let iconIV = UIImageView(image: UIImage(named: "people"))
+        iconIV.frame = CGRect(x: 6, y: 7, width: 12, height: 12)
+        addSubview(iconIV)
+        
+        
+        addSubview(contentL)
+        
+        contentL.snp.makeConstraints { make in
+            make.left.equalTo(iconIV.snp.right).offset(6.5)
+            make.top.bottom.equalToSuperview()
+            make.right.equalToSuperview().offset(-6).priorityHigh()
+        }
+
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+//    override func layoutSubviews() {
+//        super.layoutSubviews()
+//        self.layer.backgroundColor = UIColor.black.cgColor
+//        self.layer.cornerRadius = 5
+//    }
+}

+ 85 - 26
MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift

@@ -12,6 +12,7 @@ import UIKit
 class MVBannerCell: UICollectionViewCell {
     // 做同款
     var reCreateBtnClicHandle: ((_ sender: UIButton, _ videoInfo: PQVideoListModel?) -> Void)?
+    var sharedBtnClicHandle: ((_ type:Int) -> Void)?
     let musicWidth: CGFloat = (9.0 / 16.0 * (cScreenHeigth - (cDevice_iPhoneStatusBarHei + 45 + 60 + (cDefaultMargin * 2 + cSafeAreaHeight) + cDefaultMargin * 3 + 15))) - 15 - (16 + cDefaultMargin) * 2 - (10 + 106 + 10)
     // 封面
     lazy var converView: UIImageView = {
@@ -121,7 +122,37 @@ class MVBannerCell: UICollectionViewCell {
         typeLab.textColor = UIColor.white
         return typeLab
     }()
+    
+    lazy var usageAmountL:MVBannerUsageView = {
+        let v = MVBannerUsageView()
+        return v
+    }()
+    
+    lazy var friendIV:UIButton = {
+//        let iv = UIImageView(image: UIImage(named: "b_pyq"))
+        let iv = UIButton(type: .custom)
+        iv.setImage(UIImage(named: "b_pyq"), for: .normal)
+        iv.tag = 2201
+        iv.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
+        //        iv.layer.backgroundColor = UIColor.black.cgColor
+//        iv.layer.cornerRadius = 22
+//        iv.alpha = 0.3
+        return iv
+    }()
 
+    lazy var wxIV:UIButton = {
+//        let iv = UIImageView(image: UIImage(named: "b_wx"))
+        let iv = UIButton(type: .custom)
+        iv.setImage(UIImage(named: "b_wx"), for: .normal)
+        iv.tag = 2202
+        iv.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
+//        iv.layer.backgroundColor = UIColor.black.cgColor
+//        iv.layer.cornerRadius = 22
+//        iv.alpha = 0.3
+        return iv
+    }()
+
+    
     override func prepareForReuse() {
         musicNameLab.stop()
     }
@@ -145,11 +176,14 @@ class MVBannerCell: UICollectionViewCell {
         contentView.addSubview(bottmMaskView)
         contentView.addSubview(pauseView)
         bottmMaskView.addSubview(progressView)
-        bottmMaskView.addSubview(typeImage)
+//        bottmMaskView.addSubview(typeImage)
+//        bottmMaskView.addSubview(typeLab)
         bottmMaskView.addSubview(titleLabel)
+        bottmMaskView.addSubview(usageAmountL)
+        bottmMaskView.addSubview(friendIV)
+        bottmMaskView.addSubview(wxIV)
+
         
-        
-        bottmMaskView.addSubview(typeLab)
         bottmMaskView.addSubview(reCreateBtn)
         bottmMaskView.addSubview(musicContenView)
         musicContenView.addSubview(musicBgView)
@@ -176,11 +210,13 @@ class MVBannerCell: UICollectionViewCell {
    
 
         
-        if videoData?.categoryImage != nil {
-            typeImage.setNetImage(url: "\(videoData?.categoryImage ?? "")", placeholder: UIImage(named: "categary_icon")!)
-        } else {
-            typeImage.image = UIImage(named: "categary_icon")
-        }
+//        if videoData?.categoryImage != nil {
+//            typeImage.setNetImage(url: "\(videoData?.categoryImage ?? "")", placeholder: UIImage(named: "categary_icon")!)
+//        } else {
+//            typeImage.image = UIImage(named: "categary_icon")
+//        }
+        usageAmountL.amount = videoData?.reCreateVideoData?.reProduceCount ?? 0
+        
         let coverImg = (videoData?.videoCoverSnapshotPath != nil && (videoData?.videoCoverSnapshotPath?.count ?? 0) > 0) ? videoData?.videoCoverSnapshotPath ?? "" : (videoData?.coverImg?["coverImgPath"] as? String ?? "")
         BFLog(message: "coverImg url is \(coverImg)")
         netImage(url: coverImg, mainView: converView)
@@ -255,29 +291,52 @@ class MVBannerCell: UICollectionViewCell {
             make.right.top.height.equalToSuperview()
         }
 
-        if(videoData?.title?.count ?? 0 > 0){
-            typeImage.snp.remakeConstraints { make in
-                make.left.equalTo(musicContenView.snp_left)
-                make.height.width.equalTo(18)
-                make.bottom.equalTo(titleLabel.snp_top).offset(-8)
-            }
-        }else{
-            typeImage.snp.remakeConstraints { make in
-                make.left.equalTo(musicContenView.snp_left)
-                make.height.width.equalTo(18)
-                make.bottom.equalTo(musicContenView.snp_top).offset(-cDefaultMargin)
-            }
+//        if(videoData?.title?.count ?? 0 > 0){
+//            typeImage.snp.remakeConstraints { make in
+//                make.left.equalTo(musicContenView.snp_left)
+//                make.height.width.equalTo(18)
+//                make.bottom.equalTo(titleLabel.snp_top).offset(-8)
+//            }
+//        }else{
+//            typeImage.snp.remakeConstraints { make in
+//                make.left.equalTo(musicContenView.snp_left)
+//                make.height.width.equalTo(18)
+//                make.bottom.equalTo(musicContenView.snp_top).offset(-cDefaultMargin)
+//            }
+//        }
+//
+//        typeLab.snp.remakeConstraints { make in
+//            make.left.equalTo(typeImage.snp_right).offset(5)
+//            make.centerY.equalTo(typeImage)
+//            make.right.equalTo(musicContenView)
+//        }
+        wxIV.snp.makeConstraints { make in
+            make.right.equalTo(-12)
+            make.bottom.equalTo(titleLabel.snp_top).offset(-9)
+            make.width.height.equalTo(44)
         }
-   
-        typeLab.snp.remakeConstraints { make in
-            make.left.equalTo(typeImage.snp_right).offset(5)
-            make.centerY.equalTo(typeImage)
-            make.right.equalTo(musicContenView)
+        friendIV.snp.makeConstraints { make in
+            make.right.equalTo(wxIV.snp_left).offset(-8)
+            make.width.height.bottom.equalTo(wxIV)
+        }
+        usageAmountL.snp.remakeConstraints { make in
+            make.left.equalTo(12)
+            make.height.equalTo(26)
+            make.bottom.equalTo(titleLabel.snp_top).offset(-13)
+            make.right.lessThanOrEqualTo(friendIV.snp_left).offset(-8)
         }
     }
 
     @objc func btnClick(sender: UIButton) {
-        if reCreateBtnClicHandle != nil {
+        if sender.tag == 2201 {
+            // 分享朋友圈
+//            cShowHUB(superView: nil, msg: "分享朋友圈")
+            sharedBtnClicHandle?(1)
+        }else if sender.tag == 2202 {
+            // 分享给微信好友
+//            cShowHUB(superView: nil, msg: "分享微信好友")
+            sharedBtnClicHandle?(2)
+        }else if reCreateBtnClicHandle != nil {
             reCreateBtnClicHandle!(sender, videoData)
         }
     }

+ 1 - 1
MusicVideoPlus/Classes/Modules/Mine/Controllers/MVMineProductController.swift

@@ -98,7 +98,7 @@ class MVMineProductController: PQBaseViewController {
                     } else {
                         self?.itemsList = self!.itemsList + videoList!
                     }
-                    self?.flowLayout.findList = self?.itemsList as! [PQVideoListModel]
+                    self?.flowLayout.findList = self?.itemsList as! [Any]
                     self?.collectionView.reloadData()
                     self?.emptyView.isHidden = true
                 } else {

+ 1 - 1
MusicVideoPlus/Classes/Modules/Mine/Controllers/PQCollectionViewFlowlayout.swift

@@ -77,7 +77,7 @@ class PQCollectionViewFlowlayout: UICollectionViewFlowLayout {
 
         // 找出最高列列号
         let maxHeight: Int = columnHeight.sorted().last!
-        let column = columnHeight.index(of: maxHeight)
+        let column = columnHeight.firstIndex(of: maxHeight)
         // 根据最高列设置itemSize 使用总高度的平均值
         var itemH = 0
 

+ 6 - 3
Podfile

@@ -8,10 +8,11 @@ target 'MusicVideoPlus' do
 #  pod "BFFramework" ,:git => 'https://git.yishihui.com/iOS/BFFramework.git' , :tag => '1.0.3'
    pod "BFFramework" ,:git => 'https://git.yishihui.com/iOS/BFFramework.git'
   # 使用本地路径
-# pod 'BFFramework', :path => '/Users/ak/Desktop/BFFramework/'
+#  pod 'BFFramework', :path => '/Users/ak/Desktop/BFFramework/'
 #  pod 'BFFramework', :path => '/Users/sanw/Desktop/BytesFlow/Projects/BFFramework/'
-
- 
+#  pod 'BFFramework', :path => '../BFFramework'
+#  pod 'BFFramework', :git => 'https://git.yishihui.com/iOS/BFFramework.git', :tag => '0.1.6'
+#  pod 'BFFramework', :git => 'https://git.yishihui.com/iOS/BFFramework.git', :branch => 'mv-dev-130'
 
   pod 'JWTDecode','2.6.0' # Apple登陆校验库
   pod 'TYAttributedLabel','2.6.9' #  富文本
@@ -19,4 +20,6 @@ target 'MusicVideoPlus' do
   pod 'UMDevice','1.2.0'
   pod 'UMCSecurityPlugins','1.0.6'
   pod 'UMAPM','1.2.1'
+  # debug 模式下连接沙盒调试工具 
+  pod 'WoodPeckeriOS', :configurations => ['Debug']
 end