Sfoglia il codice sorgente

Merge branch 'develop' into feature/jeremy

# Conflicts:
#	RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
南鑫林 5 anni fa
parent
commit
278b5933c0
67 ha cambiato i file con 203 aggiunte e 257 eliminazioni
  1. 16 16
      RainbowPlanet/Podfile.lock
  2. 5 37
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  3. 0 0
      RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSMemberListModel.swift
  4. 0 0
      RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSModel.swift
  5. 0 0
      RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSTemplateModel.swift
  6. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityFollowFeedModel.swift
  7. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityMemberFollowTopicListModel.swift
  8. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPostMyModel.swift
  9. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPostsModel.swift
  10. 33 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPublishModel.swift
  11. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityRecommendFeedModel.swift
  12. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicCategoryModel.swift
  13. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicDetailModel.swift
  14. 0 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicsModel.swift
  15. 0 0
      RainbowPlanet/RainbowPlanet/Model/ConfigModel/ConfigModel.swift
  16. 0 0
      RainbowPlanet/RainbowPlanet/Model/ConfigModel/ImageUrlModel.swift
  17. 0 0
      RainbowPlanet/RainbowPlanet/Model/ConfigModel/OpenCityListModel.swift
  18. 0 0
      RainbowPlanet/RainbowPlanet/Model/ConfigModel/SelfMentionAddressListModel.swift
  19. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderApplyRefundModel.swift
  20. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderCreateBackModel.swift
  21. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderCreateParameterModel.swift
  22. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderListModel.swift
  23. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderPurchaseModel.swift
  24. 0 0
      RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderRefundDetailModel.swift
  25. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/CategoryListModel.swift
  26. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/OrderCommentParameterModel.swift
  27. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartAmountModel.swift
  28. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartCountModel.swift
  29. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartListModel.swift
  30. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCommentListModel.swift
  31. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductDetailModel.swift
  32. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductModel.swift
  33. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductRefundReasonModel.swift
  34. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductSearchListModel.swift
  35. 0 0
      RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductSearchModel.swift
  36. 0 0
      RainbowPlanet/RainbowPlanet/Model/RootModel/InfoModel.swift
  37. 0 0
      RainbowPlanet/RainbowPlanet/Model/RootModel/PaginationModel.swift
  38. 0 0
      RainbowPlanet/RainbowPlanet/Model/RootModel/RootModel.swift
  39. 0 0
      RainbowPlanet/RainbowPlanet/Model/ShopModel/ShopModel.swift
  40. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/AddressManagerListModel.swift
  41. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/DefaultContactInfoModel.swift
  42. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/DeliveryMethodTypeModel.swift
  43. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/FollowStatusModel.swift
  44. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/MessageIndexModel.swift
  45. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/MessageListModel.swift
  46. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/SearchMemberListModel.swift
  47. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/SelfMentionContactsListModel.swift
  48. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/SetPasswordModel.swift
  49. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/TotalBeanModel.swift
  50. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/UserDetailModel.swift
  51. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/UserFansModel.swift
  52. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/UserFollowsModel.swift
  53. 0 0
      RainbowPlanet/RainbowPlanet/Model/UserModel/UserModel.swift
  54. 0 0
      RainbowPlanet/RainbowPlanet/Model/VirusModel/VirueRecordAddParameterModel.swift
  55. 0 0
      RainbowPlanet/RainbowPlanet/Model/WVJBModel/WVJBModel.swift
  56. 0 47
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishChooseVideoCover/PublishChooseVideoCover.swift
  57. 0 69
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishCutVideo/PublishCutVideoController.swift
  58. 34 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift
  59. 16 9
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddPicCell.swift
  60. 0 75
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditVideo/PublishEditVideoController.swift
  61. 14 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/Controller/KSMediaPickerController.swift
  62. 17 0
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift
  63. 32 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift
  64. 14 3
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift
  65. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/Contents.json
  66. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@2x.png
  67. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@3x.png

+ 16 - 16
RainbowPlanet/Podfile.lock

@@ -15,12 +15,12 @@ PODS:
   - AFNetworking/UIKit (3.2.1):
     - AFNetworking/NSURLSession
   - Alamofire (4.8.2)
-  - AlivcConan (0.9.4):
-    - AlivcConan/AlivcConan (= 0.9.4)
-  - AlivcConan/AlivcConan (0.9.4)
+  - AlivcConan (0.9.5):
+    - AlivcConan/AlivcConan (= 0.9.5)
+  - AlivcConan/AlivcConan (0.9.5)
   - AliyunOSSiOS (2.10.7)
-  - AliyunVideoSDKStd (3.10.0)
-  - BaiduMapKit (4.3.2)
+  - AliyunVideoSDKStd (3.10.5)
+  - BaiduMapKit (4.4.0)
   - BMKLocationKit (1.5.0)
   - Cache (5.2.0)
   - DeviceKit (2.0.0)
