Ver código fonte

圈子功能全部完成

南鑫林 5 anos atrás
pai
commit
dba7115407
48 arquivos alterados com 911 adições e 170 exclusões
  1. 48 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 109 79
      RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunOSSManager/AliyunOSSManager.swift
  3. 2 2
      RainbowPlanet/RainbowPlanet/Manager/MJRefreshManager/MJRefreshManager.swift
  4. 80 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCirclePicturesModel.swift
  5. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleEssenceView/CircleEssenceView.swift
  6. 9 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleHeaderView/CircleHeaderView.swift
  7. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/CircleLeavingMessageView.swift
  8. 63 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumCollectionViewCell.swift
  9. 101 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumHeaderView.swift
  10. 34 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumSectionFooterCollectionReusableView.swift
  11. 101 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumSectionHeaderCollectionReusableView.swift
  12. 172 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/ViewController/CircleAlbumViewController.swift
  13. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/ViewController/CircleCommentListViewController.swift
  14. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/ViewController/CircleCommentReplyListViewController.swift
  15. 25 3
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CirclePublishMessage/ViewController/CirclePublishMessageViewController.swift
  16. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleUserList/ViewController/CircleUserListViewController.swift
  17. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommonModule/LocationModule/SelfRecommendation/ViewController/SelfRecommendationViewController.swift
  18. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Follow/CommunityFollowViewController.swift
  19. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Recommend/CommunityRecommnendViewController.swift
  20. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift
  21. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift
  22. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/ViewController/CommunityMyFollowTopicController.swift
  23. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift
  24. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunitySubComment/ViewController/CommunitySubCommentController.swift
  25. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityAllCommentView.swift
  26. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift
  27. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoSubCommentController/CommunityVideoSubCommentController.swift
  28. 2 2
      RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageList/ViewController/MessageListController.swift
  29. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/MessageMainViewController.swift
  30. 2 2
      RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetActivity/Controller/MessagePlanetActivityController.swift
  31. 2 2
      RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetNotification/Controller/MessagePlanetNotiController.swift
  32. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/ViewController/AddressManagerViewController.swift
  33. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ExpressAddressList/ViewController/ExpressAddressListViewController.swift
  34. 3 3
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift
  35. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherListView.swift
  36. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift
  37. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/SelfMentionContactsList/ViewController/SelfMentionContactsListViewController.swift
  38. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishAddTopic/Controller/PublishAddTopicController.swift
  39. 1 1
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/RedemptionArea/ViewController/RedemptionAreaViewController.swift
  40. 1 1
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchContentList/ViewController/SearchContentListViewController.swift
  41. 1 1
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchProduct/ViewController/SearchProductListViewController.swift
  42. 2 2
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/ViewController/SearchTopicListViewController.swift
  43. 2 2
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/ViewController/SearchUserListViewController.swift
  44. 56 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift
  45. 38 11
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift
  46. 1 1
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift
  47. 6 8
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaServiceConfigApi.swift
  48. 14 14
      RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift

+ 48 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -184,6 +184,12 @@
 		A747D833235C908F007F4E33 /* CustomTLPhotoPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D832235C908F007F4E33 /* CustomTLPhotoPickerViewController.swift */; };
 		A747D836235CA628007F4E33 /* CustomCell_Instagram.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D834235CA628007F4E33 /* CustomCell_Instagram.swift */; };
 		A747D837235CA628007F4E33 /* CustomCell_Instagram.xib in Resources */ = {isa = PBXBuildFile; fileRef = A747D835235CA628007F4E33 /* CustomCell_Instagram.xib */; };
+		A747D83D235D8046007F4E33 /* CircleAlbumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D83C235D8045007F4E33 /* CircleAlbumViewController.swift */; };
+		A747D840235D8116007F4E33 /* CircleAlbumHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D83F235D8116007F4E33 /* CircleAlbumHeaderView.swift */; };
+		A747D842235D84C8007F4E33 /* CircleAlbumCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D841235D84C8007F4E33 /* CircleAlbumCollectionViewCell.swift */; };
+		A747D844235D87D7007F4E33 /* CommunityCirclePicturesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D843235D87D7007F4E33 /* CommunityCirclePicturesModel.swift */; };
+		A747D846235D9DF6007F4E33 /* CircleAlbumSectionHeaderCollectionReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D845235D9DF6007F4E33 /* CircleAlbumSectionHeaderCollectionReusableView.swift */; };
+		A747D848235DA16F007F4E33 /* CircleAlbumSectionFooterCollectionReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A747D847235DA16F007F4E33 /* CircleAlbumSectionFooterCollectionReusableView.swift */; };
 		A74D9D572327B54100F05C14 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74D9D562327B54100F05C14 /* NotificationService.swift */; };
 		A74D9D5B2327B54100F05C14 /* NotificationService.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = A74D9D542327B54100F05C14 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		A74DF74922EAAF17007FB505 /* MJDIYFullScreenHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74DF74822EAAF17007FB505 /* MJDIYFullScreenHeader.swift */; };
