浏览代码

1.我的页

wenweiwei 3 年之前
父节点
当前提交
49d977b95d

+ 21 - 13
MusicVideoPlus.xcodeproj/project.pbxproj

@@ -14,6 +14,9 @@
 		2D9630D52681874D00AE6FFE /* MVPlayControlViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630D42681874D00AE6FFE /* MVPlayControlViewCell.swift */; };
 		2D9630D52681874D00AE6FFE /* MVPlayControlViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630D42681874D00AE6FFE /* MVPlayControlViewCell.swift */; };
 		2D9630D92681947300AE6FFE /* MVRequestURLUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630D82681947300AE6FFE /* MVRequestURLUtil.swift */; };
 		2D9630D92681947300AE6FFE /* MVRequestURLUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630D82681947300AE6FFE /* MVRequestURLUtil.swift */; };
 		2D9630DC2681C8AB00AE6FFE /* MVMineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630DB2681C8AB00AE6FFE /* MVMineViewModel.swift */; };
 		2D9630DC2681C8AB00AE6FFE /* MVMineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630DB2681C8AB00AE6FFE /* MVMineViewModel.swift */; };
+		2D9630DE268206F300AE6FFE /* MVMineProductController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630DD268206F300AE6FFE /* MVMineProductController.swift */; };
+		2D9630E12682096900AE6FFE /* PQCollectionViewFlowlayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630E02682096900AE6FFE /* PQCollectionViewFlowlayout.swift */; };
+		2D9630E326820B1900AE6FFE /* MVMineProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D9630E226820B1900AE6FFE /* MVMineProductCell.swift */; };
 		4112DD832669BFA600A5AFD9 /* MVBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD822669BFA600A5AFD9 /* MVBanner.swift */; };
 		4112DD832669BFA600A5AFD9 /* MVBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD822669BFA600A5AFD9 /* MVBanner.swift */; };
 		4112DD862669BFFA00A5AFD9 /* MVBannerFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD852669BFFA00A5AFD9 /* MVBannerFlowLayout.swift */; };
 		4112DD862669BFFA00A5AFD9 /* MVBannerFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD852669BFFA00A5AFD9 /* MVBannerFlowLayout.swift */; };
 		4112DD912669C11C00A5AFD9 /* MVBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD902669C11C00A5AFD9 /* MVBannerCell.swift */; };
 		4112DD912669C11C00A5AFD9 /* MVBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4112DD902669C11C00A5AFD9 /* MVBannerCell.swift */; };
@@ -25,7 +28,6 @@
 		418532302665342100DCA2C1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4185322F2665342100DCA2C1 /* AppDelegate.swift */; };
 		418532302665342100DCA2C1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4185322F2665342100DCA2C1 /* AppDelegate.swift */; };
 		418532392665342200DCA2C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 418532382665342200DCA2C1 /* Assets.xcassets */; };
 		418532392665342200DCA2C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 418532382665342200DCA2C1 /* Assets.xcassets */; };
 		41CA6E5E266782EC00874B19 /* MVBaseController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E5D266782EC00874B19 /* MVBaseController.swift */; };
 		41CA6E5E266782EC00874B19 /* MVBaseController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E5D266782EC00874B19 /* MVBaseController.swift */; };
-		41CA6E662667887C00874B19 /* MVMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E652667887C00874B19 /* MVMineController.swift */; };
 		41CA6E69266788C000874B19 /* MVLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E68266788C000874B19 /* MVLoginController.swift */; };
 		41CA6E69266788C000874B19 /* MVLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E68266788C000874B19 /* MVLoginController.swift */; };
 		41CA6E6C266788F700874B19 /* MVPlayerConntroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E6B266788F700874B19 /* MVPlayerConntroller.swift */; };
 		41CA6E6C266788F700874B19 /* MVPlayerConntroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E6B266788F700874B19 /* MVPlayerConntroller.swift */; };
 		41CA6E702667953700874B19 /* MVSettingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E6F2667953700874B19 /* MVSettingController.swift */; };
 		41CA6E702667953700874B19 /* MVSettingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CA6E6F2667953700874B19 /* MVSettingController.swift */; };