@@ -34,10 +34,10 @@ PODS:
     - SnapKit
   - IQKeyboardManagerSwift (6.4.0)
   - JSONModel (1.7.0)
-  - JXSegmentedView (0.0.18)
+  - JXSegmentedView (0.0.19)
   - KeychainAccess (3.2.0)
   - Kingfisher (4.10.1)
-  - LYEmptyView (1.2.3)
+  - LYEmptyView (1.2.4)
   - MBProgressHUD (1.1.0)
   - MJRefresh (3.2.0)
   - Moya/Core (13.0.1):
@@ -46,10 +46,10 @@ PODS:
   - Moya/RxSwift (13.0.1):
     - Moya/Core
     - RxSwift (~> 4.0)
-  - ObjectMapper (3.5.0)
+  - ObjectMapper (3.5.1)
   - pop (1.0.12)
   - PPBadgeViewSwift (3.1.0)
-  - QuCore-ThirdParty (3.8.0)
+  - QuCore-ThirdParty (3.10.0)
   - Result (4.1.0)
   - RxCocoa (4.5.0):
     - RxSwift (>= 4.4.2, ~> 4.4)
@@ -179,10 +179,10 @@ SPEC REPOS:
 SPEC CHECKSUMS:
   AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
   Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
-  AlivcConan: f75de70ee0c260cfcfc7885a7ee9c1efb877c974
+  AlivcConan: 9dccc32986024768bb5f50e14ad54490123903c7
   AliyunOSSiOS: 602b6a4e70e62a5f0a6431c20496343141d7e66f
-  AliyunVideoSDKStd: 78851704275fb308448d30c0225ee65b2309cfc7
-  BaiduMapKit: a5d9580553355d39a91b24c5eb91ebf298c64038
+  AliyunVideoSDKStd: dce7bdd2d7fb0e8f6960ce0b94533ae50c068468
+  BaiduMapKit: 19a568e238d6d5a91b93daf7819b868d39cb2206
   BMKLocationKit: 40d267478acd8704ddebd0e9deaddc727b13df9f
   Cache: 807c5d86d01a177f06ede9865add3aea269bbfd4
   DeviceKit: 72d36709552d4b3582abd76a53949148acad9811
@@ -193,17 +193,17 @@ SPEC CHECKSUMS:
   FWPopupView: c1dbb33fbe4d223f619f28a7e5e5a00f08c10342
   IQKeyboardManagerSwift: ed9b04ee0e3067ffba543283462d619f944b05e5
   JSONModel: 840bc0fcffb24b8454d2c026bf26fea454b8e98d
-  JXSegmentedView: 2358f1335409659c7e7e79d6ff7532c014e21fe1
+  JXSegmentedView: 6e22381bd1e6f0767fc078bef1947b13b2d337a1
   KeychainAccess: 3b1bf8a77eb4c6ea1ce9404c292e48f948954c6b
   Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0
-  LYEmptyView: ea5827f3f81fcbec427f990005501991477bdae8
+  LYEmptyView: 38491c9e22775da8870f5e29a37f9eb5116533b7
   MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
   MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437
   Moya: f4a4b80ff2f8a4ffc208dfb31cd91636622fee6e
-  ObjectMapper: 078b564ed25c6578b62588e306bf1da3924636d4
+  ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0
   pop: d582054913807fd11fd50bfe6a539d91c7e1a55a
   PPBadgeViewSwift: 18a219a9897f418342c22dd1a54f7b18ac56546b
-  QuCore-ThirdParty: 4856aa9d5b642fc6ae9375c5c8f9c760f5051142
+  QuCore-ThirdParty: 60a6f08864631569569fa1e2c6208a7746698923
   Result: bd966fac789cc6c1563440b348ab2598cc24d5c7
   RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0
   RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575

+ 5 - 37
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -435,8 +435,6 @@
 		BD108C9722A60C2100837DAB /* HGImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD108C9222A60C2100837DAB /* HGImagePickerController.swift */; };
 		BD108C9A22A60C3300837DAB /* HGImage.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD108C9822A60C3200837DAB /* HGImage.xcassets */; };
 		BD108C9B22A60C3300837DAB /* HGImage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD108C9922A60C3300837DAB /* HGImage.storyboard */; };
-		BD10CCF822BE6DF00040796E /* PublishCutVideoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD10CCF722BE6DF00040796E /* PublishCutVideoController.swift */; };
-		BD10CCFB22BE75080040796E /* PublishChooseVideoCover.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD10CCFA22BE75080040796E /* PublishChooseVideoCover.swift */; };
 		BD10CD0822BFC1C20040796E /* PublishMusicItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD10CD0722BFC1C20040796E /* PublishMusicItemCell.swift */; };
 		BD10CD0A22BFC5E40040796E /* PublishMusicHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD10CD0922BFC5E40040796E /* PublishMusicHeader.swift */; };
 		BD10CD0C22BFCC7C0040796E /* PublishMusicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD10CD0B22BFCC7C0040796E /* PublishMusicView.swift */; };