@@ -913,6 +919,12 @@
 		A747D832235C908F007F4E33 /* CustomTLPhotoPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTLPhotoPickerViewController.swift; sourceTree = "<group>"; };
 		A747D834235CA628007F4E33 /* CustomCell_Instagram.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCell_Instagram.swift; sourceTree = "<group>"; };
 		A747D835235CA628007F4E33 /* CustomCell_Instagram.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomCell_Instagram.xib; sourceTree = "<group>"; };
+		A747D83C235D8045007F4E33 /* CircleAlbumViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleAlbumViewController.swift; sourceTree = "<group>"; };
+		A747D83F235D8116007F4E33 /* CircleAlbumHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleAlbumHeaderView.swift; sourceTree = "<group>"; };
+		A747D841235D84C8007F4E33 /* CircleAlbumCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleAlbumCollectionViewCell.swift; sourceTree = "<group>"; };
+		A747D843235D87D7007F4E33 /* CommunityCirclePicturesModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityCirclePicturesModel.swift; sourceTree = "<group>"; };
+		A747D845235D9DF6007F4E33 /* CircleAlbumSectionHeaderCollectionReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleAlbumSectionHeaderCollectionReusableView.swift; sourceTree = "<group>"; };
+		A747D847235DA16F007F4E33 /* CircleAlbumSectionFooterCollectionReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleAlbumSectionFooterCollectionReusableView.swift; sourceTree = "<group>"; };
 		A74D9D542327B54100F05C14 /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; };
 		A74D9D562327B54100F05C14 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
 		A74D9D582327B54100F05C14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -2564,6 +2576,34 @@
 			path = Custom;
 			sourceTree = "<group>";
 		};
+		A747D83A235D8025007F4E33 /* CircleAlbum */ = {
+			isa = PBXGroup;
+			children = (
+				A747D83E235D80C9007F4E33 /* View */,
+				A747D83B235D8031007F4E33 /* ViewController */,
+			);
+			path = CircleAlbum;
+			sourceTree = "<group>";
+		};
+		A747D83B235D8031007F4E33 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A747D83C235D8045007F4E33 /* CircleAlbumViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A747D83E235D80C9007F4E33 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A747D83F235D8116007F4E33 /* CircleAlbumHeaderView.swift */,
+				A747D841235D84C8007F4E33 /* CircleAlbumCollectionViewCell.swift */,
+				A747D845235D9DF6007F4E33 /* CircleAlbumSectionHeaderCollectionReusableView.swift */,
+				A747D847235DA16F007F4E33 /* CircleAlbumSectionFooterCollectionReusableView.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		A74D9D552327B54100F05C14 /* NotificationService */ = {
 			isa = PBXGroup;
 			children = (
@@ -3560,6 +3600,7 @@
 			isa = PBXGroup;
 			children = (
 				A784F2C323544B1B00E49140 /* Circle */,
+				A747D83A235D8025007F4E33 /* CircleAlbum */,
 				A747D8032359925F007F4E33 /* CirclePublishMessage */,
 				A77FAEF02358394D002A1D08 /* CircleCommentList */,
 				A77FAEFF2359592B002A1D08 /* CircleCommentReplyList */,
@@ -4354,6 +4395,7 @@
 		A7D5F25D22C0612A00F8E9AF /* CommunityModel */ = {
 			isa = PBXGroup;
 			children = (
+				A747D843235D87D7007F4E33 /* CommunityCirclePicturesModel.swift */,
 				A77FAEF123583BB0002A1D08 /* CommunityCircleCommentsModel.swift */,
 				A77FAF0823595F82002A1D08 /* CommunityCircleCommentReplysModel.swift */,
 				A7F689172358030C000C313F /* CommunityCircleCommentModel.swift */,
@@ -6018,6 +6060,7 @@
 				A7284A75225465DD000BAEC4 /* SwiftMoyaNetWorkServicePay.swift in Sources */,
 				A71CAB4722CB39EE00D908A8 /* CommunityFollowTopicViewModel.swift in Sources */,
 				A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */,
+				A747D848235DA16F007F4E33 /* CircleAlbumSectionFooterCollectionReusableView.swift in Sources */,
 				A7274C5E228EE636000E3A07 /* LBXPermissions.swift in Sources */,
 				A7D46092227619CD00A5A54E /* BaiduToCityFactory.swift in Sources */,
 				A72E685922F2DB110063D967 /* RegisterLoginManager.swift in Sources */,
@@ -6026,6 +6069,7 @@
 				BDE376D722C22A260055E2EA /* MBProgressHUD+AlivcHelper.m in Sources */,
 				A74322A422B8E7F60017C367 /* MyFollowAndFanHeaderView.swift in Sources */,
 				A73911AD229CD62F0033177E /* AlamofireReachabilityManager.swift in Sources */,
+				A747D842235D84C8007F4E33 /* CircleAlbumCollectionViewCell.swift in Sources */,
 				A7F3069422E16A5B00DC7917 /* MineRouterModuleType.swift in Sources */,
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
 				A7D77DF922DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift in Sources */,
@@ -6067,6 +6111,7 @@
 				A7BB68672269B1DD00AB07A2 /* AddressPOIViewController.swift in Sources */,
 				A7284A7322546460000BAEC4 /* SwiftMoyaServicePayApi.swift in Sources */,
 				BDE3045D22851E4F001D050F /* ProductCartListModel.swift in Sources */,
+				A747D844235D87D7007F4E33 /* CommunityCirclePicturesModel.swift in Sources */,
 				A7F688E523556077000C313F /* CircleHeaderView.swift in Sources */,
 				A73A56D322DC59A3004920FE /* PushModel.swift in Sources */,
 				BD5CA89222DD73A500364A67 /* PublishMusicVolumnView.swift in Sources */,
@@ -6239,6 +6284,7 @@
 				BD6122B922C3639E00D3F513 /* AlivcEditBottomHeaderView.m in Sources */,
 				BDD22F0B228FAA5B00D43BFB /* ImageUrlModel.swift in Sources */,
 				A76068E022E43DAC008DF18F /* CardContentUserDeleteView.swift in Sources */,
+				A747D83D235D8046007F4E33 /* CircleAlbumViewController.swift in Sources */,
 				BD6122BB22C3639E00D3F513 /* AlivcEditIconButton.m in Sources */,
 				A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */,
 				BD0FAA5C22C4C32E00DDFB37 /* AliyunCropViewController.m in Sources */,
@@ -6304,8 +6350,10 @@
 				A7CC751A22716254003C4F38 /* SetTableViewCell.swift in Sources */,
 				A7E19FAC22BA2D01009BCCE1 /* SearchTopicListViewController.swift in Sources */,
 				A71AA52822732173008FF1A5 /* SwiftMoyaNetWorkServiceConfig.swift in Sources */,
+				A747D846235D9DF6007F4E33 /* CircleAlbumSectionHeaderCollectionReusableView.swift in Sources */,
 				A76893AA233B38AA00819EC3 /* MessageRouterModuleType.swift in Sources */,
 				A70B2C102286A3BC00B2449F /* ProductDetailModel.swift in Sources */,
+				A747D840235D8116007F4E33 /* CircleAlbumHeaderView.swift in Sources */,
 				A7A17E5F22A0CEF200B7A77E /* SwiftMoyaNetWorkManagerTools.swift in Sources */,
 				A72A72A922321DE000B21995 /* NumberKeyboard.swift in Sources */,
 				A77BB4652329EF5A00DCAE32 /* NXLPermissionCamera.swift in Sources */,

+ 109 - 79
RainbowPlanet/RainbowPlanet/Manager/AliyunManager/AliyunOSSManager/AliyunOSSManager.swift

@@ -13,9 +13,12 @@ let kAliyunOSSAccessKeyId: String = "LTAIG2eCY5UdheM1"
 let kAliyunOSSAccessKeySecret: String = "4RJTcJkZsOJIby2oewUFHqUJxUR1vm"
 let kAliyunOSSBucketPublic: String = "uptoyo"
 let kAliyunOSSBucketPrivate: String = "uptoyo"
-let kAliyunOSSEndpoint: String = "http://oss-cn-zhangjiakou.aliyuncs.com"
+let kAliyunOSSEndpoint: String = "https://oss-cn-zhangjiakou.aliyuncs.com"
+let kAliyunOSSImageEndpoint: String = "http://oss.uptoyo.com"
 let kAliyunOSSSecurityToken: String = "SecurityToken"
 
+
+
 typealias AliyunOSSManagerProgressBlock = (Float) -> Void
 typealias AliyunOSSManagerResultBlockUrl = (Bool, String?) -> Void
 typealias AliyunOSSManagerResultBlockUrls = (Bool, Array<String>?) -> Void
@@ -33,23 +36,27 @@ class AliyunOSSManager: NSObject {
     var configOSSStsModel : ConfigOSSStsModel?
     
     /// 初始化AliyunOSS
-     func initAliyunOSSManager() {
+    func initAliyunOSSManager(completion: @escaping successCallBack) {
         
         SwiftMoyaNetWorkServiceConfig.shared().configOSSStsApi(completion: {
             [weak self] (configOSSStsModel) -> (Void) in
             self?.configOSSStsModel = configOSSStsModel as? ConfigOSSStsModel
             // 1. credential
-            let credential = OSSStsTokenCredentialProvider(accessKeyId: self?.configOSSStsModel?.accessKeyId ?? kAliyunOSSAccessKeyId, secretKeyId: self?.configOSSStsModel?.accessKeySecret ?? kAliyunOSSAccessKeySecret, securityToken: self?.configOSSStsModel?.stsToken ?? kAliyunOSSSecurityToken)
+            let credential = OSSStsTokenCredentialProvider(accessKeyId: self?.configOSSStsModel?.accessKeyId ?? "", secretKeyId: self?.configOSSStsModel?.accessKeySecret ?? "", securityToken: self?.configOSSStsModel?.stsToken ?? "")
+            
+
             // 2. OSSClient配置参数
             let configuration = OSSClientConfiguration()
             configuration.maxRetryCount = 3
             configuration.timeoutIntervalForRequest = 20
-            configuration.isHttpdnsEnable = false
-            configuration.crc64Verifiable = true
+//            configuration.isHttpdnsEnable = false
+//            configuration.crc64Verifiable = false
             // 3. 初始OSS化客户端
-            self?.client = OSSClient(endpoint: self?.configOSSStsModel?.region ?? kAliyunOSSEndpoint, credentialProvider: credential, clientConfiguration: configuration)
+            self?.client = OSSClient(endpoint: kAliyunOSSEndpoint, credentialProvider: credential, clientConfiguration: configuration)
+            completion(nil)
             
         }) { (loadingStatus) in
+            SwiftProgressHUD.shared().showText("获取token失败")
             return
         }
         
@@ -66,8 +73,9 @@ class AliyunOSSManager: NSObject {
                 progressBlock:@escaping AliyunOSSManagerProgressBlock)-> OSSPutObjectRequest {
         
         // 0.初始化客户端
-        initAliyunOSSManager()
-        
+        initAliyunOSSManager { (_) -> (Void) in
+            
+        }
         // 1.上传请求
         let put = OSSPutObjectRequest()
         
@@ -75,7 +83,7 @@ class AliyunOSSManager: NSObject {
         put.bucketName = configOSSStsModel?.bucket ?? ""
         
         // 1.2.文件名路径
-        put.objectKey = PathManager.randomString() ?? ""
+        put.objectKey = AliyunOSSManager.objectKey()
         
         // 1.3.上传对象(图片data)
         put.uploadingData = Data.imageCompressForSize(sourceImage: image, targetPx: 750.0) ?? image.pngData()!
@@ -116,10 +124,7 @@ class AliyunOSSManager: NSObject {
                 NXLLog("上传成功")
                 DispatchQueue.main.async {
                     // 上传成功后的图片UrlStr
-                    let urlSting = ""
-//                    http:\/\/vod.uptoyo.com\/image\/default\/7D840D1A922B4721B57C64868F6A4156-6-2.jpg
-//                    NSString *str=[[ENDPOINTIMAGE componentsSeparatedByString:@"//"] lastObject];
-//                            NSString *urlString=[NSString stringWithFormat:@"https://%@.%@/%@",PUBLIC_BUCKET,str,put.objectKey];
+                    let urlSting = kAliyunOSSImageEndpoint + "/" + put.objectKey
                     resultBlockUrl(true,urlSting)
                 }
             }
@@ -149,10 +154,8 @@ class AliyunOSSManager: NSObject {
                 NXLLog("上传成功")
                 DispatchQueue.main.async {
                     // 上传成功后的图片UrlStr
-                    let urlSting = ""
-                    //                    http:\/\/vod.uptoyo.com\/image\/default\/7D840D1A922B4721B57C64868F6A4156-6-2.jpg
-                    //                    NSString *str=[[ENDPOINTIMAGE componentsSeparatedByString:@"//"] lastObject];
-                    //                            NSString *urlString=[NSString stringWithFormat:@"https://%@.%@/%@",PUBLIC_BUCKET,str,put.objectKey];
+                    // 上传成功后的图片UrlStr
+                    let urlSting = kAliyunOSSImageEndpoint + "/" + put.objectKey
                     resultBlockUrl(true,urlSting)
                 }
             }else {
@@ -178,74 +181,101 @@ class AliyunOSSManager: NSObject {
                       resultBlockUrls:@escaping AliyunOSSManagerResultBlockUrls,
                       isAsync:Bool)  {
         // 0.初始化客户端
-        initAliyunOSSManager()
-        // 1.线程队列
-        let queue = OperationQueue()
-        // 1.1最大线程数
-        queue.maxConcurrentOperationCount = images.count
-        var imageUrls = Array<String>()
-        
-        for image in images {
-            //创建operation
-            let operation = BlockOperation { [weak self] () -> Void in
-                // 1.上传请求
-                let put = OSSPutObjectRequest()
-                
-                // 1.1.设置bucketName (文件夹名,与OSS对应)
-                put.bucketName = self?.configOSSStsModel?.bucket ?? ""
-                
-                // 1.2.文件名路径
-                put.objectKey = PathManager.randomString() ?? ""
-                
-                // 图片url
-//                NSString *encodingString = [[NSString stringWithFormat:@"http://kachamao.oss-cn-shanghai.aliyuncs.com/%@",objectName]stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-//                [callBackNames addObject: encodingString];
-                imageUrls.append("图片url")
-                
-                // 1.3.上传对象(图片data)
-                put.uploadingData = Data.imageCompressForSize(sourceImage: image, targetPx: 1280.0) ?? image.pngData()!
-                
-                // 1.4.上传进度
-//                put.uploadProgress = { (bytesSent , totalByteSent , totalBytesExpectedToSend) in
-//                    let progress = totalByteSent/totalBytesExpectedToSend
-//                    progressBlock(Float(progress))
-//                }
-                
-                 // 1.5.上传
-                let putTast = self?.client?.putObject(put)
-                
-                putTast?.continue({ (task) -> Any? in
-                    if (task.error != nil) {
-                        NXLLog("上传失败:\(String(describing: task.error))")
-                    }else {
-                        let result = task.result as? OSSPutObjectResult
-                        NXLLog("上传成功")
-                        NXLLog("Result - requestId: \(result?.requestId ?? ""),headerFields:\(String(describing: result?.httpResponseHeaderFields))")
-                        
-                    }
-                    return nil
-                }) // // 阻塞直到上传完成
-                
-                // 异步
-                if isAsync {
-                    if image == images.last {
-                         NXLLog("上传完成")
-                        resultBlockUrls(true,imageUrls)
+        initAliyunOSSManager { (_) -> (Void) in
+            // 1.线程队列
+            let queue = OperationQueue()
+            // 1.1最大线程数
+            queue.maxConcurrentOperationCount = images.count
+            var imageUrls = Array<String>()
+            
+            for image in images {
+                //创建operation
+                let operation = BlockOperation { [weak self] () -> Void in
+                    // 1.上传请求
+                    let put = OSSPutObjectRequest()
+                    
+                    // 1.1.设置bucketName (文件夹名,与OSS对应)
+                    put.bucketName = self?.configOSSStsModel?.bucket ?? ""
+                    
+                    // 1.2.文件名路径
+                    put.objectKey = AliyunOSSManager.objectKey()
+                    
+                    // 1.3.上传对象(图片data)
+                    put.uploadingData = Data.imageCompressForSize(sourceImage: image, targetPx: 1280.0) ?? image.pngData()!
+                    
+                    // 图片url
+                    // 上传成功后的图片UrlStr
+                    let urlSting = kAliyunOSSImageEndpoint + "/" + put.objectKey
+                    imageUrls.append(urlSting)
+                    
+                    // 1.4.上传进度
+                    //                put.uploadProgress = { (bytesSent , totalByteSent , totalBytesExpectedToSend) in
+                    //                    let progress = totalByteSent/totalBytesExpectedToSend
+                    //                    progressBlock(Float(progress))
+                    //                }
+                    
+                    // 1.5.上传
+                    let putTast = self?.client?.putObject(put)
+                    
+                    putTast?.continue({ (task) -> Any? in
+                        if (task.error != nil) {
+                            NXLLog("上传失败:\(String(describing: task.error))")
+                            
+                        }else {
+                            let result = task.result as? OSSPutObjectResult
+                            NXLLog("上传成功")
+                            NXLLog("Result - requestId: \(result?.requestId ?? ""),headerFields:\(String(describing: result?.httpResponseHeaderFields))")
+                            
+                        }
+                        return nil
+                    }).waitUntilFinished()
+                    
+                    // 异步
+                    if isAsync {
+                        if image == images.last {
+                            NXLLog("上传完成")
+                            resultBlockUrls(true,imageUrls)
+                        }
                     }
+                    
+                }
+                if queue.operations.count != 0 {
+                    operation.addDependency(queue.operations.last!)
                 }
                 
-            }
-            if queue.operations.count != 0 {
-                operation.addDependency(queue.operations.last!)
+                queue.addOperation(operation)
             }
             
-            queue.addOperation(operation)
+            //同步
+            if !isAsync {
+                queue.waitUntilAllOperationsAreFinished()
+                resultBlockUrls(true,imageUrls)
+            }
         }
         
-        //同步
-        if !isAsync {
-            queue.waitUntilAllOperationsAreFinished()
-            resultBlockUrls(true,imageUrls)
-        }
+    }
+}
+
+extension AliyunOSSManager {
+    
+    
+    /// 图片路径
+    static func objectKey() -> String {
+        
+        /// 时间文件夹
+        let dateStr = Date.dateToString(Date(), dateFormat: "yyyyMM")
+        
+        /// 时间戳
+        let dateTimeStamp = Date().timeStamp()
+        
+        /// 随机字符串
+        let randomString = PathManager.randomString()!
+        
+        /// 图片名
+        let imgName = "\(Int(dateTimeStamp))" + "_" + randomString + ".png"
+        
+        /// 路径
+        let objectKey = dateStr + "/" + imgName
+        return objectKey
     }
 }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Manager/MJRefreshManager/MJRefreshManager.swift

@@ -58,12 +58,12 @@ class MJRefreshManager: NSObject {
         }
     }
     
-    class func mjRefreshManagerPaginationNoHiddenFooter(tableView : UITableView?,pagination : PaginationModel?) {
+    class func mjRefreshManagerNoHiddenFooter(tableView : UITableView?,pagination : PaginationModel?) {
         mjRefreshManagerIsHiddenFooter(isHidden: false, tableView: tableView, pagination: pagination)
 
     }
     
-    class func mjRefreshManagerPaginationHiddenFooter(tableView : UITableView?,pagination : PaginationModel?) {
+    class func mjRefreshManagerHiddenFooter(tableView : UITableView?,pagination : PaginationModel?) {
         mjRefreshManagerIsHiddenFooter(isHidden: true, tableView: tableView, pagination: pagination)
     }
     

+ 80 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCirclePicturesModel.swift

@@ -0,0 +1,80 @@
+//
+//	CommunityCirclePicturesModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CommunityCirclePicturesModel : NSObject, Mappable{
+
+	var data : [CommunityCirclePictureModel]?
+	var pagination : PaginationModel?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CommunityCirclePicturesModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		data <- map["data"]
+		pagination <- map["pagination"]
+		
+    }
+}
+
+class CommunityCirclePictureModel : NSObject, Mappable{
+    
+    var createdAt : String?
+    var id : String?
+    var imgs : [String]?
+    var user : CommunityCirclePictureUserModel?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityCirclePictureModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        createdAt <- map["created_at"]
+        id <- map["id"]
+        imgs <- map["imgs"]
+        user <- map["user"]
+        
+    }
+    
+}
+
+class CommunityCirclePictureUserModel : NSObject, Mappable{
+    
+    var avatar : String?
+    var gender : Int?
+    var inviteCode : String?
+    var uid : Int?
+    var username : String?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityCirclePictureUserModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        avatar <- map["avatar"]
+        gender <- map["gender"]
+        inviteCode <- map["invite_code"]
+        uid <- map["uid"]
+        username <- map["username"]
+        
+    }
+}
+
+

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleEssenceView/CircleEssenceView.swift

@@ -38,7 +38,7 @@ class CircleEssenceView: BaseView {
     
     override func setupData() {
         
-        tableView.addHeader(withBeginRefresh: true, animation: false) {
+        tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.communityCircleArticlesApi(page: page)
         }
@@ -147,7 +147,7 @@ class CircleEssenceView: BaseView {
             }
             self?.communityRecommendDataModels = (self?.communityRecommendDataModels)! + (communityRecommendFeedModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
         }) {
             [weak self] loadingStatus in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 9 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleHeaderView/CircleHeaderView.swift

@@ -231,6 +231,7 @@ class CircleHeaderView: BaseView {
         albumNameLabel.text = "相册"
         albumNameLabel.textColor = .black
         albumNameLabel.font = kRegularFont14
+        albumNameLabel.addTapGesture(1, target: self, action: #selector(circleAlbumAction))
         return albumNameLabel
     }()
     
@@ -239,6 +240,7 @@ class CircleHeaderView: BaseView {
         albumNumberLabel.text = "0"
         albumNumberLabel.textColor = .black
         albumNumberLabel.font = kMediumFont16
+        albumNumberLabel.addTapGesture(1, target: self, action: #selector(circleAlbumAction))
         return albumNumberLabel
     }()
     
@@ -336,6 +338,13 @@ class CircleHeaderView: BaseView {
         UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
     }
     
+    /// 相册
+    @objc func circleAlbumAction() {
+        let vc = CircleAlbumViewController()
+        vc.circleId = self.communityCircleModel?.id ?? 0
+        UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
+    }
+    
     func scrollViewDidScroll(contentOffsetY: CGFloat) {
         if contentOffsetY < 0 {
             var frame = imageViewFrame

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/CircleLeavingMessageView.swift

@@ -35,7 +35,7 @@ class CircleLeavingMessageView: BaseView {
     
     override func setupData() {
         
-        tableView.addHeader(withBeginRefresh: true, animation: false) {
+        tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.communityCircleMessagesGetApi(page: page)
         }
@@ -68,7 +68,7 @@ class CircleLeavingMessageView: BaseView {
             }
             self?.communityCircleMessageModels = (self?.communityCircleMessageModels)! + (communityCircleMessagesModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityCircleMessagesModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityCircleMessagesModel?.pagination)
         }) {
             [weak self] loadingStatus in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 63 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumCollectionViewCell.swift

@@ -0,0 +1,63 @@
+//
+//  CircleAlbumCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+
+class CircleAlbumCollectionViewCell: UICollectionViewCell {
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> CircleAlbumCollectionViewCell {
+        let ID = "CircleAlbumCollectionViewCell"
+        collectionView.register(CircleAlbumCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : CircleAlbumCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! CircleAlbumCollectionViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(imageView)
+    }
+    
+    private func setupLayouts() {
+        imageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView()
+        imageView.image = kImage(name: "default_pic")
+        imageView.cornerRadius = 2
+        imageView.masksToBounds = true
+        imageView.contentMode = .scaleAspectFill
+        return imageView
+    }()
+    
+    var img : String? {
+        didSet {
+            imageView.kf.setImage(with: kURLImage(name: img ?? ""), placeholder: kImage(name: "default_pic"))
+        }
+    }
+}

+ 101 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumHeaderView.swift

@@ -0,0 +1,101 @@
+//
+//  CircleAlbumHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyJSON
+
+class CircleAlbumHeaderView: BaseView {
+    
+    
+    var circleId : Int?
+    var imgUrlsStr : String = ""
+    var maxImageCount: Int = 9
+    var selectedAssets = Array<TLPHAsset>()
+    
+    override func setupViews() {
+        backgroundColor = kf7f8faColor
+        addSubview(bgView)
+        bgView.addSubview(uploadButton)
+    }
+    
+    override func setupLayouts() {
+        bgView.snp.makeConstraints { (make) in
+            make.bottom.left.right.equalToSuperview()
+            make.top.equalTo(10)
+        }
+        uploadButton.snp.makeConstraints { (make) in
+            make.bottom.equalToSuperview().offset(-10)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(44)
+        }
+    }
+    
+    override func setupData() {
+        
+        uploadButton.rx.tap.subscribe(onNext: { [weak self] (_) in
+            let vc = CustomTLPhotoPickerViewController()
+            vc.mediaType = .image
+            vc.numberOfColumn = 4
+            vc.maxSelectedAssets = self?.maxImageCount
+            vc.finishClosure = {
+                [weak self] selectedAssets in
+                self?.selectedAssets = selectedAssets
+                self?.uploadPhotos()
+            }
+            UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
+        }).disposed(by: disposeBag)
+    }
+    
+    /// 上传图片
+    func uploadPhotos() {
+        var images = Array<UIImage>()
+        for phAsset in selectedAssets {
+            images.append(phAsset.fullResolutionImage!)
+        }
+        
+        AliyunOSSManager.shared.uploadPhotos(images: images, progressBlock: { (progress) in
+            
+        }, resultBlockUrls: { [weak self] (success, urls) in
+            NXLLog(JSON(urls ?? []).description)
+            self?.imgUrlsStr = JSON(urls ?? []).description
+            self?.communityCirclePicturePostApi()
+        }, isAsync: true)
+    }
+    
+    /// 上传到后端
+    
+    typealias UploadSuccessClosure = () -> Void
+    var uploadSuccessClosure : UploadSuccessClosure?
+    func communityCirclePicturePostApi() {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCirclePicturePostApi(circleId: circleId ?? 0, imgs: self.imgUrlsStr) { [weak self] (_) -> (Void) in
+            if let uploadSuccessClosure = self?.uploadSuccessClosure {
+                uploadSuccessClosure()
+            }
+        }
+    }
+    
+    lazy var bgView: UIView = {
+        let bgView = UIView()
+        bgView.backgroundColor = UIColor.white
+        return bgView
+    }()
+    
+    lazy var uploadButton: UIButton = {
+        let uploadButton = UIButton()
+        uploadButton.setTitle("上传照片", for: UIControl.State.normal)
+        uploadButton.titleLabel?.font = kRegularFont16
+        uploadButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
+        uploadButton.layer.cornerRadius = 22
+        uploadButton.layer.borderColor = kThemeColor.cgColor
+        uploadButton.layer.borderWidth = 1.0
+        uploadButton.layer.masksToBounds = true
+        return uploadButton
+    }()
+
+}

+ 34 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumSectionFooterCollectionReusableView.swift

@@ -0,0 +1,34 @@
+//
+//  CircleAlbumSectionFooterCollectionReusableView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CircleAlbumSectionFooterCollectionReusableView: UICollectionReusableView {
+    class func footerWith(collectionView:UICollectionView,kind: String,indexPath: IndexPath) -> CircleAlbumSectionFooterCollectionReusableView {
+        let ID = "CircleAlbumSectionFooterCollectionReusableView"
+        collectionView.register(CircleAlbumSectionFooterCollectionReusableView.self, forSupplementaryViewOfKind: kind, withReuseIdentifier: ID)
+        let headerView : CircleAlbumSectionFooterCollectionReusableView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: ID, for: indexPath) as! CircleAlbumSectionFooterCollectionReusableView
+        headerView.indexPath = indexPath
+        return headerView
+    }
+    
+    var indexPath : IndexPath? {
+        didSet {
+            
+        }
+    }
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = kf7f8faColor
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+}
+

+ 101 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/View/CircleAlbumSectionHeaderCollectionReusableView.swift

@@ -0,0 +1,101 @@
+//
+//  CircleAlbumSectionHeaderCollectionReusableView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleAlbumSectionHeaderCollectionReusableView: UICollectionReusableView {
+    class func headerWith(collectionView:UICollectionView,kind: String,indexPath: IndexPath) -> CircleAlbumSectionHeaderCollectionReusableView {
+        let ID = "CircleAlbumSectionHeaderCollectionReusableView"
+        collectionView.register(CircleAlbumSectionHeaderCollectionReusableView.self, forSupplementaryViewOfKind: kind, withReuseIdentifier: ID)
+        let headerView : CircleAlbumSectionHeaderCollectionReusableView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: ID, for: indexPath) as! CircleAlbumSectionHeaderCollectionReusableView
+        headerView.indexPath = indexPath
+        return headerView
+    }
+    
+    var indexPath : IndexPath? {
+        didSet {
+            
+        }
+    }
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = kffffffColor
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MARK: - 设置View
+    private func setupViews() {
+        addSubview(avatarImageView)
+        addSubview(titleLabel)
+        addSubview(timeLabel)
+    }
+    
+    private func setupLayouts() {
+        avatarImageView.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.top.equalTo(15)
+            make.size.equalTo(40)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(15)
+            make.left.equalTo(avatarImageView.snp.right).offset(7)
+            make.right.equalTo(-14)
+            make.height.equalTo(20)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(titleLabel)
+            make.top.equalTo(titleLabel.snp.bottom).offset(2)
+            make.height.equalTo(16.5)
+        }
+    }
+    
+    lazy var avatarImageView: UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.cornerRadius = 20
+        avatarImageView.masksToBounds = true
+        avatarImageView.contentMode = .scaleAspectFill
+        return avatarImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        titleLabel.addTapGesture(1, target: self, action: #selector(avatarAction))
+        return titleLabel
+    }()
+    
+    private lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = k999999Color
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    var communityCirclePictureModel : CommunityCirclePictureModel? {
+        didSet {
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCirclePictureModel?.user?.avatar ?? ""), placeholder: kImage(name: "default_avatar"))
+            titleLabel.text = communityCirclePictureModel?.user?.username
+            timeLabel.text = communityCirclePictureModel?.createdAt
+        }
+    }
+    
+    @objc func avatarAction() {
+        if communityCirclePictureModel?.user?.uid != UserModel.shared().getModel()?.uid {
+            Mediator.push(MineRouterModuleType.pushOtherPersonalCenter(uid: communityCirclePictureModel?.user?.uid ?? 0))
+        }
+    }
+    
+
+}

+ 172 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleAlbum/ViewController/CircleAlbumViewController.swift

@@ -0,0 +1,172 @@
+//
+//  CircleAlbumViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/21.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+import Kingfisher
+
+class CircleAlbumViewController: BaseViewController {
+
+    deinit {
+        NXLLog("deinit")
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
+    var circleId : Int?
+    var communityCirclePictureModels = Array<CommunityCirclePictureModel>()
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupLayouts()
+        setupViews()
+        setupData()
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "相册"
+        navigationBar.wr_setBottomLineHidden(hidden: true)
+        view.addSubview(circleAlbumHeaderView)
+        view.addSubview(collectionView)
+    }
+    
+    override func setupLayouts() {
+        
+    }
+    
+    override func setupData() {
+        collectionView.addHeader(withBeginRefresh: true, animation: true) {
+            [weak self] (page) in
+            self?.communityCirclePicturesApi(page: page)
+        }
+        collectionView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
+            [weak self] (page) in
+            self?.communityCirclePicturesApi(page: page)
+        })
+        circleAlbumHeaderView.uploadSuccessClosure = {
+            [weak self] in
+            self?.collectionView.mj_header.beginRefreshing()
+        }
+    }
+
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect(x: 0, y: kNavBarTotalHeight+74, width: kScreenWidth, height: kScreenHeight-kNavBarTotalHeight - 74), collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kffffffColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        return collectionViewLayout
+    }()
+    
+    lazy var circleAlbumHeaderView: CircleAlbumHeaderView = {
+        let circleAlbumHeaderView = CircleAlbumHeaderView(frame: CGRect(x: 0, y: kNavBarTotalHeight, width: kScreenWidth, height: 74))
+        circleAlbumHeaderView.circleId = circleId
+        view.backgroundColor = kf7f8faColor
+        return circleAlbumHeaderView
+    }()
+    
+    /// 相册类别
+    ///
+    /// - Parameter page: 分页
+    func communityCirclePicturesApi(page: Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCirclePicturesApi(circleId: circleId ?? 0, page: page, completion: {
+            [weak self] (communityCirclePicturesModel) -> (Void) in
+            let communityCirclePicturesModel = communityCirclePicturesModel as? CommunityCirclePicturesModel
+            
+            if communityCirclePicturesModel?.pagination?.currentPage == 1{
+                self?.communityCirclePictureModels.removeAll()
+                self?.collectionView.resetNoMoreData()
+            }
+            self?.communityCirclePictureModels = (self?.communityCirclePictureModels)! + (communityCirclePicturesModel?.data!)!
+            self?.collectionView.reloadData()
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(collectionView: self?.collectionView, pagination: communityCirclePicturesModel?.pagination)
+        }) {
+            [weak self] loadingStatus in
+            MJRefreshManager.mjRefreshManagerLoadingStatus(collectionView: self?.collectionView,loadingStatus: loadingStatus)
+        }
+    }
+
+}
+
+extension CircleAlbumViewController : UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return communityCirclePictureModels.count
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+         return communityCirclePictureModels[section].imgs?.count ?? 0
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = CircleAlbumCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        cell.img = communityCirclePictureModels[indexPath.section].imgs?[indexPath.row]
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        
+        Mediator.push(BrowsePictureRouterModuleType.pushBrowsePictureImageStrs(imageStrs: (communityCirclePictureModels[indexPath.section].imgs)!, index: indexPath.row))
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-28-5)/3.0, height:(kScreenWidth-28-5)/3.0)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 14, bottom: 15, right: 14)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
+        return 2.5
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
+        return 2.5
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
+        if kind == UICollectionView.elementKindSectionHeader {
+            let headerView = CircleAlbumSectionHeaderCollectionReusableView.headerWith(collectionView: collectionView, kind: UICollectionView.elementKindSectionHeader, indexPath: indexPath)
+            headerView.communityCirclePictureModel = communityCirclePictureModels[indexPath.section]
+            return headerView
+        }else {
+            
+            if (communityCirclePictureModels.count - 1) != indexPath.section {
+                let footerView = CircleAlbumSectionFooterCollectionReusableView.footerWith(collectionView: collectionView, kind: UICollectionView.elementKindSectionHeader, indexPath: indexPath)
+                return footerView
+            }else {
+                return UICollectionReusableView()
+            }
+        }
+    }
+    
+    // 返回HeadView的宽高
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
+        return CGSize(width:kScreenWidth, height: 65)
+    }
+    // 返回footerView的宽高
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
+        if (communityCirclePictureModels.count - 1) != section {
+            return CGSize(width:kScreenWidth, height: 10)
+        }else {
+             return CGSize(width:0, height: 0)
+        }
+       
+    }
+}

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/ViewController/CircleCommentListViewController.swift

@@ -52,7 +52,7 @@ class CircleCommentListViewController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityCircleCommentsApi(page: page)
         }
@@ -124,7 +124,7 @@ class CircleCommentListViewController: BaseViewController {
             }
             self?.communityCircleCommentListModels = (self?.communityCircleCommentListModels)! + ((self?.communityCircleCommentsModel?.data!)!)
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentsModel?.pagination)
         }) { [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/ViewController/CircleCommentReplyListViewController.swift

@@ -76,7 +76,7 @@ class CircleCommentReplyListViewController: BaseViewController {
     }()
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) { [weak self] (page) in
+        tableView.addHeader(withBeginRefresh: true,  animation: true) { [weak self] (page) in
             self?.communityCircleReplysApi(page: page)
         }
         tableView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
@@ -119,7 +119,7 @@ class CircleCommentReplyListViewController: BaseViewController {
             }
             self?.communityCircleCommentReplyListModels = (self?.communityCircleCommentReplyListModels)! + ((self?.communityCircleCommentReplysModel?.data!)!)
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentReplysModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentReplysModel?.pagination)
         }) { [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
         }

+ 25 - 3
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CirclePublishMessage/ViewController/CirclePublishMessageViewController.swift

@@ -8,6 +8,7 @@
 
 import UIKit
 import Kingfisher
+import SwiftyJSON
 
 class CirclePublishMessageViewController: BaseViewController {
 
@@ -22,7 +23,7 @@ class CirclePublishMessageViewController: BaseViewController {
     
     var circleId : Int?
     var content : String = ""
-    var imgs : String = ""
+    var imgUrlsStr : String = ""
     var maxImageCount: Int = 3
     var selectedAssets = Array<TLPHAsset>()
     
@@ -52,7 +53,11 @@ class CirclePublishMessageViewController: BaseViewController {
     
     override func setupData() {
         publishButton.rx.tap.subscribe(onNext: {[weak self] (_) in
-            self?.communityCircleMessagePostApi()
+            if self?.selectedAssets.count == 0 {
+                self?.communityCircleMessagePostApi()
+            }else {
+                self?.uploadPhotos()
+            }
         }).disposed(by: disposeBag)
     }
     
@@ -89,8 +94,25 @@ class CirclePublishMessageViewController: BaseViewController {
     
     
     /// 发布
+    func uploadPhotos() {
+        var images = Array<UIImage>()
+        for phAsset in selectedAssets {
+            images.append(phAsset.fullResolutionImage!)
+        }
+        
+        AliyunOSSManager.shared.uploadPhotos(images: images, progressBlock: { (progress) in
+            
+        }, resultBlockUrls: { [weak self] (success, urls) in
+            NXLLog(JSON(urls ?? []).description)
+            self?.imgUrlsStr = JSON(urls ?? []).description
+            self?.communityCircleMessagePostApi()
+        }, isAsync: true)
+        
+       
+    }
+    
     func communityCircleMessagePostApi() {
-        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleMessagePostApi(circleId: circleId ?? 0, content: content ,imgs: imgs) { [weak self] _ in
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleMessagePostApi(circleId: circleId ?? 0, content: content ,imgs: imgUrlsStr) { [weak self] _ in
             self?.navigationController?.popViewController(animated: true)
         }
     }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleUserList/ViewController/CircleUserListViewController.swift

@@ -45,7 +45,7 @@ class CircleUserListViewController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityCircleMembersApi(page: page)
         }
@@ -78,7 +78,7 @@ class CircleUserListViewController: BaseViewController {
             }
             self?.communityCircleUserModels = (self?.communityCircleUserModels)! + ((communityCircleUserListModel?.data!)!)
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:communityCircleUserListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:communityCircleUserListModel?.pagination)
         }) { [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommonModule/LocationModule/SelfRecommendation/ViewController/SelfRecommendationViewController.swift

@@ -49,7 +49,7 @@ class SelfRecommendationViewController: BaseViewController {
     }
     
     override func setupData() {
-        self.selfRecommendationView.collectionView.addHeader(withBeginRefresh: true, animation: false) {
+        self.selfRecommendationView.collectionView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.configPickupNodeIndexApi( page: page)
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Follow/CommunityFollowViewController.swift

@@ -73,7 +73,7 @@ class CommunityFollowViewController: BaseViewController {
     
     override func setupData() {
         //下拉刷新
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.loadData(page:page)
         }
@@ -279,7 +279,7 @@ extension CommunityFollowViewController {
                     self?.tableView.tableHeaderView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 0.000001))
                 }
                 self?.tableView.reloadData()
-                MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityFollowFeedModel?.pagination)
+                MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityFollowFeedModel?.pagination)
             }) {
                 [weak self] (loadingStatus) in
                 MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Recommend/CommunityRecommnendViewController.swift

@@ -57,7 +57,7 @@ class CommunityRecommnendViewController: UIViewController {
     
     func setupData() {
         //下拉刷新
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityPostSuggestApi(page:page)
         }
@@ -220,7 +220,7 @@ extension CommunityRecommnendViewController {
             }
             self?.communityRecommendDataModels = (self?.communityRecommendDataModels)! + (communityRecommendFeedModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift

@@ -193,7 +193,7 @@ class CommunityFeaturedTopicsViewController: BaseViewController {
     
     override func setupData() {
         //下拉刷新
-        tableView.addFullScreenHeader(withBeginRefresh: true, animation: true) {
+        tableView.addFullScreenHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityTopicDetailApi()
             self?.communityPostTopicApi(page: page)
@@ -380,7 +380,7 @@ extension CommunityFeaturedTopicsViewController {
             }
             self?.communityRecommendDataModels = (self?.communityRecommendDataModels)! + (communityRecommendFeedModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityRecommendFeedModel?.pagination)
         }) {
             [weak self] loadingStatus in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift

@@ -57,7 +57,7 @@ class CommunityFindFriendsViewController: BaseViewController {
             self?.navigationController?.pushViewController(vc, animated: true)
 
         }
-        tableView.addHeader(withBeginRefresh: true, animation: true) { [weak self] (page) in
+        tableView.addHeader(withBeginRefresh: true,  animation: true) { [weak self] (page) in
             self?.cmsMemberListApi()
         }
         observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("followApi"), object: nil, queue: OperationQueue.main) { [weak self] (notification) in

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/ViewController/CommunityMyFollowTopicController.swift

@@ -48,7 +48,7 @@ class CommunityMyFollowTopicController: BaseViewController {
     
     override func setupData() {
         
-        tableView.addHeader(withBeginRefresh: true, animation: false) {
+        tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.communityMemberFollowTopicListApi(page: page)
         }
@@ -82,7 +82,7 @@ extension CommunityMyFollowTopicController {
                 }
                 self?.communityMemberFollowTopicListDataModels = (self?.communityMemberFollowTopicListDataModels)! + (communityMemberFollowTopicListModel?.data!)!
                 self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:communityMemberFollowTopicListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:communityMemberFollowTopicListModel?.pagination)
         }) {[weak self] loadingStatus in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
 

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/Controller/CommunityRecommendController.swift

@@ -206,7 +206,7 @@ class CommunityRecommendController: BaseViewController {
 
             }
         }).disposed(by: disposeBag)
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityPostDetailApi()
             self?.communityPostCommentApi(page: page)
@@ -473,7 +473,7 @@ extension CommunityRecommendController {
             self?.communityPostDataModels = (self?.communityPostDataModels)! + (communityPostsModel?.data!)!
             self?.heightList()
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityPostsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityPostsModel?.pagination)
 
         }) {
             [weak self] (loadingStatus) in

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunitySubComment/ViewController/CommunitySubCommentController.swift

@@ -71,7 +71,7 @@ class CommunitySubCommentController: BaseViewController {
     }()
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) { [weak self] (page) in
+        tableView.addHeader(withBeginRefresh: true,  animation: true) { [weak self] (page) in
             self?.communityPostReplyApi(page: page)
         }
         tableView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
@@ -120,7 +120,7 @@ extension CommunitySubCommentController {
             self?.communityPostReplyModels = (self?.communityPostReplyModels)! + (communityPostReplysModel?.data!)!
             self?.tableView.reloadData()
             self?.navigationBar.title = "\(self?.communityPostReplyModels.count ?? 0)条评论"
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityPostReplysModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityPostReplysModel?.pagination)
 
         }) {
             [weak self] loadingStatus in

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityAllCommentView.swift

@@ -89,7 +89,7 @@ class CommunityAllCommentView: FWPopupView {
     }
     
     func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: false) {
+        tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.communityPostCommentApi(page: page)
         }
@@ -301,7 +301,7 @@ extension CommunityAllCommentView {
             self?.communityPostCommentModels = (self?.communityPostCommentModels)! + (self?.communityPostCommentsModel?.data!)!
             self?.tableView.reloadData()
             
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityPostCommentsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityPostCommentsModel?.pagination)
             
         }) {
             [weak self] loadingStatus in

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -146,7 +146,7 @@ class CommunityVideoListController: BaseViewController {
             [weak self] (data) in
             self?.navigationController?.popViewController(animated: true)
         }).disposed(by: disposeBag)
