Quellcode durchsuchen

发布视频
发布管理器,
完成了一半

南鑫林 vor 5 Jahren
Ursprung
Commit
a8d3ee7c3d
31 geänderte Dateien mit 1488 neuen und 143 gelöschten Zeilen
  1. 87 15
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 1 1
      RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunVodManager/AliyunVodUpToyoPublishManager/AliyunVodupToyoPublishManager.swift
  3. 2 2
      RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunVodManager/AliyunVodUpToyoPublishManager/PublishUploadProgressView.swift
  4. 12 4
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift
  5. 3 3
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift
  6. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/PublishAddressPOICell.swift
  7. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/PublishAddressPOIView.swift
  8. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/SearchAddrNavigationbarView.swift
  9. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/ViewController/PublishAddAddressController.swift
  10. 0 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift
  11. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishSelTopicCollectionCell.swift
  12. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicHeaderView.swift
  13. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicItemCell.swift
  14. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicTypeCell.swift
  15. 0 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicTypeItemCollectionCell.swift
  16. 17 25
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditNew/View/PublishEditNew/PublishEditNewVideoView.swift
  17. 2 2
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditNew/ViewController/PublishEditNewViewController.swift
  18. 36 21
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditDescribeCell.swift
  19. 44 39
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditTitleCell.swift
  20. 75 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishEditVideoCoverImageView/PublishEditVideoCoverImageTableViewCell.swift
  21. 154 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishNewEditLocationView/PublishNewEditLocationTableViewCell.swift
  22. 154 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishNewEditTopicView/PublishNewEditTopicViewTableViewCell.swift
  23. 256 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/ViewController/PublishEditVideoContentViewController.swift
  24. 0 24
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideoContent/PublishEditVideoContentViewController.swift
  25. 236 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManager.swift
  26. 123 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerModel.swift
  27. 83 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadFailureView.swift
  28. 53 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadProgressView.swift
  29. 144 0
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadView.swift
  30. 5 5
      RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishNew/View/PublishNewView/PublishNewVideoPhotoView.swift
  31. 1 1
      RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UIImage.swift

+ 87 - 15
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -457,6 +457,12 @@
 		A7DAB33922DC2B83005B964E /* ShareRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */; };
 		A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */; };
 		A7DC8EC122EF1C82004EEBE9 /* BaseTabBarItemContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC8EC022EF1C82004EEBE9 /* BaseTabBarItemContentView.swift */; };
+		A7DE18CD2379100A00D9D72E /* PublishEditVideoCoverImageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18CC2379100A00D9D72E /* PublishEditVideoCoverImageTableViewCell.swift */; };
+		A7DE18D023793DFA00D9D72E /* PublishNewEditTopicViewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18CF23793DFA00D9D72E /* PublishNewEditTopicViewTableViewCell.swift */; };
+		A7DE18D423794DD000D9D72E /* PublishNewEditLocationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18D323794DD000D9D72E /* PublishNewEditLocationTableViewCell.swift */; };
+		A7DE18D723795A3200D9D72E /* PublishManagerUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18D623795A3200D9D72E /* PublishManagerUploadView.swift */; };
+		A7DE18D923795B2A00D9D72E /* PublishManagerUploadProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18D823795B2A00D9D72E /* PublishManagerUploadProgressView.swift */; };
+		A7DE18DB23795B5700D9D72E /* PublishManagerUploadFailureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DE18DA23795B5700D9D72E /* PublishManagerUploadFailureView.swift */; };
 		A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */; };
 		A7DF50E322A55AB600998908 /* BrowsePicturesPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */; };
 		A7E19FA822BA2CDF009BCCE1 /* SearchProductListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FA722BA2CDF009BCCE1 /* SearchProductListViewController.swift */; };
@@ -598,10 +604,10 @@
 		BD13B6B922BA0327008BB323 /* PublishEditController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6B822BA0325008BB323 /* PublishEditController.swift */; };
 		BD13B6C122BA034D008BB323 /* PublishEditAddPicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BA22BA034C008BB323 /* PublishEditAddPicCell.swift */; };
 		BD13B6C222BA034D008BB323 /* PublishEditAddImgCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BB22BA034C008BB323 /* PublishEditAddImgCollectionCell.swift */; };
-		BD13B6C322BA034D008BB323 /* PublishEditDescribeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BC22BA034C008BB323 /* PublishEditDescribeCell.swift */; };
+		BD13B6C322BA034D008BB323 /* PublishEditContentViewDescribeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BC22BA034C008BB323 /* PublishEditContentViewDescribeCell.swift */; };
 		BD13B6C422BA034D008BB323 /* PublishEditDefaultCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BD22BA034D008BB323 /* PublishEditDefaultCollectionCell.swift */; };
 		BD13B6C522BA034D008BB323 /* PublishEditAddAddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BE22BA034D008BB323 /* PublishEditAddAddressCell.swift */; };
-		BD13B6C622BA034D008BB323 /* PublishEditTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BF22BA034D008BB323 /* PublishEditTitleCell.swift */; };
+		BD13B6C622BA034D008BB323 /* PublishEditContentViewTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6BF22BA034D008BB323 /* PublishEditContentViewTitleCell.swift */; };
 		BD13B6C722BA034D008BB323 /* PublishEditAddTopicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6C022BA034D008BB323 /* PublishEditAddTopicCell.swift */; };
 		BD13B6DA22BA03BC008BB323 /* PublishAddAddressController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6CC22BA03BB008BB323 /* PublishAddAddressController.swift */; };
 		BD13B6DB22BA03BC008BB323 /* PublishAddressPOIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD13B6CD22BA03BB008BB323 /* PublishAddressPOIView.swift */; };
@@ -1227,6 +1233,12 @@
 		A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareRouterModuleType.swift; sourceTree = "<group>"; };
 		A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditExpressAddressTableViewCell.swift; sourceTree = "<group>"; };
 		A7DC8EC022EF1C82004EEBE9 /* BaseTabBarItemContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTabBarItemContentView.swift; sourceTree = "<group>"; };
+		A7DE18CC2379100A00D9D72E /* PublishEditVideoCoverImageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditVideoCoverImageTableViewCell.swift; sourceTree = "<group>"; };
+		A7DE18CF23793DFA00D9D72E /* PublishNewEditTopicViewTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishNewEditTopicViewTableViewCell.swift; sourceTree = "<group>"; };
+		A7DE18D323794DD000D9D72E /* PublishNewEditLocationTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishNewEditLocationTableViewCell.swift; sourceTree = "<group>"; };
+		A7DE18D623795A3200D9D72E /* PublishManagerUploadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishManagerUploadView.swift; sourceTree = "<group>"; };
+		A7DE18D823795B2A00D9D72E /* PublishManagerUploadProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishManagerUploadProgressView.swift; sourceTree = "<group>"; };
+		A7DE18DA23795B5700D9D72E /* PublishManagerUploadFailureView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishManagerUploadFailureView.swift; sourceTree = "<group>"; };
 		A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesViewController.swift; sourceTree = "<group>"; };
 		A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesPagerViewCell.swift; sourceTree = "<group>"; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1386,10 +1398,10 @@
 		BD13B6B822BA0325008BB323 /* PublishEditController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditController.swift; sourceTree = "<group>"; };
 		BD13B6BA22BA034C008BB323 /* PublishEditAddPicCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditAddPicCell.swift; sourceTree = "<group>"; };
 		BD13B6BB22BA034C008BB323 /* PublishEditAddImgCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditAddImgCollectionCell.swift; sourceTree = "<group>"; };
-		BD13B6BC22BA034C008BB323 /* PublishEditDescribeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditDescribeCell.swift; sourceTree = "<group>"; };
+		BD13B6BC22BA034C008BB323 /* PublishEditContentViewDescribeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditContentViewDescribeCell.swift; sourceTree = "<group>"; };
 		BD13B6BD22BA034D008BB323 /* PublishEditDefaultCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditDefaultCollectionCell.swift; sourceTree = "<group>"; };
 		BD13B6BE22BA034D008BB323 /* PublishEditAddAddressCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditAddAddressCell.swift; sourceTree = "<group>"; };
-		BD13B6BF22BA034D008BB323 /* PublishEditTitleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditTitleCell.swift; sourceTree = "<group>"; };
+		BD13B6BF22BA034D008BB323 /* PublishEditContentViewTitleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditContentViewTitleCell.swift; sourceTree = "<group>"; };
 		BD13B6C022BA034D008BB323 /* PublishEditAddTopicCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishEditAddTopicCell.swift; sourceTree = "<group>"; };
 		BD13B6CC22BA03BB008BB323 /* PublishAddAddressController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishAddAddressController.swift; sourceTree = "<group>"; };
 		BD13B6CD22BA03BB008BB323 /* PublishAddressPOIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PublishAddressPOIView.swift; sourceTree = "<group>"; };
@@ -3477,14 +3489,16 @@
 		A7811CCC2323D25A00C2D8DE /* PublishNewModule */ = {
 			isa = PBXGroup;
 			children = (
-				A7FF1DBD2376C673002B3435 /* PublishEditVideoContent */,
-				A7FF1DB62376B50D002B3435 /* PublishManager */,
 				A7FF1DB523767149002B3435 /* PublishNewCommonView */,
+				A7FF1DB62376B50D002B3435 /* PublishManager */,
+				A7FF1DBD2376C673002B3435 /* PublishEditVideo */,
 				A74CF4242372CD9100BA620E /* PublishEditNew */,
 				A7EE5AC5236C131C00309931 /* PublishNew */,
 				A70E3F2D236FF9520039D7FC /* PublishConfirmPhotoNew */,
 				A7EE5AE2236C131D00309931 /* PublishRecommendMusicNewController */,
 				A7FE09122367C892007A73EA /* PublishArticle */,
+				BD13B6CF22BA03BB008BB323 /* PublishAddTopic */,
+				BD13B6CB22BA03BB008BB323 /* PublishAddAddress */,
 			);
 			path = PublishNewModule;
 			sourceTree = "<group>";
@@ -4437,6 +4451,58 @@
 			path = CommunityVideoSubCommentController;
 			sourceTree = "<group>";
 		};