@@ -584,7 +582,7 @@
 		BD7AB8432284390B0030646A /* OrderPaySelfPickInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8422284390B0030646A /* OrderPaySelfPickInfoCell.swift */; };
 		BD7AB8452284398A0030646A /* OrderPaySelfPickAddInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */; };
 		BD929CCE22B904A30098C139 /* PublishViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD929CCD22B904A30098C139 /* PublishViewController.swift */; };
-		BDA5F8F322BCE9AB00C174B6 /* PublishEditVideoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDA5F8F222BCE9AB00C174B6 /* PublishEditVideoController.swift */; };
+		BD981A8F22C9FEEF0043D951 /* CommunityPublishModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD981A8E22C9FEEF0043D951 /* CommunityPublishModel.swift */; };
 		BDAA40F7228E947500CF841D /* OrderApplyRefundAccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */; };
 		BDAA40F9228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */; };
 		BDAA40FB228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FA228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift */; };
@@ -1119,8 +1117,6 @@
 		BD108C9222A60C2100837DAB /* HGImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HGImagePickerController.swift; sourceTree = "<group>"; };
 		BD108C9822A60C3200837DAB /* HGImage.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = HGImage.xcassets; sourceTree = "<group>"; };
 		BD108C9922A60C3300837DAB /* HGImage.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HGImage.storyboard; sourceTree = "<group>"; };
-		BD10CCF722BE6DF00040796E /* PublishCutVideoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishCutVideoController.swift; sourceTree = "<group>"; };
-		BD10CCFA22BE75080040796E /* PublishChooseVideoCover.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishChooseVideoCover.swift; sourceTree = "<group>"; };
 		BD10CD0722BFC1C20040796E /* PublishMusicItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishMusicItemCell.swift; sourceTree = "<group>"; };
 		BD10CD0922BFC5E40040796E /* PublishMusicHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishMusicHeader.swift; sourceTree = "<group>"; };
 		BD10CD0B22BFCC7C0040796E /* PublishMusicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishMusicView.swift; sourceTree = "<group>"; };
@@ -1339,7 +1335,7 @@
 		BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPaySelfPickAddInfoCell.swift; sourceTree = "<group>"; };
 		BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.debug.xcconfig"; sourceTree = "<group>"; };
 		BD929CCD22B904A30098C139 /* PublishViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishViewController.swift; sourceTree = "<group>"; };
-		BDA5F8F222BCE9AB00C174B6 /* PublishEditVideoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublishEditVideoController.swift; sourceTree = "<group>"; };
+		BD981A8E22C9FEEF0043D951 /* CommunityPublishModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityPublishModel.swift; sourceTree = "<group>"; };
 		BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundAccountCell.swift; sourceTree = "<group>"; };
 		BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundReasonCell.swift; sourceTree = "<group>"; };
 		BDAA40FA228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundNoteInfoCell.swift; sourceTree = "<group>"; };
@@ -2166,7 +2162,6 @@
 		A72A7252223219BD00B21995 /* Service */ = {
 			isa = PBXGroup;
 			children = (
-				A738D203225AEAD000EEE860 /* Model */,
 				A72A7380223396CB00B21995 /* SwiftMoyaService */,
 			);
 			path = Service;
@@ -2722,6 +2717,7 @@
 				A77F2C8E2231FC5C001BD3F6 /* AppDelegate */,
 				A77F2C8F2231FC65001BD3F6 /* Base */,
 				A77F2CA22232010F001BD3F6 /* Modules */,
+				A738D203225AEAD000EEE860 /* Model */,
 				A72A7252223219BD00B21995 /* Service */,
 				A72A725422321B9400B21995 /* Manager */,
 				A72A725922321C5E00B21995 /* Macro */,
@@ -3844,6 +3840,7 @@
 				A7AA9F6622C640F10086498B /* CommunityRecommendFeedModel.swift */,
 				A71CAB3822C9DF0600D908A8 /* CommunityTopicDetailModel.swift */,
 				A71CAB3A22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift */,
+				BD981A8E22C9FEEF0043D951 /* CommunityPublishModel.swift */,
 			);
 			path = CommunityModel;
 			sourceTree = "<group>";
@@ -4305,22 +4302,6 @@
 			path = HGImagePicker;
 			sourceTree = "<group>";
 		};