-        collectionView.addHeader(withBeginRefresh: true, animation: false) {
+        collectionView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.communityVideoListApi(page:page)
             self?.collectionView.mj_header.isHidden = true

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoSubCommentController/CommunityVideoSubCommentController.swift

@@ -70,7 +70,7 @@ class CommunityVideoSubCommentController: BaseViewController {
     }()
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: false) { [weak self] (page) in
+        tableView.addHeader(withBeginRefresh: true,  animation: false) { [weak self] (page) in
             self?.communityPostReplyApi(page: page)
         }
         tableView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
@@ -117,7 +117,7 @@ extension CommunityVideoSubCommentController {
             self?.communityPostReplyModels = (self?.communityPostReplyModels)! + (self?.communityPostReplysModel?.data!)!
             self?.navigationBar.title = "\(self?.communityPostReplysModel?.pagination?.total ?? 0)条评论"
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: self?.communityPostReplysModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: self?.communityPostReplysModel?.pagination)
         }) {
             [weak self] loadingStatus in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageList/ViewController/MessageListController.swift

@@ -62,7 +62,7 @@ class MessageListController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.userMemberMessageList(page: page)
         }
@@ -130,7 +130,7 @@ extension MessageListController {
             }
             self?.messageDataModels = (self?.messageDataModels)! + (messageListModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:messageListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:messageListModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/MessageMainViewController.swift

@@ -48,7 +48,7 @@ class MessageMainViewController: BaseViewController {
             self?.collectionView.reloadData()
             BaseTabbarViewController.shared.setBadge()
         }
-        collectionView.addHeader(withBeginRefresh: true, animation: true) {
+        collectionView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.userMemberMessageIndexApi()
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetActivity/Controller/MessagePlanetActivityController.swift

@@ -48,7 +48,7 @@ class MessagePlanetActivityController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.userMemberMessageList(page: page)
         }
@@ -84,7 +84,7 @@ extension MessagePlanetActivityController {
             }
             self?.messageDataModels = (self?.messageDataModels)! + (messageListModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView,pagination: messageListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView,pagination: messageListModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessagePlanetNotification/Controller/MessagePlanetNotiController.swift

@@ -43,7 +43,7 @@ class MessagePlanetNotiController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.userMemberMessageList(page: 1)
         }
@@ -81,7 +81,7 @@ extension MessagePlanetNotiController {
             }
             self?.messageDataModels = (self?.messageDataModels ??  Array<MessageDataModel>()) + (messageListModel?.data ??  Array<MessageDataModel>())
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView,pagination: messageListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView,pagination: messageListModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/ViewController/AddressManagerViewController.swift

@@ -45,7 +45,7 @@ class AddressManagerViewController: BaseViewController {
         observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("editAddress"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
             self?.configCityManagementIndexApi()
         }
-        addressManagerView.tableView.addHeader(withBeginRefresh: true, animation: false) {
+        addressManagerView.tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self](page) in
             self?.configCityManagementIndexApi()
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/ExpressAddressList/ViewController/ExpressAddressListViewController.swift

@@ -58,7 +58,7 @@ class ExpressAddressListViewController: BaseViewController {
         observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("editAddress"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
             self?.userExpressAddressListApi()
         }
-        self.expressAddressListView.tableView.addHeader(withBeginRefresh: true, animation: false) {
+        self.expressAddressListView.tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self](page) in
             self?.userExpressAddressListApi()
         }

+ 3 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift

@@ -54,7 +54,7 @@ class MyFollowAndFanViewController: BaseViewController {
     
     override func setupData() {
         /// 上拉刷新
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self]  (page) in
             self?.userFollowsFans(page:page)
         }
@@ -123,7 +123,7 @@ extension MyFollowAndFanViewController {
                 self?.tableView.tableHeaderView = self?.followHeaderView
             }
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:userFollowsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination:userFollowsModel?.pagination)
 
         }, fail: {
             [weak self] (loadingStatus) in
@@ -170,7 +170,7 @@ extension MyFollowAndFanViewController {
                 self?.tableView.tableHeaderView = self?.fanHeaderView
             }
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: userFansModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: userFansModel?.pagination)
         }, fail: {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherListView.swift

@@ -45,7 +45,7 @@ class PersonViewUserAndOtherListView: BaseView {
     
     override func setupData() {
 
-        collectionView.addHeader(withBeginRefresh: true, animation: false, refreshBlock: { [weak self] (page) in
+        collectionView.addHeader(withBeginRefresh: true,  animation: false, refreshBlock: { [weak self] (page) in
             self?.communityPostMyApi(page: page)
         })
         collectionView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift

@@ -116,7 +116,7 @@ class UserPersonalCenterViewController: BaseViewController {
             self?.navigationController?.pushViewController(vc, animated: true)
         }).disposed(by: disposeBag)
         
-//        pagingView.mainTableView.addHeader(withBeginRefresh: true, animation: false, refreshBlock: { [weak self] (page) in
+//        pagingView.mainTableView.addHeader(withBeginRefresh: true,  animation: false, refreshBlock: { [weak self] (page) in
 //        })
         self.userMemberDetailApi()
 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/SelfMentionContactsList/ViewController/SelfMentionContactsListViewController.swift

@@ -50,7 +50,7 @@ class SelfMentionContactsListViewController: BaseViewController {
     override func setupData() {
         self.selfMentionContactsListView
             .tableView
-            .addHeader(withBeginRefresh: true, animation: false) {
+            .addHeader(withBeginRefresh: true,  animation: false) {
                 [weak self] (data) in
                 self?.userExpreesContactsListApi()
         }

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

@@ -248,7 +248,7 @@ extension PublishAddTopicController {
             // 更新选中状态
             self?.fixTopicSelectedStatus()
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: communityTopicsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: communityTopicsModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/RedemptionArea/ViewController/RedemptionAreaViewController.swift

@@ -53,7 +53,7 @@ class RedemptionAreaViewController: BaseViewController {
     
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.cmsTemplateExchangeApi()
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchContentList/ViewController/SearchContentListViewController.swift

@@ -51,7 +51,7 @@ class SearchContentListViewController: UIViewController {
     }
     
     func setupData() {
-        collectionView.addHeader(withBeginRefresh: true, animation: true) {
+        collectionView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityPostsApi(page: page)
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchProduct/ViewController/SearchProductListViewController.swift

@@ -39,7 +39,7 @@ class SearchProductListViewController: UIViewController {
     }
     
     func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: false) {
+        tableView.addHeader(withBeginRefresh: true,  animation: false) {
             [weak self] (page) in
             self?.productSearchApi(page:page)
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/ViewController/SearchTopicListViewController.swift

@@ -44,7 +44,7 @@ class SearchTopicListViewController: BaseViewController {
     }
     
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.communityTopicsApi(page: page)
         }
@@ -87,7 +87,7 @@ extension SearchTopicListViewController {
             }
             self?.communityTopicModels = (self?.communityTopicModels)! + (self?.communityTopicsModel?.data!)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: self?.communityTopicsModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: self?.communityTopicsModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/ViewController/SearchUserListViewController.swift

@@ -50,7 +50,7 @@ class SearchUserListViewController: BaseViewController {
         }
     }
     override func setupData() {
-        tableView.addHeader(withBeginRefresh: true, animation: true) {
+        tableView.addHeader(withBeginRefresh: true,  animation: true) {
             [weak self] (page) in
             self?.userMemberSearchMemberApi(page: page)
         }
@@ -106,7 +106,7 @@ extension SearchUserListViewController {
             }
             self?.searchMemberModels = (self?.searchMemberModels)!  + (searchMemberListModel?.data)!
             self?.tableView.reloadData()
-            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination: searchMemberListModel?.pagination)
+            MJRefreshManager.mjRefreshManagerNoHiddenFooter(tableView: self?.tableView, pagination: searchMemberListModel?.pagination)
         }) {
             [weak self] (loadingStatus) in
             MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)

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

@@ -849,4 +849,60 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
             fail(loadingStatus)
         }
     }
+    
+    // MARK: - 圈子-相册列表
+    ///  圈子相册列表
+    ///
+    /// - Parameters:
+    ///   - id: 圈子Id
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityCirclePicturesApi(circleId:Int,page:Int = 1,completion: @escaping successCallBack,fail:@escaping failCallback) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(page, forKey: "page")
+        parameters.updateValue(circleId, forKey: "circle_id")
+        
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityCirclePicturesModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCirclePictures(parameters: parameters)), completion: {  (communityCirclePicturesModel) in
+            completion(communityCirclePicturesModel)
+        }) {
+            (loadingStatus) in
+            fail(loadingStatus)
+        }
+    }
+    
+    // MARK: - 圈子-相册创建
+    /// 圈子-相册创建
+    ///
+    /// - Parameters:
+    ///   - circleId: 圈子ID
+    ///   - imgs: 图集 json
+    ///   - completion: 完成
+    func communityCirclePicturePostApi(circleId:Int,imgs:String,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(circleId, forKey: "circle_id")
+        parameters.updateValue(imgs, forKey: "imgs")
+        
+        SwiftMoyaNetWorkManager.shared.requestAny( target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCirclePicturePost(parameters: parameters)), completion: {  (_) in
+            completion(nil)
+        }) {
+            (loadingStatus) in
+        }
+    }
+    
+    // MARK: - 圈子-相册创建删除
+    /// 圈子-相册创建删除
+    ///
+    /// - Parameters:
+    ///   - id: 相册创建删除
+    ///   - completion: 完成
+    func communityCirclePictureDeleteApi(id:Int,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(id, forKey: "id")
+        
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCirclePictureDelete(parameters: parameters)), completion: {  (_) in
+            completion(nil)
+        }) {
+            (loadingStatus) in
+        }
+    }
 }