+		A7DE18CA23790F1D00D9D72E /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7FF1DBE2376C882002B3435 /* PublishEditVideoContentViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7DE18CB23790F2F00D9D72E /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7DE18D523794FB700D9D72E /* PublishEditVideoCoverImageView */,
+				A7DE18D223794DB300D9D72E /* PublishNewEditLocationView */,
+				A7DE18D123793E0100D9D72E /* PublishNewEditTopicView */,
+				A7DE18CE23792E9A00D9D72E /* PublishEditContentView */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A7DE18CE23792E9A00D9D72E /* PublishEditContentView */ = {
+			isa = PBXGroup;
+			children = (
+				BD13B6BF22BA034D008BB323 /* PublishEditContentViewTitleCell.swift */,
+				BD13B6BC22BA034C008BB323 /* PublishEditContentViewDescribeCell.swift */,
+			);
+			path = PublishEditContentView;
+			sourceTree = "<group>";
+		};
+		A7DE18D123793E0100D9D72E /* PublishNewEditTopicView */ = {
+			isa = PBXGroup;
+			children = (
+				A7DE18CF23793DFA00D9D72E /* PublishNewEditTopicViewTableViewCell.swift */,
+			);
+			path = PublishNewEditTopicView;
+			sourceTree = "<group>";
+		};
+		A7DE18D223794DB300D9D72E /* PublishNewEditLocationView */ = {
+			isa = PBXGroup;
+			children = (
+				A7DE18D323794DD000D9D72E /* PublishNewEditLocationTableViewCell.swift */,
+			);
+			path = PublishNewEditLocationView;
+			sourceTree = "<group>";
+		};
+		A7DE18D523794FB700D9D72E /* PublishEditVideoCoverImageView */ = {
+			isa = PBXGroup;
+			children = (
+				A7DE18CC2379100A00D9D72E /* PublishEditVideoCoverImageTableViewCell.swift */,
+			);
+			path = PublishEditVideoCoverImageView;
+			sourceTree = "<group>";
+		};
 		A7DF50D922A556C300998908 /* BrowsePictures */ = {
 			isa = PBXGroup;
 			children = (
@@ -5075,16 +5141,20 @@
 			children = (
 				A7FF1DBB2376BA76002B3435 /* PublishManager.swift */,
 				A7FF1DB92376B9C2002B3435 /* PublishManagerModel.swift */,
+				A7DE18D623795A3200D9D72E /* PublishManagerUploadView.swift */,
+				A7DE18D823795B2A00D9D72E /* PublishManagerUploadProgressView.swift */,
+				A7DE18DA23795B5700D9D72E /* PublishManagerUploadFailureView.swift */,
 			);
 			path = PublishManager;
 			sourceTree = "<group>";
 		};
-		A7FF1DBD2376C673002B3435 /* PublishEditVideoContent */ = {
+		A7FF1DBD2376C673002B3435 /* PublishEditVideo */ = {
 			isa = PBXGroup;
 			children = (
-				A7FF1DBE2376C882002B3435 /* PublishEditVideoContentViewController.swift */,
+				A7DE18CB23790F2F00D9D72E /* View */,
+				A7DE18CA23790F1D00D9D72E /* ViewController */,
 			);
-			path = PublishEditVideoContent;
+			path = PublishEditVideo;
 			sourceTree = "<group>";
 		};
 		BD01B1F722BC673900CE9F36 /* PublishTakePhoto */ = {
@@ -5272,8 +5342,6 @@
 				BD01B1F722BC673900CE9F36 /* PublishTakePhoto */,
 				BD5CA89022DD719000364A67 /* PublishMusicAbout */,
 				BD13B69F22B9CE8D008BB323 /* PublishEdit */,
-				BD13B6CF22BA03BB008BB323 /* PublishAddTopic */,
-				BD13B6CB22BA03BB008BB323 /* PublishAddAddress */,
 			);
 			path = PublishModule;
 			sourceTree = "<group>";
@@ -5360,8 +5428,6 @@
 				BD13B6BA22BA034C008BB323 /* PublishEditAddPicCell.swift */,
 				BD13B6BD22BA034D008BB323 /* PublishEditDefaultCollectionCell.swift */,
 				BD13B6BB22BA034C008BB323 /* PublishEditAddImgCollectionCell.swift */,
-				BD13B6BF22BA034D008BB323 /* PublishEditTitleCell.swift */,
-				BD13B6BC22BA034C008BB323 /* PublishEditDescribeCell.swift */,
 				BD13B6C022BA034D008BB323 /* PublishEditAddTopicCell.swift */,
 				BD13B6BE22BA034D008BB323 /* PublishEditAddAddressCell.swift */,
 			);
@@ -6226,7 +6292,7 @@
 				A77FAEFC235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift in Sources */,
 				A770E5DD22CEDF4F00CBD0A4 /* OpenAppModel.swift in Sources */,
 				A719EE6E22AF441F001AAC98 /* CommunityViewController.swift in Sources */,
-				BD13B6C622BA034D008BB323 /* PublishEditTitleCell.swift in Sources */,
+				BD13B6C622BA034D008BB323 /* PublishEditContentViewTitleCell.swift in Sources */,
 				A72A72BB22321DE000B21995 /* Extension+UILabel.swift in Sources */,
 				BDAF83A822B343C50004BCC3 /* RecommendBottomCommentView.swift in Sources */,
 				BD12B66B22B4A01300AEB10B /* RecommendSubCommentTableViewFooter.swift in Sources */,
@@ -6273,6 +6339,7 @@
 				A7C0FDF022B6538200BC1E86 /* CommunityBannerFSPagerViewCell.swift in Sources */,
 				A7EE5BD4236C16E100309931 /* SwiftMoyaServiceDownLoadApi.swift in Sources */,
 				BDE376DB22C22A260055E2EA /* UIView+AlivcHelper.m in Sources */,
+				A7DE18D723795A3200D9D72E /* PublishManagerUploadView.swift in Sources */,
 				A71AA5152272160A008FF1A5 /* ExpressAddressListTableViewCell.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
 				A7931E0D22AF874600297D0A /* GenderSelectionViewController.swift in Sources */,
@@ -6665,7 +6732,7 @@
 				A7CC7516227161D5003C4F38 /* SetViewController.swift in Sources */,
 				A7D07CD422B789DE00186014 /* PersonViewUserAndOtherListView.swift in Sources */,
 				A7778CBA2244F14B00C7C47A /* Extension+UIViewController.swift in Sources */,
-				BD13B6C322BA034D008BB323 /* PublishEditDescribeCell.swift in Sources */,
+				BD13B6C322BA034D008BB323 /* PublishEditContentViewDescribeCell.swift in Sources */,
 				A7CC752C2271A1AE003C4F38 /* SetPasswordViewController.swift in Sources */,
 				BD10FBFE22C6F7D90096A34E /* AliyunPublishService.m in Sources */,
 				A77FAEFA23585028002A1D08 /* CircleCommentListReplyTableViewCell.swift in Sources */,
@@ -6678,12 +6745,14 @@
 				A7F689182358030D000C313F /* CommunityCircleCommentModel.swift in Sources */,
 				A7F689022356F575000C313F /* CommunityCircleUserListModel.swift in Sources */,
 				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
+				A7DE18D923795B2A00D9D72E /* PublishManagerUploadProgressView.swift in Sources */,
 				BD37E38522CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift in Sources */,
 				A7EE5AEE236C131D00309931 /* PublishNewMusicListViewTableViewCell.swift in Sources */,
 				A7F688E723556EA1000C313F /* CircleEssenceView.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
 				A7C0FDEB22B4C6C300BC1E86 /* CardContentCommentListFooterView.swift in Sources */,
 				BD3AA45822AE63EC00EF4F20 /* MessageMainViewController.swift in Sources */,
+				A7DE18D423794DD000D9D72E /* PublishNewEditLocationTableViewCell.swift in Sources */,
 				A7C2567122CC895F00420828 /* CommunityPostDetailTableViewHeaderView.swift in Sources */,
 				A71AF0AA226EDDF5001730FE /* SearchView.swift in Sources */,
 				A7EE6E1723055B1900628D39 /* MemoryManagerRetainCycleLoggerPlugin.swift in Sources */,
@@ -6692,6 +6761,7 @@
 				A77BB4562329EBD800DCAE32 /* NXLPermissionType.swift in Sources */,
 				A7D07CC722B774D600186014 /* RainbowBeanPhysicalView.swift in Sources */,
 				A71CAB4122CB32C700D908A8 /* VirusViewModel.swift in Sources */,
+				A7DE18CD2379100A00D9D72E /* PublishEditVideoCoverImageTableViewCell.swift in Sources */,
 				BD61226122C3561C00D3F513 /* MagicCameraPressCircleView.m in Sources */,
 				A7EE5B0A236C13B900309931 /* AliPlayerManager.swift in Sources */,
 				A7AA9F5822C5F6150086498B /* SwiftMoyaServiceVirusApi.swift in Sources */,
@@ -6748,6 +6818,7 @@
 				A72A726722321DBD00B21995 /* LocationModel.swift in Sources */,
 				A7F2D6C622B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift in Sources */,
 				A77BB4692329EFB500DCAE32 /* NXLPermissionMicrophone.swift in Sources */,
+				A7DE18DB23795B5700D9D72E /* PublishManagerUploadFailureView.swift in Sources */,
 				A770E61622D6625700CBD0A4 /* ShareCollectionViewCell.swift in Sources */,
 				A70E3F41236FF9CD0039D7FC /* PublishUploadProgressView.swift in Sources */,
 				BD01B1FA22BC673900CE9F36 /* PublishConfirmPhotoController.swift in Sources */,
@@ -6785,6 +6856,7 @@
 				BD29A92E228F99780018CFC3 /* OrderCommentParameterModel.swift in Sources */,
 				A7284440224DFACD00F82F30 /* InfoModel.swift in Sources */,
 				A7F6890923571B9D000C313F /* CommunityCircleMessagesModel.swift in Sources */,
+				A7DE18D023793DFA00D9D72E /* PublishNewEditTopicViewTableViewCell.swift in Sources */,
 				A72A72B522321DE000B21995 /* Extension+UITextView.swift in Sources */,
 				A747D822235C8FA8007F4E33 /* TLPhotosPickerViewController.swift in Sources */,
 				A7DAB33922DC2B83005B964E /* ShareRouterModuleType.swift in Sources */,

+ 1 - 1
RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunVodManager/AliyunVodUpToyoPublishManager/AliyunVodupToyoPublishManager.swift

@@ -181,7 +181,7 @@ extension AliyunVodUpToyoPublishManager {
             var imageUrlPaths = Array<String>()
             for image in (aliyunVodUpToYoPublishModel?.images)! {
                 //旋转修正
-                let image = image.rotate(aImage: image)
+                let image = UIImage.rotate(aImage: image)
                 let imagePath: String = (PathManager.tmpPath() ?? "") + (PathManager.randomString() ?? "")
                 let imgData: Data? = UIImage.pngData(image)()
                 do {

+ 2 - 2
RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunVodManager/AliyunVodUpToyoPublishManager/PublishUploadProgressView.swift

@@ -105,8 +105,8 @@ class PublishUploadProgressView: BaseView {
                 DispatchQueue.main.async {
                     [weak self] in
                     self?.progressView.setProgress(progress, animated: true)
-                    let progressValue =  progress * 100
-                    let progressValueStr: String = String(format: "正在上传中%.0f%%", progressValue)
+                    let progressValue =  ceil(progress) * 100
+                    let progressValueStr: String = String(format: "正在上传中(%.0f%%)...", progressValue)
                     self?.progressLabel.text = progressValueStr
                 }
             }, releaseClosure: {

+ 12 - 4
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift

@@ -65,8 +65,11 @@ class CommunityViewController: BaseViewController {
         navigationBar.isHidden = true
         view.addSubview(segmentedView)
         view.addSubview(listContainerView)
-        listContainerView.addSubview(publishUploadProgressView)
-        listContainerView.bringSubviewToFront(publishUploadProgressView)
+//        listContainerView.addSubview(publishUploadProgressView)
+//        listContainerView.bringSubviewToFront(publishUploadProgressView)
+        listContainerView.addSubview(publishManagerUploadView)
+        listContainerView.bringSubviewToFront(publishManagerUploadView)
+
         view.addSubview(communityNavigationBarView)
         
     }
@@ -205,8 +208,8 @@ class CommunityViewController: BaseViewController {
         // 待发布
         observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("DismissFromPublishEditVc"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
             self?.reloadSegmentedFollowView()
-            let aliyunVodUpToYoPublishModel = notification.object as? AliyunVodUpToYoPublishModel
-            self?.publishUploadProgressView.aliyunVodUpToYoPublishModel = aliyunVodUpToYoPublishModel
+//            let aliyunVodUpToYoPublishModel = notification.object as? AliyunVodUpToYoPublishModel
+//            self?.publishUploadProgressView.aliyunVodUpToYoPublishModel = aliyunVodUpToYoPublishModel
         }
         
         // 滚动
@@ -405,6 +408,11 @@ class CommunityViewController: BaseViewController {
         return publishUploadProgressView
     }()
     
+    lazy var publishManagerUploadView: PublishManagerUploadView = {
+        let publishManagerUploadView = PublishManagerUploadView()
+        return publishManagerUploadView
+    }()
+    
     var index : Int?
     
         /// 推荐分类

+ 3 - 3
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/Controller/PublishEditController.swift

@@ -182,14 +182,14 @@ extension PublishEditController : UITableViewDelegate, UITableViewDataSource {
             }
             return picCell
         case 1:
-            let titleCell = PublishEditTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
-            titleCell.topicTextClosure = {
+            let titleCell = PublishEditContentViewTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
+            titleCell.titleTextClosure = {
                 [weak self] (text) in
                 self?.pubTitle = text
             }
             return titleCell
         case 2:
-            let desCell = PublishEditDescribeCell.cellWith(tableView: tableView, indexPath: indexPath)
+            let desCell = PublishEditContentViewDescribeCell.cellWith(tableView: tableView, indexPath: indexPath)
             desCell.commentTextViewClosure = {
                 [weak self] (text) in
                 self?.pubContent = text

RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/View/PublishAddressPOICell.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/PublishAddressPOICell.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/View/PublishAddressPOIView.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/PublishAddressPOIView.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/View/SearchAddrNavigationbarView.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/View/SearchAddrNavigationbarView.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddAddress/ViewController/PublishAddAddressController.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddAddress/ViewController/PublishAddAddressController.swift


+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift

@@ -28,7 +28,6 @@ class PublishAddTopicController: BaseViewController {
    
     // 选中的话题
     var selTopicModelArr = Array<CommunityTopicDataModel>()
-    
     typealias SelTopicsClosure = (_ topicMdlArr: Array<CommunityTopicDataModel>) -> Void
     var selTopicsClosure : SelTopicsClosure?
     

RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishSelTopicCollectionCell.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishSelTopicCollectionCell.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicHeaderView.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicHeaderView.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicItemCell.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicItemCell.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeCell.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicTypeCell.swift


RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/View/PublishTopicTypeItemCollectionCell.swift → RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishAddTopic/View/PublishTopicTypeItemCollectionCell.swift


+ 17 - 25
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditNew/View/PublishEditNew/PublishEditNewVideoView.swift

@@ -30,7 +30,7 @@ class PublishEditNewVideoView: UIView {
     /// 合成导出路径
     var outputPath : String?
     /// 封面路径
-    var outputCoverPath : String?
+    var outCoverImagePath : String?
     /// 是否正在播放
     var isPlaying : Bool = true
     /// 滤镜选中的selected
@@ -52,12 +52,12 @@ class PublishEditNewVideoView: UIView {
         fatalError("init(coder:) has not been implemented")
     }
     
-    init(taskPath:String?,outputPath:String?,outputCoverPath:String?) {
+    init(taskPath:String?,outputPath:String?,outCoverImagePath:String?) {
         self.init()
         frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight)
         self.taskPath = taskPath
         self.outputPath = outputPath
-        self.outputCoverPath = outputCoverPath
+        self.outCoverImagePath = outCoverImagePath
         setupViews()
         setupLayouts()
         setupData()
@@ -668,28 +668,20 @@ extension PublishEditNewVideoView : AliyunIExporterCallback {
         SwiftProgressHUD.shared().hideProgress()
         editor?.stopEdit()
         
-        // 视频路径
-        let publishManagerVideoModel = PublishManagerVideoModel()
-        publishManagerVideoModel.outVideoPath = outputPath
-        publishManagerVideoModel.outVideoPathURL = URL(fileURLWithPath: outputPath)
-        
-        
-        //旋转修正
-//        let image = image.rotate(aImage: image)
-//        let imagePath: String = (PathManager.tmpPath() ?? "") + (PathManager.randomString() ?? "")
-//        let imgData: Data? = UIImage.pngData(image)()
-//        do {
-//            try imgData?.write(to: URL(fileURLWithPath: imagePath))
-//            imageUrlPaths.append(imagePath)
-//        }
-//        catch {
-//            NXLLog("存入失败")
-//        }
-        
-        
-        // 发布路径
-        let publishManagerModel = PublishManagerModel()
-        publishManagerModel.video = publishManagerVideoModel
+        let vc = PublishEditVideoContentViewController()
+        vc.outputPath = outputPath
+        vc.outCoverImagePath = outCoverImagePath
+        vc.popClosure = {
+            [weak self] in
+            guard let strongSelf = self else { return }
+            strongSelf.editor?.startEdit()
+            if strongSelf.isPlaying  {
+                strongSelf.resumePlay()
+            }else {
+                strongSelf.pausePlay()
+            }
+        }
+        UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
 
     }
     

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditNew/ViewController/PublishEditNewViewController.swift

@@ -19,7 +19,7 @@ class PublishEditNewViewController: BaseViewController {
     /// 合成导出路径
     var outputPath : String?
     /// 封面路径
-    var outputCoverPath : String?
+    var outCoverImagePath : String?
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -33,7 +33,7 @@ class PublishEditNewViewController: BaseViewController {
     
     /// 编辑视频View
     private lazy var publishEditNewVideoView: PublishEditNewVideoView = {
-        let publishEditNewVideoView = PublishEditNewVideoView(taskPath: taskPath,outputPath:outputPath,outputCoverPath:outputCoverPath)
+        let publishEditNewVideoView = PublishEditNewVideoView(taskPath: taskPath,outputPath:outputPath,outCoverImagePath:outCoverImagePath)
         return publishEditNewVideoView
     }()
     

+ 36 - 21
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditDescribeCell.swift

@@ -10,17 +10,17 @@ import UIKit
 import RxSwift
 import IQKeyboardManagerSwift
 
-class PublishEditDescribeCell: UITableViewCell {
+class PublishEditContentViewDescribeCell: UITableViewCell {
     
     let disposeBag = DisposeBag()
     
     typealias CommentTextViewClosure = (_ text: String) -> Void
     var commentTextViewClosure : CommentTextViewClosure?
     
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditDescribeCell {
-        let ID = "PublishEditDescribeCell"
-        tableView.register(PublishEditDescribeCell.self, forCellReuseIdentifier: ID)
-        let cell : PublishEditDescribeCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishEditDescribeCell
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditContentViewDescribeCell {
+        let ID = "PublishEditContentViewDescribeCell"
+        tableView.register(PublishEditContentViewDescribeCell.self, forCellReuseIdentifier: ID)
+        let cell : PublishEditContentViewDescribeCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishEditContentViewDescribeCell
         cell.indexPath = indexPath
         return cell
     }
@@ -29,6 +29,7 @@ class PublishEditDescribeCell: UITableViewCell {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         setupViews()
         setupLayouts()
+        setupData()
     }
     
     required init?(coder aDecoder: NSCoder) {
@@ -46,14 +47,33 @@ class PublishEditDescribeCell: UITableViewCell {
         self.selectionStyle = .none
         
         addSubview(cmtTextView)
+        addSubview(h_lineLabel)
     }
     
     private func setupLayouts() {
         cmtTextView.snp.makeConstraints { (make) in
-            make.top.bottom.equalToSuperview()
+            make.top.equalTo(15)
+            make.bottom.equalTo(-15)
             make.left.equalTo(14)
             make.right.equalTo(-14)
         }
+        h_lineLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(cmtTextView.snp.left)
+            make.right.equalTo(-14)
+            make.bottom.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+    }
+    
+    func setupData() {
+        cmtTextView.rx.text.orEmpty.asObservable().subscribe(onNext: {
+            [weak self] (text) in
+            guard let strongSelf = self else { return }
+            TextLimitTool.restrictionInputTextView(strongSelf.cmtTextView, maxNumber: 1000)
+            if let commentTextViewClosure = strongSelf.commentTextViewClosure {
+                commentTextViewClosure(strongSelf.cmtTextView.text ?? "")
+            }
+        }).disposed(by: disposeBag)
     }
     
     private lazy var cmtTextView: IQTextView = {
@@ -63,27 +83,22 @@ class PublishEditDescribeCell: UITableViewCell {
         cmtTextView.font = kRegularFont14
         cmtTextView.placeholder = "好的内容可以引发更多共鸣~"
         cmtTextView.placeholderTextColor = kDDDDDDColor
-        cmtTextView.delegate = self
         cmtTextView.tintColor = kThemeColor
         cmtTextView.textContainerInset = UIEdgeInsets.zero
+        cmtTextView.textContainer.lineFragmentPadding = 0
         return cmtTextView
     }()
     
-}
-
-extension PublishEditDescribeCell: UITextViewDelegate {
+    private lazy var h_lineLabel: UILabel = {
+        let h_lineLabel = UILabel()
+        h_lineLabel.backgroundColor = kf5f5f5Color
+        return h_lineLabel
+    }()
     
-    func textViewDidChange(_ textView: UITextView) {
-        if textView == cmtTextView {
-            var fullStr = textView.text ?? ""
-            if textView.text?.count ?? 0 > 1020 {
-                fullStr = String(fullStr.prefix(1000)) as String
-                textView.text = fullStr
-            }
-            
-            if let commentTextViewClosure = self.commentTextViewClosure {
-                commentTextViewClosure(self.cmtTextView.text ?? "")
-            }
+    /// 发布内容
+    var publishManagerContentModel : PublishManagerContentModel? {
+        didSet {
+            cmtTextView.text = publishManagerContentModel?.detailTitle ?? ""
         }
     }
     

+ 44 - 39
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEdit/View/PublishEditTitleCell.swift

@@ -1,5 +1,5 @@
 //
-//  PublishEditTitleCell.swift
+//  PublishEditContentViewTitleCell.swift
 //  RainbowPlanet
 //
 //  Created by Christopher on 2019/6/17.
@@ -9,23 +9,14 @@
 import UIKit
 import RxSwift
 
-class PublishEditTitleCell: UITableViewCell {
+class PublishEditContentViewTitleCell: UITableViewCell {
     
     let disposeBag = DisposeBag()
     
-    typealias TopicTextClosure = (_ text: String) -> Void
-    var topicTextClosure : TopicTextClosure?
-    
-    var titleStr: String? {
-        didSet {
-            editTextField.text = self.titleStr
-        }
-    }
-    
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditTitleCell {
-        let ID = "PublishEditTitleCell"
-        tableView.register(PublishEditTitleCell.self, forCellReuseIdentifier: ID)
-        let cell : PublishEditTitleCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishEditTitleCell
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditContentViewTitleCell {
+        let ID = "PublishEditContentViewTitleCell"
+        tableView.register(PublishEditContentViewTitleCell.self, forCellReuseIdentifier: ID)
+        let cell : PublishEditContentViewTitleCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishEditContentViewTitleCell
         cell.indexPath = indexPath
         return cell
     }
@@ -34,6 +25,7 @@ class PublishEditTitleCell: UITableViewCell {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         setupViews()
         setupLayouts()
+        setupData()
     }
     
     required init?(coder aDecoder: NSCoder) {
@@ -50,6 +42,7 @@ class PublishEditTitleCell: UITableViewCell {
     private func setupViews() {
         self.selectionStyle = .none
         addSubview(editTextField)
+        addSubview(numberLabel)
         addSubview(h_lineLabel)
     }
     
@@ -58,53 +51,65 @@ class PublishEditTitleCell: UITableViewCell {
             make.top.equalToSuperview()
             make.bottom.equalToSuperview().offset(-1)
             make.left.equalTo(14)
+            make.right.equalTo(-50)
+        }
+        numberLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(editTextField)
             make.right.equalTo(-14)
         }
         h_lineLabel.snp.makeConstraints { (make) in
             make.left.equalTo(editTextField.snp.left)
-            make.right.equalTo(editTextField.snp.right)
-            make.top.equalTo(editTextField.snp.top)
+            make.right.equalTo(-14)
+            make.bottom.equalToSuperview()
             make.height.equalTo(0.5)
         }
     }
     
+    typealias TitleTextClosure = (_ text: String) -> Void
+    var titleTextClosure : TitleTextClosure?
+    
+    func setupData() {
+        editTextField.rx.text.orEmpty.asObservable().subscribe(onNext: {
+            [weak self] (text) in
+            guard let strongSelf = self else { return }
+            TextLimitTool.restrictionInputTextField(strongSelf.editTextField, maxNumber: 20)
+            strongSelf.numberLabel.text = "\(strongSelf.editTextField.text?.count ?? 0)/20"
+            if let titleTextClosure = strongSelf.titleTextClosure {
+                titleTextClosure(strongSelf.editTextField.text ?? "")
+            }
+        }).disposed(by: disposeBag)
+    }
+    
     private lazy var editTextField: UITextField = {
         let editTextField = UITextField()
         editTextField.textColor = k333333Color
         editTextField.font = kRegularFont14
         editTextField.tintColor = kEnabledButtonColor
         editTextField.clearButtonMode = .whileEditing
-        editTextField.attributedPlaceholder = NSAttributedString.init(string:"标题好,能收获更多U米哦(标题最多20字)", attributes: [NSAttributedString.Key.font:kRegularFont14 as Any, NSAttributedString.Key.foregroundColor:kDDDDDDColor])
-        editTextField.delegate = self
+        editTextField.attributedPlaceholder = NSAttributedString.init(string:"标题好,能收获更多U米哦~", attributes: [NSAttributedString.Key.font:kRegularFont14 as Any, NSAttributedString.Key.foregroundColor:kbbbbbbColor])
+
         return editTextField
     }()
     
+    lazy var numberLabel: UILabel = {
+        let numberLabel = UILabel()
+        numberLabel.text = "0/20"
+        numberLabel.textColor = kbbbbbbColor
+        numberLabel.font = kRegularFont14
+        numberLabel.textAlignment = .right
+        return numberLabel
+    }()
+    
     private lazy var h_lineLabel: UILabel = {
         let h_lineLabel = UILabel()
         h_lineLabel.backgroundColor = kf5f5f5Color
         return h_lineLabel
     }()
     
-}
-
-extension PublishEditTitleCell: UITextFieldDelegate {
-    
-    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
-        if textField == editTextField {
-            textField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: UIControl.Event.editingChanged)
-        }
-        return true
-    }
-    
-    @objc func textFieldDidChange(_ textField: UITextField) {
-        var fullStr = textField.text ?? ""
-        if textField.text?.count ?? 0 > 40 {
-            fullStr = String(fullStr.prefix(20)) as String
-            textField.text = fullStr
-        }
-        
-        if let topicTextClosure = self.topicTextClosure {
-            topicTextClosure(self.editTextField.text ?? "")
+    /// 发布内容
+    var publishManagerContentModel : PublishManagerContentModel? {
+        didSet {
+            editTextField.text = publishManagerContentModel?.title ?? ""
         }
     }
     

+ 75 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishEditVideoCoverImageView/PublishEditVideoCoverImageTableViewCell.swift

@@ -0,0 +1,75 @@
+//
+//  PublishEditVideoCoverImageTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PublishEditVideoCoverImageTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishEditVideoCoverImageTableViewCell {
+           let ID = "PublishEditVideoCoverImageTableViewCell"
+           tableView.register(PublishEditVideoCoverImageTableViewCell.self, forCellReuseIdentifier: ID)
+           let cell : PublishEditVideoCoverImageTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishEditVideoCoverImageTableViewCell
+           cell.indexPath = indexPath
+           return cell
+    }
+       
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+       super.init(style: style, reuseIdentifier: reuseIdentifier)
+       setupViews()
+       setupLayouts()
+    }
+
+    required init?(coder aDecoder: NSCoder) {
+       fatalError("init(coder:) has not been implemented")
+    }
+
+    var indexPath: IndexPath? {
+       didSet {
+           
+       }
+    }
+
+    //MRAK: - 设置View
+    private func setupViews() {
+       self.selectionStyle = .none
+        addSubview(coverImageButton)
+        coverImageButton.addSubview(selectedCoverLabel)
+    }
+
+    private func setupLayouts() {
+        coverImageButton.snp.makeConstraints { (make) in
+            make.top.equalTo(15)
+            make.left.equalTo(14)
+            make.size.equalTo(100)
+        }
+        selectedCoverLabel.snp.makeConstraints { (make) in
+            make.bottom.left.right.equalToSuperview()
+            make.height.equalTo(24)
+        }
+    }
+    
+    lazy var coverImageButton: UIButton = {
+        let coverImageButton = UIButton()
+        coverImageButton.setImage(kImage(name: "default_pic"), for: UIControl.State.normal)
+        coverImageButton.imageView?.contentMode = .scaleAspectFill
+        coverImageButton.cornerRadius = 2
+        coverImageButton.masksToBounds = true
+        return coverImageButton
+    }()
+    
+    lazy var selectedCoverLabel: UILabel = {
+        let selectedCoverLabel = UILabel()
+        selectedCoverLabel.text = "选封面"
+        selectedCoverLabel.textColor = kffffffColor
+        selectedCoverLabel.font = kRegularFont12
+        selectedCoverLabel.textAlignment = .center
+        selectedCoverLabel.backgroundColor = k000000Color.withAlphaComponent(0.36)
+        return selectedCoverLabel
+    }()
+
+}

+ 154 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishNewEditLocationView/PublishNewEditLocationTableViewCell.swift

@@ -0,0 +1,154 @@
+//
+//  PublishNewEditLocationTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class PublishNewEditLocationTableViewCell: UITableViewCell {
+
+    let disposeBag = DisposeBag()
+            
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishNewEditLocationTableViewCell {
+        let ID = "PublishNewEditLocationTableViewCell"
+        tableView.register(PublishNewEditLocationTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : PublishNewEditLocationTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishNewEditLocationTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        addSubview(iconImageView)
+        addSubview(addressLabel)
+        addSubview(titleLabel)
+        addSubview(subLabel)
+        addSubview(arrowImageView)
+        addSubview(h_lineLabel)
+
+    }
+    
+    private func setupLayouts() {
+
+        iconImageView.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+            make.size.equalTo(16)
+        }
+        addressLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(iconImageView.snp.right).offset(3)
+            make.right.equalTo(arrowImageView.snp.left).offset(-5)
+        }
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+                       make.left.equalTo(iconImageView.snp.right).offset(3)
+
+        }
+        
+        subLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(titleLabel.snp.right).offset(10)
+        }
+        
+        arrowImageView.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+        
+        h_lineLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.bottom.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+    }
+    
+    lazy var iconImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "edit_ico_address")
+        return iconImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "添加地点"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kMediumFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var subLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "(打卡地点,结识附近的老板)"
+        subLabel.textColor = kDDDDDDColor
+        subLabel.font = kRegularFont12
+        subLabel.textAlignment = .left
+        return subLabel
+    }()
+    
+    lazy var addressLabel: UILabel = {
+        let addressLabel = UILabel()
+        addressLabel.textColor = k333333Color
+        addressLabel.font = kRegularFont14
+        addressLabel.lineBreakMode = .byTruncatingTail
+        addressLabel.alpha = 0
+        return addressLabel
+    }()
+    
+    lazy var h_lineLabel: UILabel = {
+        let h_lineLabel = UILabel()
+        h_lineLabel.backgroundColor = kf5f5f5Color
+        return h_lineLabel
+    }()
+    
+    lazy var arrowImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "my_arrows_unfold")
+        return iconImageView
+    }()
+    
+    /// 发布话题
+    var publishManagerLocationModel : PublishManagerLocationModel? {
+        didSet {
+            if publishManagerLocationModel?.address == nil {
+                addressLabel.text = ""
+                addressLabel.alpha = 0
+                titleLabel.alpha = 1
+                subLabel.alpha = 1
+                iconImageView.image = kImage(name: "edit_ico_address")
+            }else {
+                addressLabel.text = publishManagerLocationModel?.address
+                addressLabel.alpha = 1
+                titleLabel.alpha = 0
+                subLabel.alpha = 0
+                iconImageView.image = kImage(name: "edit_ico_address_pre")
+
+            }
+        }
+    }
+    
+}

+ 154 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/View/PublishNewEditTopicView/PublishNewEditTopicViewTableViewCell.swift

@@ -0,0 +1,154 @@
+//
+//  PublishNewEditTopicViewTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class PublishNewEditTopicViewTableViewCell: UITableViewCell {
+
+    let disposeBag = DisposeBag()
+        
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> PublishNewEditTopicViewTableViewCell {
+        let ID = "PublishNewEditTopicViewTableViewCell"
+        tableView.register(PublishNewEditTopicViewTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : PublishNewEditTopicViewTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! PublishNewEditTopicViewTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        addSubview(iconImageView)
+        addSubview(topicLabel)
+        addSubview(titleLabel)
+        addSubview(subLabel)
+        addSubview(arrowImageView)
+        addSubview(h_lineLabel)
+
+    }
+    
+    private func setupLayouts() {
+
+        iconImageView.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+            make.size.equalTo(16)
+        }
+        topicLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(iconImageView.snp.right).offset(3)
+            make.right.equalTo(arrowImageView.snp.left).offset(-5)
+        }
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(iconImageView.snp.right).offset(3)
+
+        }
+        
+        subLabel.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(titleLabel.snp.right).offset(10)
+        }
+        
+        arrowImageView.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+        
+        h_lineLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.bottom.equalToSuperview()
+            make.height.equalTo(0.5)
+        }
+    }
+    
+    lazy var iconImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "edit_ico_topic")
+        return iconImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "添加话题"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kMediumFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var subLabel: UILabel = {
+        let subLabel = UILabel()
+        subLabel.text = "(选择合适的话题让更多老板看到)"
+        subLabel.textColor = kDDDDDDColor
+        subLabel.font = kRegularFont12
+        subLabel.textAlignment = .left
+        return subLabel
+    }()
+    
+    lazy var topicLabel: UILabel = {
+        let topicLabel = UILabel()
+        topicLabel.textColor = k333333Color
+        topicLabel.font = kRegularFont14
+        topicLabel.lineBreakMode = .byTruncatingTail
+        topicLabel.alpha = 0
+        return topicLabel
+    }()
+    
+    lazy var h_lineLabel: UILabel = {
+        let h_lineLabel = UILabel()
+        h_lineLabel.backgroundColor = kf5f5f5Color
+        return h_lineLabel
+    }()
+    
+    lazy var arrowImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "my_arrows_unfold")
+        return iconImageView
+    }()
+    
+    /// 发布话题
+    var publishManagerTopicModel : PublishManagerTopicModel? {
+        didSet {
+            if publishManagerTopicModel?.topics?.isEmpty ?? true {
+                topicLabel.text = ""
+                topicLabel.alpha = 0
+                titleLabel.alpha = 1
+                subLabel.alpha = 1
+                iconImageView.image = kImage(name: "edit_ico_topic")
+            }else {
+                topicLabel.text = publishManagerTopicModel?.topicsName
+                topicLabel.alpha = 1
+                titleLabel.alpha = 0
+                subLabel.alpha = 0
+                iconImageView.image = kImage(name: "edit_ico_topic_pre")
+
+            }
+        }
+    }
+    
+}

+ 256 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideo/ViewController/PublishEditVideoContentViewController.swift

@@ -0,0 +1,256 @@
+//
+//  PublishEditContentViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/9.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PublishEditVideoContentViewController: BaseViewController {
+
+    /// 合成导出路径
+    var outputPath : String?
+    /// 封面路径
+    var outCoverImagePath : String?
+    /// 发布模型
+    var publishManagerModel : PublishManagerModel?
+    /// 视频路径模型
+    var publishManagerVideoModel : PublishManagerVideoModel?
+    /// 发布内容
+    var publishManagerContentModel : PublishManagerContentModel?
+    /// 话题
+    var publishManagerTopicModel : PublishManagerTopicModel?
+    /// 定位
+    var publishManagerLocationModel : PublishManagerLocationModel?
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setVideoCoverImagePath()
+        setupViews()
+        setupLayouts()
+    }
+    
+    func setVideoCoverImagePath() {
+
+        // 视频路径
+        if publishManagerVideoModel == nil {
+            let asset = AVURLAsset.init(url: URL(fileURLWithPath: outputPath ?? ""))
+            let gen = AVAssetImageGenerator.init(asset: asset)
+            gen.appliesPreferredTrackTransform = true
+            let time = CMTimeMakeWithSeconds(0, preferredTimescale: Int32(1 * NSEC_PER_SEC))
+            var actualTime : CMTime = CMTimeMakeWithSeconds(0, preferredTimescale: 0)
+            do {
+                let image = try gen.copyCGImage(at: time, actualTime: &actualTime)
+                        //旋转修正
+                let imageNew = UIImage.rotate(aImage: UIImage(cgImage: image))
+                let imgData: Data? = UIImage.pngData(imageNew)()
+                do {
+                    try imgData?.write(to: URL(fileURLWithPath: outCoverImagePath ?? ""))
+                }
+                catch {
+                    SwiftProgressHUD.shared().showText("封面写入失败")
+                    NXLLog("存入失败")
+                    self.navigationController?.popViewController(animated: true)
+                    return
+                }
+            } catch  {
+                SwiftProgressHUD.shared().showText("封面写入失败")
+                NXLLog("错误")
+                self.navigationController?.popViewController(animated: true)
+                return
+            }
+            publishManagerVideoModel = PublishManagerVideoModel()
+            publishManagerVideoModel?.outVideoPath = outputPath
+            publishManagerVideoModel?.outVideoPathURL = URL(fileURLWithPath: outputPath ?? "")
+            publishManagerVideoModel?.outCoverImagePath = outCoverImagePath
+            publishManagerVideoModel?.outCoverImagePathURL = URL(fileURLWithPath: outCoverImagePath ?? "")
+        }
+        
+        // 内容
+        if publishManagerContentModel == nil {
+            publishManagerContentModel = PublishManagerContentModel()
+        }
+        
+        //话题
+        if publishManagerTopicModel == nil {
+            publishManagerTopicModel = PublishManagerTopicModel()
+        }
+        
+        //定位
+        if publishManagerLocationModel == nil {
+            publishManagerLocationModel = PublishManagerLocationModel()
+        }
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.wr_setBottomLineHidden(hidden: true)
+        view.addSubview(publishButton)
+        view.addSubview(tableView)
+        
+    }
+    
+    override func setupLayouts() {
+        publishButton.snp.makeConstraints { (make) in
+            make.centerY.equalTo(navigationBar.leftButton)
+            make.right.equalTo(-14)
+            make.width.equalTo(64)
+            make.height.equalTo(26)
+        }
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(kNavBarTotalHeight)
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var publishButton: UIButton = {
+        let publishButton = UIButton()
+        publishButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for: UIControl.State.normal)
+        publishButton.setBackgroundImage(UIImage.imageWithColor(color: kd8d8d8Color), for: UIControl.State.disabled)
+        publishButton.setTitle("发布", for: UIControl.State.normal)
+        publishButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        publishButton.titleLabel?.font = kMediumFont13
+        publishButton.cornerRadius = 13
+        publishButton.masksToBounds = true
+        return publishButton
+    }()
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+    typealias POPClosure = () -> Void
+    var popClosure : POPClosure?
+    
+    override func didMove(toParent parent: UIViewController?) {
+        if !(parent != nil) {
+            if let popClosure = popClosure {
+                popClosure()
+            }
+        }
+    }
+
+}
+
+// MARK: - tableView dataSource && delegate
+extension PublishEditVideoContentViewController : UITableViewDelegate, UITableViewDataSource {
+    
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 5
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch indexPath.row {
+        case 0:
+            let cell = PublishEditVideoCoverImageTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.coverImageButton.setImage(UIImage(named: publishManagerVideoModel?.outCoverImagePath ?? "default_pic"), for: UIControl.State.normal)
+           
+            return cell
+        case 1:
+            let cell = PublishEditContentViewTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.publishManagerContentModel = publishManagerContentModel
+            cell.titleTextClosure = {
+                [weak self] (text) in
+                guard let strongSelf = self else { return }
+                strongSelf.publishManagerContentModel?.title = text
+            }
+            return cell
+        case 2:
+            let cell = PublishEditContentViewDescribeCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.publishManagerContentModel = publishManagerContentModel
+            cell.commentTextViewClosure = {
+                [weak self] (text) in
+                guard let strongSelf = self else { return }
+                strongSelf.publishManagerContentModel?.detailTitle = text
+            }
+            return cell
+        case 3:
+            let cell = PublishNewEditTopicViewTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.publishManagerTopicModel = publishManagerTopicModel
+            return cell
+        case 4:
+            let cell = PublishNewEditLocationTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.publishManagerLocationModel = publishManagerLocationModel
+            return cell
+        default:
+            return UITableViewCell()
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        switch indexPath.row {
+        case 3:
+            let vc = PublishAddTopicController()
+            vc.selTopicModelArr = publishManagerTopicModel?.topics ?? []
+            vc.selTopicsClosure = {
+                [weak self] (topicMdlArr) in
+                self?.publishManagerTopicModel?.topics = topicMdlArr
+                self?.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
+            }
+            self.navigationController?.pushViewController(vc, animated: true)
+        case 4:
+            let vc = PublishAddAddressController()
+            vc.selectLocationClosure = {
+                [weak self] (address,latitude,longitude) in
+                if address == "" && address == "" && longitude == "" {
+                    self?.publishManagerLocationModel?.address = nil
+                    self?.publishManagerLocationModel?.latitude = nil
+                    self?.publishManagerLocationModel?.longitude = nil
+                } else {
+                    self?.publishManagerLocationModel?.address = address
+                    self?.publishManagerLocationModel?.latitude = latitude
+                    self?.publishManagerLocationModel?.longitude = longitude
+                }
+
+                self?.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
+            }
+            self.navigationController?.pushViewController(vc, animated: true)
+        default:
+            break
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        switch indexPath.row {
+        case 0:
+            return 130
+        case 1,3,4:
+            return 50
+        case 2:
+            return 175
+        default:
+            return UITableView.automaticDimension
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+}

+ 0 - 24
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishEditVideoContent/PublishEditVideoContentViewController.swift

@@ -1,24 +0,0 @@
-//
-//  PublishEditContentViewController.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/11/9.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
-
-import UIKit
-
-class PublishEditVideoContentViewController: BaseViewController {
-
-    /// 合成导出路径
-    var outputPath : String?
-    /// 封面路径
-    var outputCoverPath : String?
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-
-        // Do any additional setup after loading the view.
-    }
-
-}

Datei-Diff unterdrückt, da er zu groß ist
+ 236 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManager.swift


+ 123 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerModel.swift

@@ -10,9 +10,33 @@ import UIKit
 import ObjectMapper
 
 
+/// 发布模型
 class PublishManagerModel : NSObject, Mappable{
     
+    /// 发布类型
+    ///
+    /// - image: 图片
+    /// - video: 视频
+    enum PublishType {
+        case image
+        case video
+    }
+    
+    //图片/视频
+    var publishType : PublishType?
+    
+    /// 视频
     var video : PublishManagerVideoModel?
+    
+    /// 内容
+    var content : PublishManagerContentModel?
+    
+    /// 话题
+    var topic : PublishManagerTopicModel?
+    
+    /// 定位
+    var location : PublishManagerLocationModel?
+
 
     class func newInstance(map: Map) -> Mappable?{
         return PublishManagerModel()
@@ -23,17 +47,26 @@ class PublishManagerModel : NSObject, Mappable{
     func mapping(map: Map)
     {
         video <- map["video"]
+        content <- map["content"]
+        topic <- map["topic"]
+        location <- map["location"]
         
     }
 
 }
 
+
+/// 发布视频模型
 class PublishManagerVideoModel : NSObject, Mappable{
 
     var outCoverImagePath : String?
     var outCoverImagePathURL : URL?
     var outVideoPath : String?
     var outVideoPathURL : URL?
+    
+    var communityVideoAuthModel : CommunityVideoAuthModel?
+    var communityImageAuthModel : CommunityImageAuthModel?
+        
 
     class func newInstance(map: Map) -> Mappable?{
         return PublishManagerVideoModel()
@@ -48,7 +81,97 @@ class PublishManagerVideoModel : NSObject, Mappable{
         outVideoPath <- map["outVideoPath"]
         outVideoPathURL <- map["outVideoPathURL"]
         
+        communityVideoAuthModel <- map["communityVideoAuthModel"]
+        communityImageAuthModel <- map["communityImageAuthModel"]
+        
+    }
+
+}
+
+
+/// 发布内容模型
+class PublishManagerContentModel : NSObject, Mappable{
+
+    var title : String?
+    var detailTitle : String?
+
+    class func newInstance(map: Map) -> Mappable?{
+        return PublishManagerVideoModel()
+    }
+    required init?(map: Map){}
+    override init(){}
+
+    func mapping(map: Map)
+    {
+        title <- map["title"]
+        detailTitle <- map["detailTitle"]
+    }
+
+}
+
+class PublishManagerTopicModel : NSObject, Mappable{
+
+    
+    var topics : [CommunityTopicDataModel]? {
+        didSet {
+            if !(topics?.isEmpty ?? true) {
+                topicsName = ""
+                topicIds?.removeAll()
+                for (index,topicModel) in ((topics?.enumerated())!) {
+                    let topicId: String = String(format: "%d", topicModel.id ?? 0)
+                    topicIds?.append(topicId)
+
+                    if index == 0 {
+                        topicsName?.append(topicModel.name ?? "")
+                    } else {
+                        topicsName?.append(", \(topicModel.name!)")
+                    }
+                }
+            }
+            
+        }
+    }
+    var topicsName : String? = String()
+    var topicIds : [String]? = []
+    
+    
+
+    class func newInstance(map: Map) -> Mappable?{
+        return PublishManagerVideoModel()
+    }
+    required init?(map: Map){}
+    override init(){}
+
+    func mapping(map: Map)
+    {
+        
+        topics <- map["topics"]
+        topicsName <- map["topicsName"]
+        topicIds <- map["topic_ids"]
+        
     }
 
 }
 
+
+/// 发布位置模型
+class PublishManagerLocationModel : NSObject, Mappable {
+    
+    var address : String?
+    var longitude : String?
+    var latitude : String?
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return PublishManagerLocationModel()
+    }
+    required init?(map: Map){}
+    override init(){}
+
+    func mapping(map: Map)
+    {
+        address <- map["address"]
+        longitude <- map["longitude"]
+        latitude <- map["latitude"]
+    }
+}
+

+ 83 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadFailureView.swift

@@ -0,0 +1,83 @@
+//
+//  PublishManagerUploadFailureView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PublishManagerUploadFailureView: BaseView {
+
+    override func setupViews() {
+        self.backgroundColor = kffffffColor
+        addSubview(uploadFailureLabel)
+        addSubview(uploadFailureErrorInfoLabel)
+        addSubview(failedCloseButton)
+        addSubview(editButton)
+    }
+    
+    override func setupLayouts() {
+        uploadFailureLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(14)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(20)
+        }
+        uploadFailureErrorInfoLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-11.5)
+            make.left.equalToSuperview()
+            make.height.equalTo(18.5)
+            make.right.equalTo(-132)
+        }
+        failedCloseButton.snp.makeConstraints { (make) in
+            make.centerY.right.equalToSuperview()
+            make.size.equalTo(22)
+        }
+        editButton.snp.makeConstraints { (make) in
+            make.centerY.right.equalToSuperview()
+            make.width.equalTo(74)
+            make.height.equalTo(26)
+            make.right.equalTo(failedCloseButton.snp.left).offset(-15)
+        }
+    }
+    
+    override func setupData() {
+       
+    }
+    
+    lazy var uploadFailureLabel: UILabel = {
+        let uploadFailureLabel = UILabel()
+        uploadFailureLabel.textColor = k333333Color
+        uploadFailureLabel.font = kRegularFont14
+        uploadFailureLabel.textAlignment = .left
+        return uploadFailureLabel
+    }()
+    
+    lazy var uploadFailureErrorInfoLabel: UILabel = {
+        let uploadFailureErrorInfoLabel = UILabel()
+        uploadFailureErrorInfoLabel.textColor = k999999Color
+        uploadFailureErrorInfoLabel.font = kRegularFont13
+        uploadFailureErrorInfoLabel.textAlignment = .left
+        return uploadFailureErrorInfoLabel
+    }()
+    
+    private lazy var failedCloseButton: UIButton = {
+        let failedCloseButton = UIButton(type: UIButton.ButtonType.custom)
+        failedCloseButton.setImage(kImage(name: "popup_btn_close_black"), for: .normal)
+        return failedCloseButton
+    }()
+    
+    private lazy var editButton: UIButton = {
+        let editButton = UIButton(type: UIButton.ButtonType.custom)
+        editButton.setTitle("重新编辑", for: UIControl.State.normal)
+        editButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        editButton.titleLabel?.font = kMediumFont13
+        editButton.backgroundColor = kThemeColor
+        return editButton
+    }()
+    
+    
+    
+
+}

+ 53 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadProgressView.swift

@@ -0,0 +1,53 @@
+//
+//  PublishManagerUploadProgressView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PublishManagerUploadProgressView: BaseView {
+
+    override func setupViews() {
+        self.backgroundColor = kffffffColor
+        addSubview(progressValueLabel)
+        addSubview(progressView)
+    }
+    
+    override func setupLayouts() {
+        progressValueLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(14)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(20)
+        }
+        progressView.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-14)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(4)
+        }
+    }
+    
+    override func setupData() {
+       
+    }
+    
+    lazy var progressValueLabel: UILabel = {
+        let progressValueLabel = UILabel()
+        progressValueLabel.textColor = k333333Color
+        progressValueLabel.font = kRegularFont14
+        progressValueLabel.textAlignment = .left
+        return progressValueLabel
+    }()
+    
+    lazy var progressView: UIProgressView = {
+        let progressView = UIProgressView(progressViewStyle: .default)
+        progressView.setProgress(0, animated: false)
+        progressView.progressTintColor = kThemeColor //进度颜色
+        progressView.trackTintColor = kd8d8d8Color //剩余进度颜色
+        progressView.cornerRadius = 2
+        progressView.masksToBounds = true
+        return progressView
+    }()
+}