-		BD10CCF622BE6D6A0040796E /* PublishCutVideo */ = {
-			isa = PBXGroup;
-			children = (
-				BD10CCF722BE6DF00040796E /* PublishCutVideoController.swift */,
-			);
-			path = PublishCutVideo;
-			sourceTree = "<group>";
-		};
-		BD10CCF922BE74E20040796E /* PublishChooseVideoCover */ = {
-			isa = PBXGroup;
-			children = (
-				BD10CCFA22BE75080040796E /* PublishChooseVideoCover.swift */,
-			);
-			path = PublishChooseVideoCover;
-			sourceTree = "<group>";
-		};
 		BD12203222AF803A0051C7C2 /* MessagePlanetActivity */ = {
 			isa = PBXGroup;
 			children = (
@@ -4388,9 +4369,6 @@
 				BD12B67222B4E99800AEB10B /* PublishMediaPicker */,
 				BD01B1FC22BC677900CE9F36 /* PublishTakeVideo */,
 				BD01B1F722BC673900CE9F36 /* PublishTakePhoto */,
-				BD10CCF622BE6D6A0040796E /* PublishCutVideo */,
-				BD10CCF922BE74E20040796E /* PublishChooseVideoCover */,
-				BDA5F8F122BCE96E00C174B6 /* PublishEditVideo */,
 				BD13B69F22B9CE8D008BB323 /* PublishEditController */,
 				BD13B6CF22BA03BB008BB323 /* PublishAddTopic */,
 				BD13B6CB22BA03BB008BB323 /* PublishAddAddress */,
@@ -5089,14 +5067,6 @@
 			path = AdressCell;
 			sourceTree = "<group>";
 		};
-		BDA5F8F122BCE96E00C174B6 /* PublishEditVideo */ = {
-			isa = PBXGroup;
-			children = (
-				BDA5F8F222BCE9AB00C174B6 /* PublishEditVideoController.swift */,
-			);
-			path = PublishEditVideo;
-			sourceTree = "<group>";
-		};
 		BDAF83AE22B3B6150004BCC3 /* AllCommentCell */ = {
 			isa = PBXGroup;
 			children = (
@@ -5751,7 +5721,6 @@
 				BD7AB83F228438290030646A /* OrderPayExpressAddInfoCell.swift in Sources */,
 				A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */,
 				BD61229E22C3629800D3F513 /* AlivcAppServer.m in Sources */,
-				BD10CCF822BE6DF00040796E /* PublishCutVideoController.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
 				BD13B6C122BA034D008BB323 /* PublishEditAddPicCell.swift in Sources */,
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
@@ -5942,7 +5911,6 @@
 				A7BB685922696B9200AB07A2 /* SelfRecommendationCollectionViewCell.swift in Sources */,
 				BD61231522C3749800D3F513 /* AliyunPathManager.m in Sources */,
 				BD12B69A22B4FA8400AEB10B /* KSMediaPickerSelectIndicator.swift in Sources */,
-				BDA5F8F322BCE9AB00C174B6 /* PublishEditVideoController.swift in Sources */,
 				A7636AC822682BAF00374F9E /* LocationView.swift in Sources */,
 				BD61227C22C35C7F00D3F513 /* AliyunMediaConfig.m in Sources */,
 				A738D205225AF90D00EEE860 /* WeChatpayOrderModel.swift in Sources */,
@@ -5980,6 +5948,7 @@
 				A7778CAB2244B12500C7C47A /* CountDownManager.swift in Sources */,
 				A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */,
 				A71AA5212272E527008FF1A5 /* Extension+UINavigationController.swift in Sources */,
+				BD981A8F22C9FEEF0043D951 /* CommunityPublishModel.swift in Sources */,
 				A7D5F22D22BB689700F8E9AF /* WKWebViewEnum.swift in Sources */,
 				A7D07CD222B784B800186014 /* UserPersonalCenterHeaderView.swift in Sources */,
 				A7CC751822716202003C4F38 /* SetView.swift in Sources */,
@@ -6108,7 +6077,6 @@
 				A757849F22C1CEA900D4DB61 /* FollowStatusModel.swift in Sources */,
 				A7CC751F227190C5003C4F38 /* AccountSecurityViewController.swift in Sources */,
 				BD13B6C422BA034D008BB323 /* PublishEditDefaultCollectionCell.swift in Sources */,
-				BD10CCFB22BE75080040796E /* PublishChooseVideoCover.swift in Sources */,
 				BD29A92E228F99780018CFC3 /* OrderCommentParameterModel.swift in Sources */,
 				BD61230522C36C6900D3F513 /* AlivcPushBeautyDataManager.m in Sources */,
 				A7284440224DFACD00F82F30 /* InfoModel.swift in Sources */,

RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSMemberListModel.swift → RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSMemberListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSModel.swift → RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSTemplateModel.swift → RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSTemplateModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityFollowFeedModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityFollowFeedModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityMemberFollowTopicListModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityMemberFollowTopicListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityPostMyModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPostMyModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityPostsModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPostsModel.swift


+ 33 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityPublishModel.swift

@@ -0,0 +1,33 @@
+//
+//  CommunityPublishModel.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/7/1.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+import ObjectMapper
+
+
+class CommunityPublishModel : NSObject, Mappable{
+    
+    var bean : String?
+    var h5url : String?
+    var postId : Int?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityPublishModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        bean <- map["bean"]
+        h5url <- map["h5url"]
+        postId <- map["post_id"]
+        
+    }
+}

RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityRecommendFeedModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityRecommendFeedModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityTopicCategoryModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicCategoryModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityTopicDetailModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicDetailModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityTopicsModel.swift → RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityTopicsModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ConfigModel/ConfigModel.swift → RainbowPlanet/RainbowPlanet/Model/ConfigModel/ConfigModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ConfigModel/ImageUrlModel.swift → RainbowPlanet/RainbowPlanet/Model/ConfigModel/ImageUrlModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ConfigModel/OpenCityListModel.swift → RainbowPlanet/RainbowPlanet/Model/ConfigModel/OpenCityListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ConfigModel/SelfMentionAddressListModel.swift → RainbowPlanet/RainbowPlanet/Model/ConfigModel/SelfMentionAddressListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderApplyRefundModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderApplyRefundModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderCreateBackModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderCreateBackModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderCreateParameterModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderCreateParameterModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderListModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderPurchaseModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderPurchaseModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderRefundDetailModel.swift → RainbowPlanet/RainbowPlanet/Model/OrderModel/OrderRefundDetailModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/CategoryListModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/CategoryListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/OrderCommentParameterModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/OrderCommentParameterModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductCartAmountModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartAmountModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductCartCountModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartCountModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductCartListModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCartListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductCommentListModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductCommentListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductDetailModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductDetailModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductRefundReasonModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductRefundReasonModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductSearchListModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductSearchListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ProductModel/ProductSearchModel.swift → RainbowPlanet/RainbowPlanet/Model/ProductModel/ProductSearchModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/RootModel/InfoModel.swift → RainbowPlanet/RainbowPlanet/Model/RootModel/InfoModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/RootModel/PaginationModel.swift → RainbowPlanet/RainbowPlanet/Model/RootModel/PaginationModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/RootModel/RootModel.swift → RainbowPlanet/RainbowPlanet/Model/RootModel/RootModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/ShopModel/ShopModel.swift → RainbowPlanet/RainbowPlanet/Model/ShopModel/ShopModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/AddressManagerListModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/AddressManagerListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/DefaultContactInfoModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/DefaultContactInfoModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/DeliveryMethodTypeModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/DeliveryMethodTypeModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/FollowStatusModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/FollowStatusModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/MessageIndexModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/MessageIndexModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/MessageListModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/MessageListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/SearchMemberListModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/SearchMemberListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/SelfMentionContactsListModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/SelfMentionContactsListModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/SetPasswordModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/SetPasswordModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/TotalBeanModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/TotalBeanModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/UserDetailModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/UserDetailModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/UserFansModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/UserFansModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/UserFollowsModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/UserFollowsModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/UserModel/UserModel.swift → RainbowPlanet/RainbowPlanet/Model/UserModel/UserModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/VirusModel/VirueRecordAddParameterModel.swift → RainbowPlanet/RainbowPlanet/Model/VirusModel/VirueRecordAddParameterModel.swift


RainbowPlanet/RainbowPlanet/Service/Model/WVJBModel/WVJBModel.swift → RainbowPlanet/RainbowPlanet/Model/WVJBModel/WVJBModel.swift


+ 0 - 47
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishChooseVideoCover/PublishChooseVideoCover.swift

@@ -1,47 +0,0 @@
-//
-//  PublishChooseVideoCover.swift
-//  RainbowPlanet
-//
-//  Created by Christopher on 2019/6/22.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//  视频封面选择
-
-import UIKit
-
-class PublishChooseVideoCover: BaseViewController {
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-        
-    }
-    
-    override func setupViews() {
-        navigationBar.title = "视频编辑"
-        view.backgroundColor = kf7f8faColor
-        
-        view.addSubview(topView)
-        
-    }
-    
-    override func setupLayouts() {
-        topView.snp.makeConstraints { (make) in
-            make.top.equalToSuperview().offset(kNavBarTotalHeight + 1)
-            make.left.right.equalToSuperview().offset(0)
-            make.height.equalTo(104)
-        }
-        
-    }
-    
-    override func setupData() {
-        
-    }
-    
-    
-    private lazy var topView: UIView = {
-        let topView = UIView()
-        topView.backgroundColor = UIColor.white
-        return topView
-    }()
-}

+ 0 - 69
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishCutVideo/PublishCutVideoController.swift

@@ -1,69 +0,0 @@
-//
-//  PublishCutVideoController.swift
-//  RainbowPlanet
-//
-//  Created by Christopher on 2019/6/22.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//  视频裁剪
-
-import UIKit
-
-class PublishCutVideoController: BaseViewController {
-    
-    var videoItemModel: KSMediaPickerItemModel?
-    
-    var avAsset: AVAsset?
-    var playerItem: AVPlayerItem?
-    var avPlayer: AVPlayer?
-    var avPlayerLayer: AVPlayerLayer?
-    var timeObserver: Any?
-    var currentTime: CMTime?
-    
-//    var progressView: AliyunCycleProgressView?
-    
-    
-    
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-        
-        
-//        NSURL *sourceURL = [NSURL fileURLWithPath:_cutInfo.sourcePath];
-//        _avAsset = [AVAsset assetWithURL:sourceURL];
-//        _originalMediaSize = [_avAsset avAssetNaturalSize];
-//        _destRatio = _cutInfo.outputSize.width / _cutInfo.outputSize.height;
-//        _orgVideoRatio = _originalMediaSize.width / _originalMediaSize.height;
-//        [self setAVPlayer];
-//        _thumbnailView.avAsset = _avAsset;
-    }
-    
-    override func setupViews() {
-        navigationBar.title = "视频编辑"
-        view.backgroundColor = kf7f8faColor
-        
-        view.addSubview(topView)
-        
-    }
-    
-    override func setupLayouts() {
-        topView.snp.makeConstraints { (make) in
-            make.top.equalToSuperview().offset(kNavBarTotalHeight + 1)
-            make.left.right.equalToSuperview().offset(0)
-            make.height.equalTo(104)
-        }
-        
-    }
-    
-    override func setupData() {
-        
-    }
-    
-    
-    private lazy var topView: UIView = {
-        let topView = UIView()
-        topView.backgroundColor = UIColor.white
-        return topView
-    }()
-}