+ 38 - 11
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift

@@ -160,6 +160,15 @@ public let kCommunityCircleCommentsApi = "/community/circle/comments"
 ///  提问-评论回复列表
 public let kCommunityCircleReplysApi = "/community/circle/replys"
 
+// MARK: -  圈子-相册列表
+///  圈子-相册列表
+public let kCommunityCirclePicturesApi = "/community/circle/pictures"
+
+
+// MARK: -  圈子-相册创建 /删除相册
+///  圈子-相册创建 /删除相册
+public let kCommunityCirclePictureApi = "/community/circle/picture"
+
 /// 社区
 ///
 /// - communityTopicCategory: 话题组列表
@@ -200,10 +209,8 @@ public let kCommunityCircleReplysApi = "/community/circle/replys"
 /// - communityCircleCommentDelete : 提问-删除评论回复
 /// - communityCircleComments : 提问评论列表
 /// - communityCircleReplys : 提问评论列表
-
-
-
-
+/// - communityCirclePictures : 圈子-相册列表
+/// - communityCirclePicture : 圈子-相册创建 /删除相册
 
 public enum SwiftMoyaServiceCommunityApi {
     case communityTopicCategory(parameters:Dictionary<String, Any>)
@@ -247,8 +254,10 @@ public enum SwiftMoyaServiceCommunityApi {
     case communityCircleCommentDelete(parameters:Dictionary<String, Any>)
     case communityCircleComments(parameters:Dictionary<String, Any>)
     case communityCircleReplys(parameters:Dictionary<String, Any>)
+    case communityCirclePictures(parameters:Dictionary<String, Any>)
+    case communityCirclePicturePost(parameters:Dictionary<String, Any>)
+    case communityCirclePictureDelete(parameters:Dictionary<String, Any>)
 
-    
 }
 
 extension SwiftMoyaServiceCommunityApi: TargetType {
@@ -295,7 +304,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleCommentPost,
              .communityCircleCommentDelete,
              .communityCircleComments,
-             .communityCircleReplys
+             .communityCircleReplys,
+             .communityCirclePictures,
+             .communityCirclePicturePost,
+             .communityCirclePictureDelete
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -385,6 +397,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
             return kCommunityCircleCommentsApi
         case .communityCircleReplys:
             return kCommunityCircleReplysApi
+        case .communityCirclePictures:
+            return kCommunityCirclePicturesApi
+        case .communityCirclePicturePost:
+            return kCommunityCirclePictureApi
+        case .communityCirclePictureDelete:
+            return kCommunityCirclePictureApi
         }
     }
     