@@ -42,6 +44,9 @@
 		2D9630D42681874D00AE6FFE /* MVPlayControlViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVPlayControlViewCell.swift; sourceTree = "<group>"; };
 		2D9630D42681874D00AE6FFE /* MVPlayControlViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVPlayControlViewCell.swift; sourceTree = "<group>"; };
 		2D9630D82681947300AE6FFE /* MVRequestURLUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVRequestURLUtil.swift; sourceTree = "<group>"; };
 		2D9630D82681947300AE6FFE /* MVRequestURLUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVRequestURLUtil.swift; sourceTree = "<group>"; };
 		2D9630DB2681C8AB00AE6FFE /* MVMineViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MVMineViewModel.swift; sourceTree = "<group>"; };
 		2D9630DB2681C8AB00AE6FFE /* MVMineViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MVMineViewModel.swift; sourceTree = "<group>"; };
+		2D9630DD268206F300AE6FFE /* MVMineProductController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMineProductController.swift; sourceTree = "<group>"; };
+		2D9630E02682096900AE6FFE /* PQCollectionViewFlowlayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PQCollectionViewFlowlayout.swift; sourceTree = "<group>"; };
+		2D9630E226820B1900AE6FFE /* MVMineProductCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMineProductCell.swift; sourceTree = "<group>"; };
 		3FA19A38D145C54301B3CD85 /* Pods_MusicVideoPlus.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MusicVideoPlus.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		3FA19A38D145C54301B3CD85 /* Pods_MusicVideoPlus.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MusicVideoPlus.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		4112DCF02668C45B00A5AFD9 /* MusicVideoPlus.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MusicVideoPlus.entitlements; sourceTree = "<group>"; };
 		4112DCF02668C45B00A5AFD9 /* MusicVideoPlus.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MusicVideoPlus.entitlements; sourceTree = "<group>"; };
 		4112DD492668D6A600A5AFD9 /* MusicVideoPlus-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MusicVideoPlus-Bridging-Header.h"; sourceTree = "<group>"; };
 		4112DD492668D6A600A5AFD9 /* MusicVideoPlus-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MusicVideoPlus-Bridging-Header.h"; sourceTree = "<group>"; };
@@ -58,7 +63,6 @@
 		418532382665342200DCA2C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		418532382665342200DCA2C1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		4185323D2665342200DCA2C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		4185323D2665342200DCA2C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		41CA6E5D266782EC00874B19 /* MVBaseController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVBaseController.swift; sourceTree = "<group>"; };
 		41CA6E5D266782EC00874B19 /* MVBaseController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVBaseController.swift; sourceTree = "<group>"; };
-		41CA6E652667887C00874B19 /* MVMineController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMineController.swift; sourceTree = "<group>"; };
 		41CA6E68266788C000874B19 /* MVLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVLoginController.swift; sourceTree = "<group>"; };
 		41CA6E68266788C000874B19 /* MVLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVLoginController.swift; sourceTree = "<group>"; };
 		41CA6E6B266788F700874B19 /* MVPlayerConntroller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVPlayerConntroller.swift; sourceTree = "<group>"; };
 		41CA6E6B266788F700874B19 /* MVPlayerConntroller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVPlayerConntroller.swift; sourceTree = "<group>"; };
 		41CA6E6F2667953700874B19 /* MVSettingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVSettingController.swift; sourceTree = "<group>"; };
 		41CA6E6F2667953700874B19 /* MVSettingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVSettingController.swift; sourceTree = "<group>"; };
@@ -106,6 +110,14 @@
 			path = ViewModel;
 			path = ViewModel;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
+		2D9630DF2682080100AE6FFE /* Views */ = {
+			isa = PBXGroup;
+			children = (
+				2D9630E226820B1900AE6FFE /* MVMineProductCell.swift */,
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
 		4112DD812669BF8900A5AFD9 /* Banner */ = {
 		4112DD812669BF8900A5AFD9 /* Banner */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -236,10 +248,10 @@
 		41CA6E43266782C900874B19 /* Mine */ = {
 		41CA6E43266782C900874B19 /* Mine */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				2D9630DF2682080100AE6FFE /* Views */,
+				41CA6E46266782C900874B19 /* Controllers */,
 				2D9630DA2681C8AB00AE6FFE /* ViewModel */,
 				2D9630DA2681C8AB00AE6FFE /* ViewModel */,
 				41CA6E45266782C900874B19 /* Models */,
 				41CA6E45266782C900874B19 /* Models */,
-				41CA6E46266782C900874B19 /* Controllers */,
-				41CA6E47266782C900874B19 /* Views */,
 			);
 			);
 			path = Mine;
 			path = Mine;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -254,18 +266,12 @@
 		41CA6E46266782C900874B19 /* Controllers */ = {
 		41CA6E46266782C900874B19 /* Controllers */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				41CA6E652667887C00874B19 /* MVMineController.swift */,
+				2D9630E02682096900AE6FFE /* PQCollectionViewFlowlayout.swift */,
+				2D9630DD268206F300AE6FFE /* MVMineProductController.swift */,
 			);
 			);
 			path = Controllers;
 			path = Controllers;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
-		41CA6E47266782C900874B19 /* Views */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			path = Views;
-			sourceTree = "<group>";
-		};
 		41CA6E48266782C900874B19 /* Setting */ = {
 		41CA6E48266782C900874B19 /* Setting */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -586,8 +592,10 @@
 				41CA6E6C266788F700874B19 /* MVPlayerConntroller.swift in Sources */,
 				41CA6E6C266788F700874B19 /* MVPlayerConntroller.swift in Sources */,
 				41CA6E5E266782EC00874B19 /* MVBaseController.swift in Sources */,
 				41CA6E5E266782EC00874B19 /* MVBaseController.swift in Sources */,
 				2D9630D92681947300AE6FFE /* MVRequestURLUtil.swift in Sources */,
 				2D9630D92681947300AE6FFE /* MVRequestURLUtil.swift in Sources */,
+				2D9630E326820B1900AE6FFE /* MVMineProductCell.swift in Sources */,
 				417D86A7266A3CC900DA2444 /* MVHotVideoModel.swift in Sources */,
 				417D86A7266A3CC900DA2444 /* MVHotVideoModel.swift in Sources */,
 				2D9630D52681874D00AE6FFE /* MVPlayControlViewCell.swift in Sources */,
 				2D9630D52681874D00AE6FFE /* MVPlayControlViewCell.swift in Sources */,
+				2D9630DE268206F300AE6FFE /* MVMineProductController.swift in Sources */,
 				4149C8932669FE6F0055CAA2 /* MVTagsCell.swift in Sources */,
 				4149C8932669FE6F0055CAA2 /* MVTagsCell.swift in Sources */,
 				4112DD832669BFA600A5AFD9 /* MVBanner.swift in Sources */,
 				4112DD832669BFA600A5AFD9 /* MVBanner.swift in Sources */,
 				2D1EC138266B4F4900CBACE4 /* MVThirdApiUtil.swift in Sources */,
 				2D1EC138266B4F4900CBACE4 /* MVThirdApiUtil.swift in Sources */,
@@ -596,9 +604,9 @@
 				4144BE31266F128E00ABBDFA /* PQBandingPhoneController.swift in Sources */,
 				4144BE31266F128E00ABBDFA /* PQBandingPhoneController.swift in Sources */,
 				41CA6E69266788C000874B19 /* MVLoginController.swift in Sources */,
 				41CA6E69266788C000874B19 /* MVLoginController.swift in Sources */,
 				2D9630DC2681C8AB00AE6FFE /* MVMineViewModel.swift in Sources */,
 				2D9630DC2681C8AB00AE6FFE /* MVMineViewModel.swift in Sources */,
-				41CA6E662667887C00874B19 /* MVMineController.swift in Sources */,
 				41CA6F4B26689F4400874B19 /* PQMineViewModel.swift in Sources */,
 				41CA6F4B26689F4400874B19 /* PQMineViewModel.swift in Sources */,
 				417D868C266A2E8400DA2444 /* MVHomeViewModel.swift in Sources */,
 				417D868C266A2E8400DA2444 /* MVHomeViewModel.swift in Sources */,
+				2D9630E12682096900AE6FFE /* PQCollectionViewFlowlayout.swift in Sources */,
 				41CA6F782668B80D00874B19 /* PQPhoneLoginController.swift in Sources */,
 				41CA6F782668B80D00874B19 /* PQPhoneLoginController.swift in Sources */,
 				418532302665342100DCA2C1 /* AppDelegate.swift in Sources */,
 				418532302665342100DCA2C1 /* AppDelegate.swift in Sources */,
 			);
 			);