+ 144 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishManager/PublishManagerUploadView.swift

@@ -0,0 +1,144 @@
+//
+//  PublishManagerUploadProgressView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/11/11.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import FWPopupView
+import RxSwift
+import RxCocoa
+
+class PublishManagerUploadView: BaseView {
+    override func setupViews() {
+        self.backgroundColor = kffffffColor
+        self.alpha = 0
+        addSubview(imageView)
+        addSubview(publishManagerUploadProgressView)
+        addSubview(publishManagerUploadFailureView)
+    }
+    
+    override func setupLayouts() {
+        imageView.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.centerY.equalToSuperview()
+            make.size.equalTo(44)
+        }
+        
+        publishManagerUploadProgressView.snp.makeConstraints { (make) in
+            make.left.equalTo(imageView.snp.right).offset(10)
+            make.top.bottom.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+        
+        publishManagerUploadFailureView.snp.makeConstraints { (make) in
+            make.left.equalTo(imageView.snp.right).offset(10)
+            make.top.bottom.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+    }
+    
+    override func setupData() {
+       
+    }
+    
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView()
+        imageView.image = kImage(name: "default_pic")
+        imageView.contentMode =  .scaleAspectFill
+        imageView.clipsToBounds = true
+        imageView.cornerRadius = 5
+        return imageView
+    }()
+    
+    lazy var publishManagerUploadProgressView: PublishManagerUploadProgressView = {
+        let publishManagerUploadProgressView = PublishManagerUploadProgressView()
+        publishManagerUploadProgressView.alpha = 0
+        return publishManagerUploadProgressView
+    }()
+    
+    lazy var publishManagerUploadFailureView: PublishManagerUploadFailureView = {
+        let publishManagerUploadFailureView = PublishManagerUploadFailureView()
+        publishManagerUploadFailureView.alpha = 0
+        return publishManagerUploadFailureView
+    }()
+    
+    var publishManagerModel : PublishManagerModel? {
+        didSet {
+            guard let publishManagerModel = publishManagerModel  else {
+                return
+            }
+            alpha = 1
+            publishManagerUploadProgressView.alpha = 1
+            publishManagerUploadFailureView.alpha = 0
+            if publishManagerModel.publishType == .video {
+                publishVideo(publishManagerModel: publishManagerModel)
+            }
+            
+            if publishManagerModel.publishType == .image {
+                publishImage(publishManagerModel: publishManagerModel)
+            }
+        }
+    }
+    
+    
+    /// 视频
+    /// - Parameter publishManagerModel: 发布管理器
+    func publishVideo(publishManagerModel:PublishManagerModel)  {
+        PublishManager.shared.publishVideo(publishManagerModel: publishManagerModel, progressImageClosure: { (image) in
+            DispatchQueue.main.async {
+                [weak self] in
+                self?.imageView.image = image
+            }
+        }, progressClosure: { (progress) in
+            DispatchQueue.main.async {
+                [weak self] in
+                let progressValue =  ceil(progress) * 100
+                let progressValueStr: String = String(format: "正在上传中(%.0f%%)...", progressValue)
+                self?.publishManagerUploadProgressView.progressView.setProgress(progress, animated: true)
+                self?.publishManagerUploadProgressView.progressValueLabel.text = progressValueStr
+            }
+        }, releaseClosure: {
+            DispatchQueue.main.async {
+                [weak self] in
+                self?.publishManagerUploadProgressView.progressValueLabel.text = "上传成功!发布中..."
+            }
+        }, successClosure: {
+            DispatchQueue.main.async {
+                [weak self] in
+                self?.publishManagerUploadProgressView.progressValueLabel.text = "发布成功!"
+                UIView.animate(withDuration: 0.5, delay: 0.5, options: UIView.AnimationOptions.allowUserInteraction, animations: {
+                    self?.alpha = 0
+                    self?.publishManagerUploadProgressView.alpha = 0
+                    self?.publishManagerUploadFailureView.alpha = 0
+                }) { (finish) in
+                    PublishManager.shared.destroyAll()
+                    NotificationCenter.default.post(name: NSNotification.Name("PublishPostSuccess"), object: nil)
+                }
+                
+            }
+        }) { (message) in
+            UIView.animate(withDuration: 0.5) {
+                [weak self] in
+                DispatchQueue.main.async {
+                    [weak self] in
+                    self?.publishManagerUploadProgressView.alpha = 0
+                    self?.publishManagerUploadFailureView.alpha = 1
+                }
+            }
+        }
+    }
+    
+    
+    /// 图片
+    /// - Parameter publishManagerModel: 发布管理器
+    func publishImage(publishManagerModel:PublishManagerModel)  {
+    
+    }
+    
+}
+
+
+