@@ -398,7 +416,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleJoinPost,
              .communityCircleCommentPost,
              .communityCircleMessageAction,
-             .communityCircleMessagePost
+             .communityCircleMessagePost,
+             .communityCirclePicturePost
             :
             return .post
         case .communityTopicCategory,
@@ -426,7 +445,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleArticles,
              .communityCircleMessagesGet,
              .communityCircleComments,
-             .communityCircleReplys
+             .communityCircleReplys,
+             .communityCirclePictures
             :
             return .get
         case .communityMemberFollowTopicCancelFollow,
@@ -434,7 +454,8 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityPostDeleteComment,
              .communityCircleJoinDelete,
              .communityCircleCommentDelete,
-             .communityCircleMessageDelete
+             .communityCircleMessageDelete,
+             .communityCirclePictureDelete
             :
             return .delete
 
@@ -484,7 +505,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleCommentPost(var parameters),
              .communityCircleCommentDelete(var parameters),
              .communityCircleComments(var parameters),
-             .communityCircleReplys(var parameters)
+             .communityCircleReplys(var parameters),
+             .communityCirclePictures(var parameters),
+             .communityCirclePicturePost(var parameters),
+             .communityCirclePictureDelete(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -547,7 +571,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleCommentPost,
              .communityCircleCommentDelete,
              .communityCircleComments,
-             .communityCircleReplys
+             .communityCircleReplys,
+             .communityCirclePictures,
+             .communityCirclePicturePost,
+             .communityCirclePictureDelete
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift

@@ -206,7 +206,7 @@ class SwiftMoyaNetWorkServiceConfig: NSObject {
     /// - Parameter completion: 获取sts上传凭证(前台)
     func configOSSStsApi(completion: @escaping successCallBack,fail:@escaping failCallback) {
         let parameters = Dictionary<String,Any>()
-        SwiftMoyaNetWorkManager.shared.requestObject(ConfigOSSStsModel.self,target: MultiTarget(SwiftMoyaServiceConfigApi.configOSSSts), completion: { (configOSSStsModel) in
+        SwiftMoyaNetWorkManager.shared.requestObject(ConfigOSSStsModel.self,target: MultiTarget(SwiftMoyaServiceConfigApi.configOSSSts(parameters: parameters)), completion: { (configOSSStsModel) in
             completion(configOSSStsModel)
         }) {
             (loadingStatus) in

+ 6 - 8
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaServiceConfigApi.swift

@@ -66,7 +66,7 @@ public enum SwiftMoyaServiceConfigApi {
     case configPosterInvite(parameters:Dictionary<String, Any>)
     case configUpgrade(parameters:Dictionary<String, Any>)
     case configStartup(parameters:Dictionary<String, Any>)
-    case configOSSSts
+    case configOSSSts(parameters:Dictionary<String, Any>)
 }
 
 extension SwiftMoyaServiceConfigApi: TargetType {
@@ -139,14 +139,12 @@ extension SwiftMoyaServiceConfigApi: TargetType {
              .configCityManagementIndex(var parameters),
              .configPosterInvite(var parameters),
              .configUpgrade(var parameters),
-             .configStartup(var parameters)
+             .configStartup(var parameters),
+             .configOSSSts(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
             return .requestParameters(parameters: parameters, encoding: URLEncoding.default)
-        case .configOSSSts
-            :
-            return .requestPlain
         case .configUploadSingleImg(_,let dataArray),
              .configUploadSingleImgWithoutHud(_,let dataArray),
              .configUploadMultiImg(_,let dataArray)
@@ -173,8 +171,7 @@ extension SwiftMoyaServiceConfigApi: TargetType {
         switch self {
         case .configConfig,
              .configUpgrade,
-             .configStartup,
-             .configOSSSts
+             .configStartup
             :
             return (headerParameters(headerType: .defaultHeader) as! [String : String])
         case .configPickupNodeIndex,
@@ -182,7 +179,8 @@ extension SwiftMoyaServiceConfigApi: TargetType {
              .configUploadSingleImg,
              .configUploadSingleImgWithoutHud,
              .configUploadMultiImg,
-             .configPosterInvite
+             .configPosterInvite,
+             .configOSSSts
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

+ 14 - 14
RainbowPlanet/RainbowPlanet/Tools/SwiftProgressHUD/SwiftProgressHUD.swift

@@ -55,20 +55,20 @@ import UIKit
 //        self.hud = hud
 //    }
 //
-//    /// 显示等待消息 view
-//    ///
-//    /// - Parameter title: 加载提示语
-//    func showWait(_ title: String = "",view:UIView) {
-//        hide()
-//        let hud = MBProgressHUD.showAdded(to: view, animated: true)
-//        hud.show(animated: true)
-//        hud.detailsLabel.text = title
-//        hud.bezelView.style = .solidColor
-//        hud.bezelView.backgroundColor = UIColor.clear
-//        hud.mode = MBProgressHUDMode.indeterminate
-//        hud.removeFromSuperViewOnHide = true
-//        self.hud = hud
-//    }
+    /// 显示等待消息 view
+    ///
+    /// - Parameter title: 加载提示语
+    func showWait(_ title: String = "",view:UIView) {
+        hide()
+        let hud = MBProgressHUD.showAdded(to: view, animated: true)
+        hud.show(animated: true)
+        hud.detailsLabel.text = title
+        hud.bezelView.style = .solidColor
+        hud.bezelView.backgroundColor = UIColor.clear
+        hud.mode = MBProgressHUDMode.indeterminate
+        hud.removeFromSuperViewOnHide = true
+        self.hud = hud
+    }
 
 
     /// 只显示文本