+ 6 - 0
MusicVideoPlus/Assets.xcassets/Mine/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 22 - 0
MusicVideoPlus/Assets.xcassets/Mine/icon_video_point.imageset/Contents.json

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

二进制
MusicVideoPlus/Assets.xcassets/Mine/icon_video_point.imageset/icon_video_point@2x.png


二进制
MusicVideoPlus/Assets.xcassets/Mine/icon_video_point.imageset/icon_video_point@3x.png


+ 13 - 12
MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -37,8 +37,10 @@ class MVHomeController: MVBaseController {
         let mineBtn = UIButton(type: .custom)
         let mineBtn = UIButton(type: .custom)
         mineBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         mineBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
         mineBtn.setBackgroundImage(UIImage(named: "wode"), for: .normal)
         mineBtn.setBackgroundImage(UIImage(named: "wode"), for: .normal)
+        mineBtn.setImage(UIImage(named: "wode"), for: .normal)
         mineBtn.adjustsImageWhenHighlighted = false
         mineBtn.adjustsImageWhenHighlighted = false
         mineBtn.tag = 1000
         mineBtn.tag = 1000
+        mineBtn.addCorner(corner: cDefaultMargin * 3)
         return mineBtn
         return mineBtn
     }()
     }()
 
 
@@ -156,7 +158,7 @@ class MVHomeController: MVBaseController {
         addNotification(self, selector: #selector(loginSuccesss), name: cBandingPhoneSuccessKey, object: nil)
         addNotification(self, selector: #selector(loginSuccesss), name: cBandingPhoneSuccessKey, object: nil)
         addNotification(self, selector: #selector(stuckPointDismiss), name: cFinishedPublishedNotiKey, object: nil)
         addNotification(self, selector: #selector(stuckPointDismiss), name: cFinishedPublishedNotiKey, object: nil)
 
 
-//        view.addSubview(mineBtn)
+        view.addSubview(mineBtn)
         view.addSubview(stuckPointBtn)
         view.addSubview(stuckPointBtn)
         view.addSubview(settingBtn)
         view.addSubview(settingBtn)
         view.addSubview(viewListView)
         view.addSubview(viewListView)
@@ -224,12 +226,6 @@ class MVHomeController: MVBaseController {
     }
     }
 
 
     func addLayout() {
     func addLayout() {
-//        mineBtn.snp.remakeConstraints { make in
-//            make.width.equalTo(60)
-//            make.height.equalTo(60)
-//            make.left.equalToSuperview().offset(16)
-//            make.bottom.equalToSuperview().offset(-50)
-//        }
         categoryCollectionView.snp.remakeConstraints { make in
         categoryCollectionView.snp.remakeConstraints { make in
             make.width.equalTo(cScreenWidth)
             make.width.equalTo(cScreenWidth)
             make.height.equalTo(45)
             make.height.equalTo(45)
@@ -240,7 +236,13 @@ class MVHomeController: MVBaseController {
         stuckPointBtn.snp.remakeConstraints { make in
         stuckPointBtn.snp.remakeConstraints { make in
             make.width.height.equalTo(60)
             make.width.height.equalTo(60)
             make.centerX.equalToSuperview()
             make.centerX.equalToSuperview()
-            make.bottom.equalToSuperview().offset(-(cDefaultMargin +  cAKSafeAreaHeight))
+            make.bottom.equalToSuperview().offset(-(cDefaultMargin + cAKSafeAreaHeight))
+        }
+
+        mineBtn.snp.remakeConstraints { make in
+            make.width.height.equalTo(60)
+            make.left.equalToSuperview().offset(cDefaultMargin * 3)
+            make.centerY.equalTo(stuckPointBtn)
         }
         }
 
 
         settingBtn.snp.remakeConstraints { make in
         settingBtn.snp.remakeConstraints { make in
@@ -326,9 +328,8 @@ class MVHomeController: MVBaseController {
         // 条件都满足转换到对就界面
         // 条件都满足转换到对就界面
         switch type {
         switch type {
         case 1:
         case 1:
-            navigationController?.pushViewController(MVMineController(), animated: true)
+            navigationController?.pushViewController(MVMineProductController(), animated: true)
         case 2:
         case 2:
-
             PQStuckPointViewModel.stuckPointProjectMusicInfo(projectId: videoData?.reCreateVideoData?.projectId ?? "") { [weak self] musicData, _ in
             PQStuckPointViewModel.stuckPointProjectMusicInfo(projectId: videoData?.reCreateVideoData?.projectId ?? "") { [weak self] musicData, _ in
                 if musicData != nil {
                 if musicData != nil {
                     let vc = PQStuckPointMaterialController()
                     let vc = PQStuckPointMaterialController()
@@ -490,7 +491,7 @@ extension MVHomeController: UICollectionViewDelegate, UICollectionViewDataSource
         return CGSize(width: width, height: collectionView.frame.height - 14)
         return CGSize(width: width, height: collectionView.frame.height - 14)
     }
     }
 
 
-    func collectionView(_: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+    func collectionView(_: UICollectionView, didSelectItemAt _: IndexPath) {
 //        for hot in mVideos {
 //        for hot in mVideos {
 //            hot.isSelected = false
 //            hot.isSelected = false
 //        }
 //        }
@@ -513,7 +514,7 @@ extension MVHomeController: UICollectionViewDelegate, UICollectionViewDataSource
 //        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.05) {
 //        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.05) {
 //            self.playVideo(page: videosCount)
 //            self.playVideo(page: videosCount)
 //        }
 //        }
-        let vc = MVPlayViewController.init()
+        let vc = MVPlayViewController()
         navigationController?.pushViewController(vc, animated: true)
         navigationController?.pushViewController(vc, animated: true)
     }
     }
 }
 }

+ 0 - 22
MusicVideoPlus/Classes/Modules/Mine/Controllers/MVMineController.swift

@@ -1,22 +0,0 @@
-//
-//  MVMineController.swift
-//  MusicVideoPlus
-//
-//  Created by ak on 2021/6/2.
-//
-
-import Foundation
-
-class MVMineController: MVBaseController{
-
-    override func viewWillAppear(_: Bool) {
-        super.viewWillAppear(true)
-
-        showNavigation()
-        leftButton(image: "back_black")
- 
-    }
-    
-    
-
-}

+ 88 - 0
MusicVideoPlus/Classes/Modules/Mine/Controllers/MVMineProductController.swift

@@ -0,0 +1,88 @@
+//
+//  MVMineProductController.swift
+//  MusicVideoPlus
+//
+//  Created by SanW on 2021/6/22.
+//
+
+import BFFramework
+import UIKit
+
+class MVMineProductController: PQBaseViewController {
+    var itemsList: [PQVideoListModel] = Array<PQVideoListModel>.init()
+    var pageNum: Int = 1
+    lazy var flowLayout: PQCollectionViewFlowlayout = {
+        let flowLayout = PQCollectionViewFlowlayout()
+        flowLayout.columnCount = 2
+        flowLayout.sectionInset = .zero
+        flowLayout.minimumLineSpacing = cDefaultMargin
+        flowLayout.minimumInteritemSpacing = cDefaultMargin
+        flowLayout.headerH = 0
+        return flowLayout
+    }()
+
+    lazy var collectionView: UICollectionView = {
+        let width = (cScreenWidth - 30) / 2
+        let proCollectView = UICollectionView(frame: CGRect(x: cDefaultMargin, y: 0, width: cScreenWidth - cDefaultMargin * 2, height: view.frame.height), collectionViewLayout: flowLayout)
+        proCollectView.register(MVMineProductCell.self, forCellWithReuseIdentifier: String(describing: MVMineProductCell.self))
+        proCollectView.showsVerticalScrollIndicator = false
+        proCollectView.delegate = self
+        proCollectView.dataSource = self
+        proCollectView.backgroundColor = UIColor.white
+        proCollectView.addRefreshView { [weak self] isRefresh in
+            self?.loadRequestData(isRefresh: isRefresh)
+        }
+        return proCollectView
+    }()
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        view.addSubview(collectionView)
+        leftBackButton()
+        loadRequestData()
+    }
+
+    /// 请求网络数据
+    /// - Parameter isRefresh: <#isRefresh description#>
+    /// - Returns: <#description#>
+    func loadRequestData(isRefresh: Bool = true) {
+        if isRefresh {
+            pageNum = 1
+        } else {
+            pageNum = pageNum + 1
+        }
+        MVMineViewModel.userVideoListData(pageNum: pageNum) { [weak self] videoList, _ in
+            if videoList != nil, (videoList?.count ?? 0) > 0 {
+                if isRefresh {
+                    self?.itemsList = videoList!
+                } else {
+                    self?.itemsList = self!.itemsList + videoList!
+                }
+                self?.flowLayout.findList = self?.itemsList as! [PQVideoListModel]
+                self?.collectionView.reloadData()
+            } else {
+                self?.pageNum = (self?.pageNum ?? 1) - 1
+            }
+            self?.collectionView.mj_header?.endRefreshing()
+            self?.collectionView.mj_footer?.endRefreshing()
+        }
+    }
+}
+
+extension MVMineProductController: UICollectionViewDelegate, UICollectionViewDataSource, UIScrollViewDelegate {
+    func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
+        return itemsList.count
+    }
+
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let itemData = itemsList[indexPath.item]
+        let cell = MVMineProductCell.productCell(collectionView: collectionView, indexPath: indexPath)
+        cell.videoData = itemData
+        cell.btnClickHandle = { [weak self] _, _ in
+//            self?.btnClickHandle(sender: sender, videoData: videoData)
+        }
+        return cell
+    }
+
+    func collectionView(_: UICollectionView, didSelectItemAt _: IndexPath) {}
+}

+ 106 - 0
MusicVideoPlus/Classes/Modules/Mine/Controllers/PQCollectionViewFlowlayout.swift

@@ -0,0 +1,106 @@
+//
+//  PQCollectionViewFlowlayout.swift
+//  PQSpeed
+//
+//  Created by SanW on 2020/5/26.
+//  Copyright © 2020 BytesFlow. All rights reserved.
+//
+
+import BFFramework
+import Photos
+import UIKit
+
+class PQCollectionViewFlowlayout: UICollectionViewFlowLayout {
+    // 总列数
+    var columnCount: Int = 0
+    // 数据数组
+    var findList = [Any]()
+    // 整个高度
+    private var maxH: Int?
+    // 头部高度
+    var headerH: CGFloat = 100
+    // 所有item的属性
+    fileprivate var layoutAttributesArray = [UICollectionViewLayoutAttributes]()
+
+    override func prepare() {
+        let contentWidth: CGFloat = (collectionView?.bounds.size.width)! - sectionInset.left - sectionInset.right
+        let marginX = minimumInteritemSpacing
+        let itemWidth = (contentWidth - marginX * CGFloat(columnCount - 1)) / CGFloat(columnCount)
+        computeAttributesWithItemWidth(CGFloat(itemWidth))
+    }
+
+    /// 根据itemWidth计算布局属性
+    func computeAttributesWithItemWidth(_ itemWidth: CGFloat) {
+        // 定义一个列高数组 记录每一列的总高度
+        var columnHeight = [Int](repeating: Int(sectionInset.top + headerH), count: columnCount)
+        // 定义一个记录每一列的总item个数的数组
+        var columnItemCount = [Int](repeating: 0, count: columnCount)
+        var attributesArray = [UICollectionViewLayoutAttributes]()
+
+        // 添加头部属性
+        let headerAttr: UICollectionViewLayoutAttributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, with: IndexPath(item: 0, section: 0))
+        headerAttr.frame = CGRect(x: 0, y: CGFloat(0), width: collectionView!.bounds.size.width, height: headerH)
+        attributesArray.append(headerAttr)
+        // 给属性数组设置数值
+        // self.layoutAttributesArray = attributesArray
+
+        // 遍历数据计算每个item的属性并布局
+        var index = 0
+        for data in findList {
+            var itemHeight: CGFloat = 0
+            if data is PQVideoListModel {
+                itemHeight = (data as! PQVideoListModel).itemHeight
+            } else if data is PQEditVisionTrackMaterialsModel {
+                itemHeight = CGFloat((data as! PQEditVisionTrackMaterialsModel).itemHeight)
+            } else {
+                itemHeight = 0
+            }
+            let indexPath = IndexPath(item: index, section: 0)
+            let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
+            // 找出最短列号
+            let minHeight: Int = columnHeight.sorted().first!
+            let column = columnHeight.firstIndex(of: minHeight)
+            // 数据追加在最短列
+            columnItemCount[column!] += 1
+            let itemX = (itemWidth + minimumInteritemSpacing) * CGFloat(column!) + sectionInset.left
+            let itemY = minHeight
+            // 等比例缩放 计算item的高度
+            let itemH = itemHeight.isNaN ? 0 : Int(itemHeight)
+            // 设置frame
+            attributes.frame = CGRect(x: itemX, y: CGFloat(itemY), width: itemWidth, height: CGFloat(itemH))
+
+            attributesArray.append(attributes)
+            // 累加列高
+            columnHeight[column!] += itemH + Int(minimumLineSpacing)
+            index += 1
+        }
+
+        // 找出最高列列号
+        let maxHeight: Int = columnHeight.sorted().last!
+        let column = columnHeight.index(of: maxHeight)
+        // 根据最高列设置itemSize 使用总高度的平均值
+        var itemH = 0
+
+        if findList.count > 0 {
+            itemH = (maxHeight - Int(minimumLineSpacing) * (columnItemCount[column!] + 1)) / columnItemCount[column!]
+        }
+        itemSize = CGSize(width: itemWidth, height: CGFloat(itemH))
+        // 给属性数组设置数值
+        layoutAttributesArray = attributesArray
+        maxH = maxHeight + 30
+    }
+
+    override func layoutAttributesForElements(in _: CGRect) -> [UICollectionViewLayoutAttributes]? {
+        return layoutAttributesArray
+    }
+
+    /// 重写设置contentSize
+    override var collectionViewContentSize: CGSize {
+        get {
+            return CGSize(width: (collectionView?.bounds.width)!, height: CGFloat(maxH!))
+        }
+        set {
+            self.collectionViewContentSize = newValue
+        }
+    }
+}

+ 98 - 0
MusicVideoPlus/Classes/Modules/Mine/Views/MVMineProductCell.swift

@@ -0,0 +1,98 @@
+//
+//  MVMineProductCell.swift
+//  MusicVideoPlus
+//
+//  Created by SanW on 2021/6/22.
+//
+
+import BFFramework
+import UIKit
+
+class MVMineProductCell: UICollectionViewCell {
+    var btnClickHandle: ((_ sender: UIButton, _ videoData: PQVideoListModel?) -> Void)?
+
+    lazy var coverImageView: UIImageView = {
+        let coverImageView = UIImageView()
+        coverImageView.contentMode = .scaleAspectFill
+        coverImageView.clipsToBounds = true
+        coverImageView.isUserInteractionEnabled = true
+        coverImageView.tag = cCellTag
+        coverImageView.backgroundColor = UIColor.white
+        return coverImageView
+    }()
+
+    lazy var moreBtn: UIButton = {
+        let moreBtn = UIButton(type: .custom)
+        moreBtn.setImage(UIImage(named: "video_pause"), for: .selected)
+        moreBtn.setImage(nil, for: .normal)
+        moreBtn.tag = 1
+        moreBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
+        return moreBtn
+    }()
+
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textAlignment = .left
+        titleLabel.textColor = .white
+        titleLabel.numberOfLines = 1
+        titleLabel.lineBreakMode = .byCharWrapping
+        titleLabel.font = UIFont.systemFont(ofSize: 16, weight: .bold)
+        return titleLabel
+    }()
+
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        contentView.addSubview(coverImageView)
+        contentView.addSubview(moreBtn)
+        contentView.addSubview(titleLabel)
+    }
+
+    required init?(coder _: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+
+    @objc class func productCell(collectionView: UICollectionView, indexPath: IndexPath) -> MVMineProductCell {
+        let cell: MVMineProductCell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: MVMineProductCell.self), for: indexPath) as! MVMineProductCell
+        return cell
+    }
+
+    var videoData: PQVideoListModel? {
+        didSet {
+            addData()
+            addLayout()
+        }
+    }
+
+    func addData() {
+        let coverImg = (videoData?.videoCoverSnapshotPath != nil && (videoData?.videoCoverSnapshotPath?.count ?? 0) > 0) ? videoData?.videoCoverSnapshotPath ?? "" : videoData?.coverImg?["coverImgPath"] as! String
+        netImage(url: coverImg, mainView: coverImageView)
+        titleLabel.text = videoData?.title ?? ""
+    }
+
+    func addLayout() {
+        let margin: CGFloat = 12
+        let moreH: CGFloat = 56
+
+        coverImageView.snp.remakeConstraints { make in
+            make.size.equalToSuperview()
+        }
+
+        moreBtn.snp.remakeConstraints { make in
+            make.width.height.equalTo(moreH)
+            make.bottom.right.equalToSuperview()
+        }
+
+        titleLabel.snp.remakeConstraints { make in
+            make.width.height.equalTo(moreH)
+            make.centerY.equalTo(moreBtn)
+            make.left.equalToSuperview().offset(margin)
+            make.right.equalTo(moreBtn.snp_left).offset(-margin)
+        }
+    }
+
+    @objc func btnClick(sender: UIButton) {
+        if btnClickHandle != nil {
+            btnClickHandle!(sender, videoData)
+        }
+    }
+}