+ 5 - 5
RainbowPlanet/RainbowPlanet/Modules/PublishNewModule/PublishNew/View/PublishNewView/PublishNewVideoPhotoView.swift

@@ -31,7 +31,7 @@ class PublishNewVideoPhotoView: BaseView {
     /// 是否完成录制
     var isFinishRecorder : Bool = false
     /// 封面图路径
-    var outputCoverPathUrl : URL?
+    var outCoverImagePathURL : URL?
     
     /// 添加View
     override func setupViews() {
@@ -243,7 +243,7 @@ class PublishNewVideoPhotoView: BaseView {
         recorder?.taskPath = taskPathUrl.path
         
         // 设置录制视频输出路径
-        let outputPathUrl =
+        let outputPathURL =
             PathURLManager.projectPathExtensionMp4(parentURL:
                 PathURLManager.projectFilePath(fileName:
                     PathURLManager.randomString(), parentURL:
@@ -254,7 +254,7 @@ class PublishNewVideoPhotoView: BaseView {
                                         PathURLManager.projectDocumentPath()))))))!
         
         // 设置录制视频封面输出路径
-        outputCoverPathUrl =
+        outCoverImagePathURL =
             PathURLManager.projectPathExtensionPng(parentURL:
                 PathURLManager.projectFilePath(fileName:
                     PathURLManager.randomString(), parentURL:
@@ -264,7 +264,7 @@ class PublishNewVideoPhotoView: BaseView {
                                     PathURLManager.projectRecordssPath(parentURL:
                                         PathURLManager.projectDocumentPath()))))))!
         // 设置录制视频输出路径
-        recorder?.outputPath = outputPathUrl.path
+        recorder?.outputPath = outputPathURL.path
         //循环切换手电筒模式手电筒模式有三种,分别是off,on和auto。切换顺序:off —-> on —-> auto。默认值:off。
         recorder?.switchTorch(with: AliyunIRecorderTorchMode.off)
         // 美颜状态
@@ -818,7 +818,7 @@ extension PublishNewVideoPhotoView : AliyunIRecorderDelegate {
             let vc = PublishEditNewViewController()
             vc.taskPath = self?.recorder?.taskPath
             vc.outputPath = self?.recorder?.outputPath
-            vc.outputCoverPath = self?.outputCoverPathUrl?.path
+            vc.outCoverImagePath = self?.outCoverImagePathURL?.path
             vc.popClosure = {
                 [weak self] in
                 self?.recorder?.startPreview()

+ 1 - 1
RainbowPlanet/RainbowPlanet/Tools/Extension/Extension+UIImage.swift

@@ -242,7 +242,7 @@ extension UIImage {
 
 
 extension UIImage {
-    func rotate(aImage:UIImage) -> UIImage {
+    class func rotate(aImage:UIImage) -> UIImage {
         // 向上 直接返回
         if aImage.imageOrientation == .up {
             return aImage