+ 34 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/Controller/PublishEditController.swift

@@ -13,6 +13,13 @@ import Photos
 
 class PublishEditController: BaseViewController {
     
+    var imgCount: Int = 0
+    var imageArr: Array<UIImage>? {
+        didSet {
+            imgCount = self.imageArr?.count ?? 0
+        }
+    }
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
@@ -29,6 +36,17 @@ class PublishEditController: BaseViewController {
             print("----点击了发布")
         }
         
+        navigationBar.wr_setLeftButton(image: kImage(name: "navbar_back_black")!)
+        navigationBar.onClickLeftButton = {
+            [weak self] in
+            AlertSheetView.alert(title: "是否退出内容发布?退出后你所编辑的内容无法恢复!", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
+                
+            }, confirmBlock: {
+                (popupView, index, string) in
+                NotificationCenter.default.post(name: NSNotification.Name(rawValue: "DismissFromPublishEditVc"), object: nil)
+            })
+        }
+        
         view.addSubview(tableView)
         tableView.snp.makeConstraints { (make) in
             make.top.equalToSuperview().offset(kNavBarTotalHeight)
@@ -69,6 +87,17 @@ extension PublishEditController : UITableViewDelegate, UITableViewDataSource {
         switch indexPath.row {
         case 0:
             let picCell = PublishEditAddPicCell.cellWith(tableView: tableView, indexPath: indexPath)
+            picCell.pubImageArr = imageArr
+            picCell.reloadData()
+            picCell.choosePicBlock = {
+                [weak self] in
+                print("\n----选取图片")
+            }
+            picCell.delPicTransBlock = {
+                [weak self] (picIdx) in
+                self?.imageArr?.remove(at: picIdx!)
+                self?.tableView.reloadData()
+            }
             return picCell
         case 1:
             let titleCell = PublishEditTitleCell.cellWith(tableView: tableView, indexPath: indexPath)
@@ -147,5 +176,10 @@ extension PublishEditController : UITableViewDelegate, UITableViewDataSource {
     func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
         return nil
     }
+}
+
+// MARK: - 逻辑处理
+extension PublishEditController {
+    
     
 }

+ 16 - 9
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditController/View/PublishEditAddPicCell.swift

@@ -10,7 +10,7 @@ import UIKit
 
 class PublishEditAddPicCell: UITableViewCell {
     
-    private let maxImageCount: Int = 3
+    private let maxImageCount: Int = 9
     
     typealias ChoosePicBlock = () -> Void
     var choosePicBlock : ChoosePicBlock?
@@ -19,9 +19,9 @@ class PublishEditAddPicCell: UITableViewCell {
     var delPicTransBlock : DelPicTransBlock?
     
     var imgCount: Int = 0
-    var goodsImageArr: Array<UIImage>? {
+    var pubImageArr: Array<UIImage>? {
         didSet {
-            imgCount = self.goodsImageArr?.count ?? 0
+            imgCount = self.pubImageArr?.count ?? 0
         }
     }
     
@@ -81,6 +81,12 @@ class PublishEditAddPicCell: UITableViewCell {
         return collectionViewLayout
     }()
     
+    //加载数据
+    func reloadData() {
+        //collectionView重新加载数据
+        self.collectionView.reloadData()
+    }
+    
 }
 
 extension PublishEditAddPicCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
@@ -100,20 +106,21 @@ extension PublishEditAddPicCell: UICollectionViewDelegateFlowLayout,UICollection
         if imgCount < maxImageCount && indexPath.row == imgCount {
             // 添加图片
             let cell = PublishEditDefaultCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-            if imgCount == 0 {
-                cell.noteStr = "添加图片"
-            } else {
-                cell.noteStr = "\(imgCount)/\(maxImageCount)"
-            }
+            cell.noteStr = "添加图片"
             return cell
         } else {
             // 展示图片
             let pCell = PublishEditAddImgCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
             if indexPath.row < imgCount {
-                pCell.showImage = self.goodsImageArr![indexPath.row]
+                pCell.showImage = self.pubImageArr![indexPath.row]
             }
             pCell.delPicBlock = {
                 [weak self] (idxRow) in
+                if self?.imgCount == 1 {
+                    SwiftProgressHUD.shared().showText("请保留至少1张图片")
+                    return
+                }
+                
                 if let delPicTransBlock = self?.delPicTransBlock {
                     delPicTransBlock(idxRow)
                 }

+ 0 - 75
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishEditVideo/PublishEditVideoController.swift

@@ -1,75 +0,0 @@
-//
-//  PublishEditVideoController.swift
-//  RainbowPlanet
-//
-//  Created by Christopher on 2019/6/21.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//  视频编辑
-
-import UIKit
-import AliyunVideoSDKPro
-
-class PublishEditVideoController: BaseViewController {
-    
-    
-    let editor: AliyunEditor? = nil
-    
-    let player: AliyunIPlayer? = nil
-    
-    
-    
-    // 视频的本地路径 - 录制进入编辑传这个值
-    let videoPath: String? = ""
-    
-    // 录制的时候是否带音乐
-    var hasRecordMusic: Bool = false
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-        
-//        editor = AliyunEditor(path: <#T##String!#>, preview: movieView)
-        
-//        self.editor = [[AliyunEditor alloc] initWithPath:_taskPath
-//            preview:self.movieView];
-//        self.editor.delegate = (id)self;
-//        // player
-//        self.player = [self.editor getPlayer];
-    }
-    
-    override func setupViews() {
-        navigationBar.title = "视频编辑"
-        view.backgroundColor = kf7f8faColor
-        
-        view.addSubview(movieView)
-        
-    }
-    
-    override func setupLayouts() {
-        movieView.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
-        }
-        
-    }
-    
-    override func setupData() {
-        
-    }
-    
-    // 播放视图
-    private lazy var movieView: UIView = {
-        let movieView = UIView()
-        movieView.backgroundColor = kffffffColor
-        return movieView
-        
-        
-//        CGFloat factor = _outputSize.height / _outputSize.width;
-//        self.movieView = [[UIView alloc]initWithFrame:CGRectMake(0, 44 + ScreenWidth / 8 + SafeTop, ScreenWidth, ScreenWidth * factor)];
-//        [self p_setMovieViewFrameToPlayStatus];
-//        self.movieView.backgroundColor =
-//            [[UIColor brownColor] colorWithAlphaComponent:.3];
-//        [self.view addSubview:self.movieView];
-    }()
-}
-

+ 14 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishMediaPicker/Controller/KSMediaPickerController.swift

@@ -31,6 +31,9 @@ open class KSMediaPickerController: UIViewController, UICollectionViewDelegate,
     typealias CropClosure = (_ vItemMdl: KSMediaPickerItemModel) -> Void
     var cropClosure: CropClosure?
     
+    typealias PubImgClosure = (_ selectedAssetArray: Array<UIImage>) -> Void
+    var pubImgClosure: PubImgClosure?
+    
     @objc public enum mediaType : Int {
         case all        = 0
         case picture    = 1
@@ -172,7 +175,17 @@ open class KSMediaPickerController: UIViewController, UICollectionViewDelegate,
             }
             
         } else {
-            print("----图片选择完成,传递_selectedAssetArray")
+            var imageArray: Array<UIImage> = []
+            for selItem in _selectedAssetArray {
+                let itemModel = selItem as! KSMediaPickerItemModel
+                let image: UIImage = itemModel.thumb ?? UIImage()
+                imageArray.append(image)
+            }
+            
+            if let pubImgClosure = self.pubImgClosure {
+                (view as! KSMediaPickerView).previewView.videoPause()
+                pubImgClosure(imageArray)
+            }
         }
     }
     

+ 17 - 0
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishViewController.swift

@@ -11,6 +11,13 @@ import JXSegmentedView
 
 class PublishViewController: BaseViewController {
     
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    
     // 视频选择页参数配置类
     var mediaConfig: AliyunMediaConfig {
         //默认配置
@@ -43,6 +50,10 @@ class PublishViewController: BaseViewController {
         setupViews()
         setupLayouts()
         setupData()
+                
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("DismissFromPublishEditVc"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
+            self?.dismiss(animated: true, completion: nil)
+        }
     }
     
     override func setupViews() {        
@@ -198,6 +209,12 @@ extension PublishViewController :JXSegmentedListContainerViewDataSource {
                 [weak self] (vItemModel) in
                 self?.getAvUrlAssetAndCrop(vItemModel)
             }
+            mediaVc.pubImgClosure = {
+                [weak self] (imageArray) in
+                let pubVc = PublishEditController()
+                pubVc.imageArr = imageArray
+                self?.navigationController?.pushViewController(pubVc, animated: true)
+            }
             return mediaVc
         case 1:
             let videoVc = AliyunMagicCameraViewController()

+ 32 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift

@@ -116,6 +116,38 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
         }
     }
     
+    // MARK: - 发布内容
+    /// 发布内容
+    ///
+    /// - Parameters:
+    ///   - type: 类型:image图片,video视频,html富文本
+    ///   - img: 主图
+    ///   - topic_ids: 话题id,json字符串
+    ///   - video: 视频url,当type为video时必填
+    ///   - title: 类型:标题
+    ///   - content: 内容
+    ///   - location: 位置
+    ///   - imgs: 图集,type为image是必填,json字符串
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityPublishApi(type:String = "", img:String = "", topic_ids:String = "", video:String = "", title:String = "", content:String = "", location:String = "", imgs:String = "", page:Int = 1, completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(type, forKey: "type")
+        parameters.updateValue(img, forKey: "img")
+        parameters.updateValue(topic_ids, forKey: "topic_ids")
+        parameters.updateValue(video, forKey: "video")
+        parameters.updateValue(title, forKey: "title")
+        parameters.updateValue(content, forKey: "content")
+        parameters.updateValue(location, forKey: "location")
+        parameters.updateValue(imgs, forKey: "imgs")
+        parameters.updateValue(page, forKey: "page")
+        SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityPublishModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityPublish(parameters: parameters))) { (CommunityPublishModel) in
+            SwiftProgressHUD.shared().hide()
+            completion(CommunityPublishModel)
+        }
+    }
+    
     // MARK: - 多关注页面feed流
     /// 多关注页面feed流
     ///

+ 14 - 3
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift

@@ -26,9 +26,13 @@ public let kCommunityPostMyApi = "/community/post/my"
 public let kCommunityTopicsApi = "/community/topic"
 
 // MARK: - 内容列表
-/// 内容列表
+/// 内容列表(Get)
 public let kCommunityPostsApi = "/community/post"
 
+// MARK: - 发布内容
+/// 发布内容(Post)
+public let kCommunityPublishApi = "/community/post"
+
 // MARK: - 关注页面feed流
 /// 关注页面feed流
 public let kCommunityFollowFeedApi = "/community/feed"
@@ -56,6 +60,7 @@ public let kCommunityMemberFollowTopicListApi = "/community/memberFollowTopic"
 /// - communityPostMy: 个人中心内容
 /// - communityTopics: 话题列表
 /// - communityPosts: 内容列表
+/// - communityPublish: 发布内容
 /// - communityFeed: 关注页面feed流
 /// - communityPostSuggest: 关注页面feed流
 /// - communityTopicDetail: 话题详情
@@ -67,6 +72,7 @@ public enum SwiftMoyaServiceCommunityApi {
     case communityPostMy(parameters:Dictionary<String, Any>)
     case communityTopics(parameters:Dictionary<String, Any>)
     case communityPosts(parameters:Dictionary<String, Any>)
+    case communityPublish(parameters:Dictionary<String, Any>)
     case communityFollowFeed(parameters:Dictionary<String, Any>)
     case communityPostSuggest(parameters:Dictionary<String, Any>)
     case communityTopicDetail(parameters:Dictionary<String, Any>)
@@ -83,6 +89,7 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityPostMy,
              .communityTopics,
              .communityPosts,
+             .communityPublish,
              .communityFollowFeed,
              .communityPostSuggest,
              .communityTopicDetail,
@@ -105,6 +112,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
             return kCommunityTopicsApi
         case .communityPosts:
             return kCommunityPostsApi
+        case .communityPublish:
+            return kCommunityPublishApi
         case .communityFollowFeed:
             return kCommunityFollowFeedApi
         case .communityPostSuggest:
@@ -120,7 +129,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
     
     public var method: Moya.Method {
         switch self {
-        case .communityMemberFollowTopic
+        case .communityMemberFollowTopic,
+             .communityPublish
             :
             return .post
         case .communityTopicCategory,
@@ -134,7 +144,6 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityMemberFollowTopicList
             :
             return .get
-            
         }
     }
     
@@ -146,6 +155,7 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityPostMy(var parameters),
              .communityTopics(var parameters),
              .communityPosts(var parameters),
+             .communityPublish(var parameters),
              .communityFollowFeed(var parameters),
              .communityPostSuggest(var parameters),
              .communityTopicDetail(var parameters),
@@ -178,6 +188,7 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityPostMy,
              .communityTopics,
              .communityPosts,
+             .communityPublish,
              .communityFollowFeed,
              .communityPostSuggest,
              .communityTopicDetail,

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_ico_add_pic.imageset/edit_ico_add_pic@3x.png