Ver código fonte

关注列表完成

南鑫林 5 anos atrás
pai
commit
b9c9427d70

+ 1 - 0
RainbowPlanet/Podfile

@@ -52,6 +52,7 @@ target 'RainbowPlanet' do
 #  pod 'ReactorKit'
   # 富文本
 #  pod 'RichEditorView'
+  pod 'UITableView+FDTemplateLayoutCell'
 
   #======================第三方平台===========
   #======================友盟===========

+ 5 - 1
RainbowPlanet/Podfile.lock

@@ -32,6 +32,7 @@ PODS:
   - RxSwift (4.5.0)
   - SnapKit (4.2.0)
   - SwiftyJSON (5.0.0)
+  - "UITableView+FDTemplateLayoutCell (1.6)"
   - UMCAnalytics (6.0.3):
     - UMCCommon
   - UMCCommon (2.0.1)
@@ -78,6 +79,7 @@ DEPENDENCIES:
   - RxSwift
   - SnapKit
   - SwiftyJSON
+  - "UITableView+FDTemplateLayoutCell"
   - UMCAnalytics
   - UMCCommon
   - UMCCommonLog
@@ -114,6 +116,7 @@ SPEC REPOS:
     - RxSwift
     - SnapKit
     - SwiftyJSON
+    - "UITableView+FDTemplateLayoutCell"
     - UMCAnalytics
     - UMCCommon
     - UMCCommonLog
@@ -146,6 +149,7 @@ SPEC CHECKSUMS:
   RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575
   SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
   SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7
+  "UITableView+FDTemplateLayoutCell": 5c949b4a5059c404b442926c0e80f81d10a2d66f
   UMCAnalytics: ff58714ada407682c4a07548156f94bcec92f055
   UMCCommon: 0263a057a2e1ae1da4c8308541e56904a493ce13
   UMCCommonLog: 05a2d5de21858e3d870551562cff405c1366d244
@@ -153,6 +157,6 @@ SPEC CHECKSUMS:
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   UMCShare: 552b29753f1b4da87b51d96545ed19e6263df397
 
-PODFILE CHECKSUM: ce904adbb6da37ca3145c2921469be1ffc5965e0
+PODFILE CHECKSUM: 48f0c32fcc71dc794608e47ecdc1df2585927cb0
 
 COCOAPODS: 1.7.1

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

@@ -316,6 +316,12 @@
 		A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */; };
 		A7DF50E322A55AB600998908 /* BrowsePicturesPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */; };
 		A7F2D6BD22B09F930093000B /* CommunityNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6BC22B09F930093000B /* CommunityNavigationBarView.swift */; };
+		A7F2D6C122B0D1CB0093000B /* CommunityFollowTableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6C022B0D1CB0093000B /* CommunityFollowTableHeaderView.swift */; };
+		A7F2D6C622B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6C522B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift */; };
+		A7F2D6C822B0E2F60093000B /* CommunityRecommendFollowTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6C722B0E2F60093000B /* CommunityRecommendFollowTableViewCell.swift */; };
+		A7F2D6CB22B0E4270093000B /* CommunityRecommendFollowCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6CA22B0E4270093000B /* CommunityRecommendFollowCollectionViewCell.swift */; };
+		A7F2D6CE22B0FF180093000B /* CommunityFollowStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6CD22B0FF180093000B /* CommunityFollowStatusTableViewCell.swift */; };
+		A7F2D6D022B1119A0093000B /* CommunityEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6CF22B1119A0093000B /* CommunityEnum.swift */; };
 		A7FF1555228AC27600A85748 /* ProductAllCommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */; };
 		A7FF1557228AC3E800A85748 /* ProductAllCommentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */; };
 		A7FF1560228C693D00A85748 /* OrderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF155F228C693D00A85748 /* OrderViewController.swift */; };
@@ -764,6 +770,12 @@
 		A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesPagerViewCell.swift; sourceTree = "<group>"; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7F2D6BC22B09F930093000B /* CommunityNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityNavigationBarView.swift; sourceTree = "<group>"; };
+		A7F2D6C022B0D1CB0093000B /* CommunityFollowTableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowTableHeaderView.swift; sourceTree = "<group>"; };
+		A7F2D6C522B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityCommonSectionHeaderView.swift; sourceTree = "<group>"; };
+		A7F2D6C722B0E2F60093000B /* CommunityRecommendFollowTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRecommendFollowTableViewCell.swift; sourceTree = "<group>"; };
+		A7F2D6CA22B0E4270093000B /* CommunityRecommendFollowCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRecommendFollowCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7F2D6CD22B0FF180093000B /* CommunityFollowStatusTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowStatusTableViewCell.swift; sourceTree = "<group>"; };
+		A7F2D6CF22B1119A0093000B /* CommunityEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityEnum.swift; sourceTree = "<group>"; };
 		A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentView.swift; sourceTree = "<group>"; };
 		A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentViewController.swift; sourceTree = "<group>"; };
 		A7FF155F228C693D00A85748 /* OrderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderViewController.swift; sourceTree = "<group>"; };
@@ -1284,6 +1296,7 @@
 			children = (
 				A719EE6D22AF441F001AAC98 /* CommunityViewController.swift */,
 				A7931E1722AFC1DF00297D0A /* CommunityListViewController.swift */,
+				A7F2D6CF22B1119A0093000B /* CommunityEnum.swift */,
 			);
 			path = ViewController;
 			sourceTree = "<group>";
@@ -1291,6 +1304,8 @@
 		A719EE6922AF43EE001AAC98 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				A7F2D6C422B0DBCB0093000B /* Cell */,
+				A7F2D6C322B0DBBB0093000B /* Header */,
 				A7F2D6BC22B09F930093000B /* CommunityNavigationBarView.swift */,
 			);
 			path = View;
@@ -2917,6 +2932,41 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
+		A7F2D6C322B0DBBB0093000B /* Header */ = {
+			isa = PBXGroup;
+			children = (
+				A7F2D6C022B0D1CB0093000B /* CommunityFollowTableHeaderView.swift */,
+				A7F2D6C522B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift */,
+			);
+			path = Header;
+			sourceTree = "<group>";
+		};
+		A7F2D6C422B0DBCB0093000B /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				A7F2D6CC22B0FEF60093000B /* FollowStatus */,
+				A7F2D6C922B0E2FE0093000B /* RecommendFollow */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
+		A7F2D6C922B0E2FE0093000B /* RecommendFollow */ = {
+			isa = PBXGroup;
+			children = (
+				A7F2D6C722B0E2F60093000B /* CommunityRecommendFollowTableViewCell.swift */,
+				A7F2D6CA22B0E4270093000B /* CommunityRecommendFollowCollectionViewCell.swift */,
+			);
+			path = RecommendFollow;
+			sourceTree = "<group>";
+		};
+		A7F2D6CC22B0FEF60093000B /* FollowStatus */ = {
+			isa = PBXGroup;
+			children = (
+				A7F2D6CD22B0FF180093000B /* CommunityFollowStatusTableViewCell.swift */,
+			);
+			path = FollowStatus;
+			sourceTree = "<group>";
+		};
 		A7FF1550228AC22700A85748 /* ProductAllComment */ = {
 			isa = PBXGroup;
 			children = (
@@ -3675,6 +3725,7 @@
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
 				A7B4E7352281907A0012914A /* CMSModel.swift in Sources */,
 				A72A72BE22321DE000B21995 /* Extension+RxTimer.swift in Sources */,
+				A7F2D6CB22B0E4270093000B /* CommunityRecommendFollowCollectionViewCell.swift in Sources */,
 				A7CC74EA22706ACD003C4F38 /* MessageViewController.swift in Sources */,
 				A7931E1622AFAEF500297D0A /* TopicSelectionModel.swift in Sources */,
 				BDF47D7E22827C3F00941AB9 /* ProductSlidingTopBottomCollectionViewCell.swift in Sources */,
@@ -3693,6 +3744,7 @@
 				A71AA5152272160A008FF1A5 /* ExpressAddressListTableViewCell.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
 				A7931E0D22AF874600297D0A /* GenderSelectionViewController.swift in Sources */,
+				A7F2D6D022B1119A0093000B /* CommunityEnum.swift in Sources */,
 				A7BB6857226965C100AB07A2 /* SelfRecommendationHeaderCollectionReusableView.swift in Sources */,
 				BDE3045F228554CA001D050F /* ProductCartAmountModel.swift in Sources */,
 				A7BB68672269B1DD00AB07A2 /* AddressPOIViewController.swift in Sources */,
@@ -3725,6 +3777,7 @@
 				A739121D229F75F50033177E /* JXPagingListContainerView.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
 				A70B2C252286C03800B2449F /* NXLPageControl.swift in Sources */,
+				A7F2D6C122B0D1CB0093000B /* CommunityFollowTableHeaderView.swift in Sources */,
 				A7A98E12227ECA11005306E9 /* ProductSearchModel.swift in Sources */,
 				A71AF0B0226EF185001730FE /* SearchCollectionViewCell.swift in Sources */,
 				A7A98E1D227EF1CB005306E9 /* SpecialBannerView.swift in Sources */,
@@ -3842,6 +3895,7 @@
 				A70B2C402288312900B2449F /* ProductDetailSectionHeader.swift in Sources */,
 				A7A98E3122801B10005306E9 /* ShoppingMallListView.swift in Sources */,
 				BD1DC6C6228CFD0B00B89C57 /* SwiftMoyaServiceOrderApi.swift in Sources */,
+				A7F2D6CE22B0FF180093000B /* CommunityFollowStatusTableViewCell.swift in Sources */,
 				BD1FC18A22B0A32100D55081 /* CommunityReplyCommentCell.swift in Sources */,
 				A7CC751A22716254003C4F38 /* SetTableViewCell.swift in Sources */,
 				BD20F1D32283D0ED00677D8E /* OrderFinishPaySuccessCell.swift in Sources */,
@@ -3978,6 +4032,7 @@
 				A7FF156C228C6E5E00A85748 /* OrderTotalAmountTableViewCell.swift in Sources */,
 				A71738A622897892000AEA6A /* SwiftMoyaServiceShopApi.swift in Sources */,
 				A72A726722321DBD00B21995 /* LocationModel.swift in Sources */,
+				A7F2D6C622B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift in Sources */,
 				A7A98E10227EC531005306E9 /* ProductHSmallTableViewCell.swift in Sources */,
 				A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */,
 				BD12205022AFB08B0051C7C2 /* MessageThumbTableCell.swift in Sources */,
@@ -4009,6 +4064,7 @@
 				A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */,
 				A773D02F229FDC3B007A5751 /* DIYEmptyView.swift in Sources */,
 				A757C9342274882E00226355 /* UIScrollView+MJRefreshEX.m in Sources */,
+				A7F2D6C822B0E2F60093000B /* CommunityRecommendFollowTableViewCell.swift in Sources */,
 				A77F2C9C2231FDCF001BD3F6 /* BaseView.swift in Sources */,
 				A7A98E2F228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift in Sources */,
 				A7284A522252EE9A000BAEC4 /* RootModel.swift in Sources */,

+ 5 - 5
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -8,9 +8,9 @@
 
 import UIKit
 
-let kThemeColor = UIColor(hexString: "FFA42F")
+let kThemeColor = UIColor(hexString: "62CC74")
 
-let kTabbarSelectColor = UIColor(hexString: "FFA42F")
+let kTabbarSelectColor = UIColor(hexString: "62CC74")
 
 let kTabbarNormalColor = UIColor(hexString: "333333")
 
@@ -18,7 +18,7 @@ let kDisabledButtonColor = UIColor(hexString: "E6E6E6")
 
 let kDisabledTitleColor = UIColor(hexString: "666666")
 
-let kEnabledButtonColor = UIColor(hexString: "FFA42F")
+let kEnabledButtonColor = UIColor(hexString: "62CC74")
 
 let kEnabledTitleColor = UIColor(hexString: "FFFFFF")
 
@@ -33,8 +33,6 @@ let kFFF9F0Color = UIColor(hexString: "FFF9F0")
 
 let kFFEDD3Color = UIColor(hexString: "FFEDD3")
 
-
-
 let k999999Color = UIColor(hexString: "999999")
 
 let kffffffColor = UIColor(hexString: "ffffff")
@@ -99,6 +97,8 @@ let kff724fColor = UIColor(hexString: "ff724f")
 
 let kFFA42FColor = UIColor(hexString: "FFA42F")
 
+let kF4F4F4Color = UIColor(hexString: "F4F4F4")
+
 let kbfbfbfColor = UIColor(hexString: "bfbfbf")
 
 let k1C2443Color = UIColor(hexString: "1C2443")

+ 410 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/FollowStatus/CommunityFollowStatusTableViewCell.swift

@@ -0,0 +1,410 @@
+//
+//  CommunityFollowStatusTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class CommunityFollowStatusTableViewCell: UITableViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CommunityFollowStatusTableViewCell {
+        let ID = "CommunityFollowStatusTableViewCell"
+        tableView.register(CommunityFollowStatusTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CommunityFollowStatusTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CommunityFollowStatusTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        addSubview(avatarButton)
+        addSubview(titleButton)
+        addSubview(timeStatusLabel)
+        addSubview(oneCardView)
+        oneCardView.addSubview(avatarOtherButton)
+        oneCardView.addSubview(titleOtherButton)
+        oneCardView.addSubview(followButton)
+        addSubview(twoCardView)
+        twoCardView.addSubview(twoTitleLabel)
+        twoCardView.addSubview(twoSubtitleLabel)
+        twoCardView.addSubview(twoGoImageView)
+        addSubview(threeCardView)
+        threeCardView.addSubview(threeTitleLabel)
+        threeCardView.addSubview(threeGoImageView)
+        
+        addSubview(skittlesImageView)
+        addSubview(skittlesTitleLabel)
+    
+    }
+    
+    private func setupLayouts() {
+        avatarButton.snp_makeConstraints { (make) in
+            make.top.equalTo(27)
+            make.left.equalTo(14)
+            make.size.equalTo(28)
+        }
+        titleButton.snp_makeConstraints { (make) in
+            make.centerY.equalTo(avatarButton)
+            make.left.equalTo(avatarButton.snp_right).offset(7)
+        }
+        timeStatusLabel.snp_makeConstraints { (make) in
+            make.centerY.equalTo(titleButton)
+            make.left.equalTo(titleButton.snp_right).offset(10)
+        }
+        
+        oneCardView.snp_makeConstraints { (make) in
+            make.top.equalTo(avatarButton.snp_bottom).offset(10)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(64)
+        }
+        
+        avatarOtherButton.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(15)
+            make.size.equalTo(40)
+        }
+        
+        titleOtherButton.snp_makeConstraints { (make) in
+            make.centerY.equalTo(avatarOtherButton)
+            make.left.equalTo(avatarOtherButton.snp_right).offset(16)
+        }
+        
+        followButton.snp_makeConstraints { (make) in
+            make.centerY.equalTo(avatarOtherButton)
+            make.right.equalToSuperview().offset(-15)
+            make.height.equalTo(26)
+            make.width.equalTo(64)
+        }
+        
+        twoCardView.snp_makeConstraints { (make) in
+            make.top.equalTo(avatarButton.snp_bottom).offset(10)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(70)
+        }
+        
+        twoTitleLabel.snp_makeConstraints { (make) in
+            make.top.left.equalTo(15)
+            make.right.equalTo(-45)
+            make.height.equalTo(16)
+        }
+        twoSubtitleLabel.snp_makeConstraints { (make) in
+            make.bottom.equalTo(-15)
+            make.left.equalTo(15)
+            make.right.equalTo(-107)
+            make.height.equalTo(14)
+        }
+        twoGoImageView.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-15)
+        }
+        
+        threeCardView.snp_makeConstraints { (make) in
+            make.top.equalTo(avatarButton.snp_bottom).offset(10)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(60)
+        }
+        
+        threeTitleLabel.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(15)
+            make.right.equalTo(-45)
+        }
+        threeGoImageView.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-15)
+        }
+        
+    }
+    
+    private lazy var avatarButton: UIButton = {
+        let avatarButton = UIButton(type: UIButton.ButtonType.custom)
+        avatarButton.setImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
+        avatarButton.imageView?.contentMode = .scaleAspectFit
+        avatarButton.cornerRadius = 14
+        avatarButton.masksToBounds = true
+        avatarButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+            
+        }).disposed(by: disposeBag)
+        return avatarButton
+    }()
+    
+    private lazy var titleButton: UIButton = {
+        let titleButton = UIButton(type: UIButton.ButtonType.custom)
+        titleButton.setTitle("用户昵称", for: UIControl.State.normal)
+        titleButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        titleButton.titleLabel?.font = kMediumFont14
+        titleButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+        }).disposed(by: disposeBag)
+        return titleButton
+    }()
+    
+    private lazy var timeStatusLabel: UILabel = {
+        let timeStatusLabel = UILabel()
+        timeStatusLabel.textColor = k999999Color
+        timeStatusLabel.font = kRegularFont14
+        return timeStatusLabel
+    }()
+    
+    private lazy var oneCardView: UIView = {
+        let oneCardView = UIView()
+        oneCardView.backgroundColor = kF4F4F4Color
+        oneCardView.cornerRadius = 4
+        oneCardView.masksToBounds = true
+        oneCardView.isHidden = true
+        return oneCardView
+    }()
+    
+    private lazy var avatarOtherButton: UIButton = {
+        let avatarOtherButton = UIButton(type: UIButton.ButtonType.custom)
+        avatarOtherButton.setImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
+        avatarOtherButton.imageView?.contentMode = .scaleAspectFit
+        avatarOtherButton.cornerRadius = 20
+        avatarOtherButton.masksToBounds = true
+        avatarOtherButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+            
+        }).disposed(by: disposeBag)
+        return avatarOtherButton
+    }()
+    
+    private lazy var titleOtherButton: UIButton = {
+        let titleOtherButton = UIButton(type: UIButton.ButtonType.custom)
+        titleOtherButton.setTitle("其他用户昵称", for: UIControl.State.normal)
+        titleOtherButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        titleOtherButton.titleLabel?.font = kMediumFont15
+        titleOtherButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+        }).disposed(by: disposeBag)
+        return titleOtherButton
+    }()
+    
+    private lazy var followButton: UIButton = {
+        let followButton = UIButton(type: UIButton.ButtonType.custom)
+        followButton.titleLabel?.font = kMediumFont13
+        followButton.layer.cornerRadius = 13
+        followButton.layer.masksToBounds = true
+        followButton.layer.borderWidth = 1
+        followButton.rx.tap.subscribe(onNext: { (data) in
+            
+        }).disposed(by: disposeBag)
+        return followButton
+    }()
+    
+    private lazy var twoCardView: UIView = {
+        let twoCardView = UIView()
+        twoCardView.backgroundColor = kF4F4F4Color
+        twoCardView.isHidden = true
+        twoCardView.cornerRadius = 4
+        twoCardView.masksToBounds = true
+        return twoCardView
+    }()
+    
+    private lazy var twoTitleLabel: UILabel = {
+        let twoTitleLabel = UILabel()
+        twoTitleLabel.text = "迦百农对社会问题进行了哪些探讨啊这迦百农对社会问题进行了哪些探讨啊这"
+        twoTitleLabel.textColor = k333333Color
+        twoTitleLabel.font = kMediumFont16
+        return twoTitleLabel
+    }()
+    
+    private lazy var twoSubtitleLabel: UILabel = {
+        let twoSubtitleLabel = UILabel()
+        twoSubtitleLabel.text = "照片拍的真棒,我很喜欢这张照照片拍的真棒,我很喜欢这张照"
+        twoSubtitleLabel.textColor = k999999Color
+        twoSubtitleLabel.font = kRegularFont14
+        return twoSubtitleLabel
+    }()
+    
+    private lazy var twoGoImageView: UIImageView = {
+        let twoGoImageView = UIImageView()
+        twoGoImageView.image = kImage(name: "my_arrows_unfold")
+        return twoGoImageView
+    }()
+    
+    private lazy var threeCardView: UIView = {
+        let threeCardView = UIView()
+        threeCardView.backgroundColor = kF4F4F4Color
+        threeCardView.isHidden = true
+        threeCardView.cornerRadius = 4
+        threeCardView.masksToBounds = true
+        return threeCardView
+    }()
+    
+    private lazy var threeTitleLabel: UILabel = {
+        let threeTitleLabel = UILabel()
+        threeTitleLabel.text = "迦百农对社会问题进行了哪些探讨啊这迦百农对社会问题进行了哪些探讨啊这"
+        threeTitleLabel.textColor = k333333Color
+        threeTitleLabel.font = kMediumFont16
+        return threeTitleLabel
+    }()
+    
+    private lazy var threeGoImageView: UIImageView = {
+        let threeGoImageView = UIImageView()
+        threeGoImageView.image = kImage(name: "my_arrows_unfold")
+        return threeGoImageView
+    }()
+    
+    private lazy var skittlesImageView: UIImageView = {
+        let skittlesImageView = UIImageView()
+        skittlesImageView.image = kImage(name: "my_arrows_unfold")
+        skittlesImageView.cornerRadius = 8
+        skittlesImageView.masksToBounds = true
+        return skittlesImageView
+    }()
+    
+    private lazy var skittlesTitleLabel: UILabel = {
+        let skittlesTitleLabel = UILabel()
+        skittlesTitleLabel.text = "收获 66 个彩虹豆"
+        skittlesTitleLabel.textColor = k333333Color
+        skittlesTitleLabel.font = kRegularFont13
+        return skittlesTitleLabel
+    }()
+    
+    var followUserStatus: FollowUserStatus! {
+        didSet {
+            switch followUserStatus {
+            case .follow?:
+                timeStatusLabel.text = "刚刚 关注了"
+                oneCardView.isHidden = false
+                twoCardView.isHidden = true
+                threeCardView.isHidden = true
+                skittlesImageView.isHidden = true
+                skittlesTitleLabel.isHidden = true
+                break
+            case .comment?:
+                timeStatusLabel.text = "30秒前 评论"
+                oneCardView.isHidden = true
+                twoCardView.isHidden = false
+                threeCardView.isHidden = true
+                skittlesImageView.isHidden = false
+                skittlesTitleLabel.isHidden = false
+                skittlesImageView.snp_makeConstraints { (make) in
+                    make.left.equalTo(15)
+                    make.top.equalTo(twoCardView.snp_bottom).offset(12)
+                    make.size.equalTo(16)
+                }
+                skittlesTitleLabel.snp_makeConstraints { (make) in
+                    make.left.equalTo(skittlesImageView.snp_right).offset(2)
+                    make.centerY.equalTo(skittlesImageView)
+                }
+                break
+            case .forward?:
+                timeStatusLabel.text = "2019-02-01 转发"
+                oneCardView.isHidden = true
+                twoCardView.isHidden = true
+                threeCardView.isHidden = false
+                skittlesImageView.isHidden = false
+                skittlesTitleLabel.isHidden = false
+                skittlesImageView.snp_makeConstraints { (make) in
+                    make.left.equalTo(15)
+                    make.top.equalTo(threeCardView.snp_bottom).offset(12)
+                    make.size.equalTo(16)
+                }
+                skittlesTitleLabel.snp_makeConstraints { (make) in
+                    make.left.equalTo(skittlesImageView.snp_right).offset(2)
+                    make.centerY.equalTo(skittlesImageView)
+                }
+                break
+            case .like?:
+                timeStatusLabel.text = "30秒前 点赞"
+                oneCardView.isHidden = true
+                twoCardView.isHidden = true
+                threeCardView.isHidden = false
+                skittlesImageView.isHidden = false
+                skittlesTitleLabel.isHidden = false
+                skittlesImageView.snp_makeConstraints { (make) in
+                    make.left.equalTo(15)
+                    make.top.equalTo(threeCardView.snp_bottom).offset(12)
+                    make.size.equalTo(16)
+                }
+                skittlesTitleLabel.snp_makeConstraints { (make) in
+                    make.left.equalTo(skittlesImageView.snp_right).offset(2)
+                    make.centerY.equalTo(skittlesImageView)
+                }
+                break
+            case .collection?:
+                timeStatusLabel.text = "2天前 收藏"
+                oneCardView.isHidden = true
+                twoCardView.isHidden = true
+                threeCardView.isHidden = false
+                skittlesImageView.isHidden = false
+                skittlesTitleLabel.isHidden = false
+                skittlesImageView.snp_makeConstraints { (make) in
+                    make.left.equalTo(15)
+                    make.top.equalTo(threeCardView.snp_bottom).offset(12)
+                    make.size.equalTo(16)
+                }
+                skittlesTitleLabel.snp_makeConstraints { (make) in
+                    make.left.equalTo(skittlesImageView.snp_right).offset(2)
+                    make.centerY.equalTo(skittlesImageView)
+                }
+                break
+            default:
+                break
+            }
+        }
+    }
+    
+    var followType: FollowType! {
+        didSet {
+            switch followType {
+            case .futureFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kThemeColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+                
+                break
+            case .alreadyFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kf7f8faColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kf7f8faColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+                break
+            case .mutualFollow?:
+                followButton.setTitle("互相关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(nil, for: UIControl.State.normal)
+                followButton.layer.borderColor = kccccccColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
+                
+                break
+            default:
+                break
+            }
+        }
+    }
+    
+}

+ 164 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/RecommendFollow/CommunityRecommendFollowCollectionViewCell.swift

@@ -0,0 +1,164 @@
+//
+//  CommunityRecommendFollowCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class CommunityRecommendFollowCollectionViewCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    typealias FollowClosure = () -> Void
+    var followClosure : FollowClosure?
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> CommunityRecommendFollowCollectionViewCell {
+        let ID = "CommunityRecommendFollowCollectionViewCell"
+        collectionView.register(CommunityRecommendFollowCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : CommunityRecommendFollowCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! CommunityRecommendFollowCollectionViewCell
+        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")
+    }
+    
+    //MARK: - 设置view
+    private func setupViews() {
+        self.layer.borderColor = ke6e6e6Color.cgColor
+        self.layer.borderWidth = 1
+        self.layer.cornerRadius = 4
+        self.layer.masksToBounds = true
+        self.backgroundColor = .white
+        addSubview(avatarButton)
+        addSubview(titleButton)
+        addSubview(topicLabel)
+        addSubview(followButton)
+    }
+    
+    private func setupLayouts() {
+        avatarButton.snp_makeConstraints { (make) in
+            make.top.equalTo(16)
+            make.centerX.equalToSuperview()
+            make.size.equalTo(60)
+        }
+        titleButton.snp_makeConstraints { (make) in
+            make.top.equalTo(avatarButton.snp_bottom).offset(12)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(23)
+        }
+        
+        topicLabel.snp_makeConstraints { (make) in
+            make.top.equalTo(titleButton.snp_bottom).offset(4)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(19)
+        }
+        
+        followButton.snp_makeConstraints { (make) in
+            make.top.equalTo(topicLabel.snp_bottom).offset(16)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(26)
+            make.width.equalTo(90)
+        }
+        
+    }
+    
+    private lazy var avatarButton: UIButton = {
+        let avatarButton = UIButton(type: UIButton.ButtonType.custom)
+        avatarButton.setImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
+        avatarButton.imageView?.contentMode = .scaleAspectFit
+        avatarButton.cornerRadius = 30
+        avatarButton.masksToBounds = true
+        avatarButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+
+        }).disposed(by: disposeBag)
+        return avatarButton
+    }()
+    
+    private lazy var titleButton: UIButton = {
+        let titleButton = UIButton(type: UIButton.ButtonType.custom)
+        titleButton.setTitle("用户昵称", for: UIControl.State.normal)
+        titleButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        titleButton.titleLabel?.font = kBoldFont16
+        titleButton.rx.tap.subscribe(onNext: { (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityUser"), object: nil)
+        }).disposed(by: disposeBag)
+        return titleButton
+    }()
+    
+    private lazy var topicLabel: UILabel = {
+        let topicLabel = UILabel()
+        topicLabel.text = "#话题"
+        topicLabel.textColor = k999999Color
+        topicLabel.font = kRegularFont13
+        return topicLabel
+    }()
+    
+    private lazy var followButton: UIButton = {
+        let followButton = UIButton(type: UIButton.ButtonType.custom)
+        followButton.titleLabel?.font = kBoldFont16
+        followButton.layer.cornerRadius = 13
+        followButton.layer.masksToBounds = true
+        followButton.layer.borderWidth = 1
+        followButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            if let followClosure = self?.followClosure {
+                followClosure()
+            }
+        }).disposed(by: disposeBag)
+        return followButton
+    }()
+    
+    var followType: FollowType! {
+        didSet {
+            switch followType {
+            case .futureFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "shopping_cart_trade_finish"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kThemeColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+
+                break
+            case .alreadyFollow?:
+                followButton.setTitle("关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(kImage(name: "shopping_cart_trade_finish"), for: UIControl.State.normal)
+                followButton.layer.borderColor = kf7f8faColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kf7f8faColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
+                break
+            case .mutualFollow?:
+                followButton.setTitle("互相关注", for: UIControl.State.normal)
+                followButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+                followButton.setImage(nil, for: UIControl.State.normal)
+                followButton.layer.borderColor = kccccccColor.cgColor
+                followButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+                followButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 0)
+
+                break
+            default:
+                break
+            }
+        }
+    }
+}

+ 107 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Cell/RecommendFollow/CommunityRecommendFollowTableViewCell.swift

@@ -0,0 +1,107 @@
+//
+//  CommunityRecommendFollowTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityRecommendFollowTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CommunityRecommendFollowTableViewCell {
+        let ID = "CommunityRecommendFollowTableViewCell"
+        tableView.register(CommunityRecommendFollowTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CommunityRecommendFollowTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CommunityRecommendFollowTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        
+        addSubview(collectionView)
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 191), collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kf7f8faColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.cornerRadius = 4
+        collectionView.masksToBounds = true
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 8
+        collectionViewLayout.minimumInteritemSpacing = 0
+        collectionViewLayout.itemSize = CGSize(width:140, height: 191)
+        collectionViewLayout.sectionInset = UIEdgeInsets(top: 0, left: 14, bottom: 0, right: 14)
+        collectionViewLayout.scrollDirection = .horizontal
+        return collectionViewLayout
+    }()
+    
+    
+    /// 关注接口
+    func followData(indexPath: IndexPath) {
+        collectionView.reloadItems(at: [indexPath])
+    }
+
+}
+
+extension CommunityRecommendFollowTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return 20
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = CommunityRecommendFollowCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        //关注状态
+        cell.followClosure = {
+            [weak self] in
+            self?.followData(indexPath: indexPath)
+        }
+        if indexPath.row % 3 == 0 {
+            cell.followType = .futureFollow
+        }
+        if indexPath.row % 3 == 1 {
+            cell.followType = .alreadyFollow
+        }
+        if indexPath.row % 3 == 2 {
+            cell.followType = .mutualFollow
+        }
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+
+    }
+    
+}
+

+ 83 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Header/CommunityCommonSectionHeaderView.swift

@@ -0,0 +1,83 @@
+//
+//  CommunityCommonSectionHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+
+/// 分区类型
+///
+/// - recommendFollow: 推荐关注
+/// - featuredTopics: 精选话题
+/// - popularVideo: 热门视频
+enum CommunityCommonSectionHeaderViewType {
+    case recommendFollow
+    case featuredTopics
+    case popularVideo
+}
+
+class CommunityCommonSectionHeaderView: BaseView {
+
+    override func setupViews() {
+        addSubview(titleLabel)
+        addSubview(lookAllButton)
+    }
+    
+    override func setupLayouts() {
+        titleLabel.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalTo(14)
+        }
+        lookAllButton.snp.makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+        
+    }
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont18
+        return titleLabel
+    }()
+    
+    private lazy var lookAllButton: UIButton = {
+        let lookAllButton = UIButton(type: UIButton.ButtonType.custom)
+        lookAllButton.setTitle("查看全部", for: UIControl.State.normal)
+        lookAllButton.setTitleColor(k666666Color, for: UIControl.State.normal)
+        lookAllButton.titleLabel?.font = kRegularFont13
+        lookAllButton.isHidden = true
+        lookAllButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityLookAll"), object: nil)
+        }).disposed(by: disposeBag)
+        return lookAllButton
+    }()
+    
+    var communityCommonSectionHeaderViewType: CommunityCommonSectionHeaderViewType? {
+        didSet {
+            switch communityCommonSectionHeaderViewType {
+            case .recommendFollow?:
+                titleLabel.text = "推荐关注"
+                lookAllButton.isHidden = false
+                break
+            case .featuredTopics?:
+                titleLabel.text = "精选话题"
+                lookAllButton.isHidden = true
+                break
+            case .popularVideo?:
+                titleLabel.text = "热门视频"
+                lookAllButton.isHidden = false
+                break
+            default:
+                break
+            }
+        }
+    }
+
+}

+ 82 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/Header/CommunityFollowTableHeaderView.swift

@@ -0,0 +1,82 @@
+//
+//  CommunityFollowTableHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CommunityFollowTableHeaderView: BaseView {
+
+    override func setupViews() {
+        addSubview(bgView)
+        bgView.addSubview(iconImageView)
+        bgView.addSubview(infoLabel)
+        bgView.addSubview(findFriendsButton)
+    }
+    
+    override func setupLayouts() {
+        bgView.snp_makeConstraints { (make) in
+            make.top.equalTo(12)
+            make.left.right.bottom.equalToSuperview()
+        }
+        iconImageView.snp_makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.centerX.equalToSuperview()
+        }
+        infoLabel.snp_makeConstraints { (make) in
+            make.top.equalTo(iconImageView.snp_bottom).offset(20)
+            make.left.right.equalToSuperview()
+        }
+        findFriendsButton.snp_makeConstraints { (make) in
+            make.top.equalTo(infoLabel.snp_bottom).offset(20)
+            make.height.equalTo(32)
+            make.right.equalTo(-98)
+            make.left.equalTo(98)
+        }
+    }
+    
+    private lazy var bgView: UIView = {
+        let bgView = UIView()
+        bgView.backgroundColor = .white
+        return bgView
+    }()
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "pic_preload")
+        return iconImageView
+    }()
+    
+    private lazy var infoLabel: UILabel = {
+        let infoLabel = UILabel()
+        infoLabel.text = ""
+        infoLabel.textColor = k666666Color
+        infoLabel.font = kRegularFont14
+        infoLabel.numberOfLines = 0
+        let str = "关注其他彩虹居民后\n可以在这里浏览他们的美好瞬间!"
+        let attributeString = NSMutableAttributedString(string:str)
+        attributeString.changeAllLineSpacing(5)
+        infoLabel.attributedText = attributeString
+        infoLabel.textAlignment = .center
+        return infoLabel
+    }()
+    
+    private lazy var findFriendsButton: UIButton = {
+        let findFriendsButton = UIButton(type: UIButton.ButtonType.custom)
+        findFriendsButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for: UIControl.State.normal)
+        findFriendsButton.setTitle("找朋友", for: UIControl.State.normal)
+        findFriendsButton.setTitleColor(.white, for: UIControl.State.normal)
+        findFriendsButton.titleLabel?.font = kBoldFont16
+        findFriendsButton.cornerRadius = 16
+        findFriendsButton.masksToBounds = true
+        findFriendsButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "CommunityFindFriends"), object: nil)
+        }).disposed(by: disposeBag)
+        return findFriendsButton
+    }()
+
+}

+ 35 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/CommunityEnum.swift

@@ -0,0 +1,35 @@
+//
+//  CommunityEnum.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/12.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+/// 关注类型
+///
+/// - futureFollow: 未关注
+/// - alreadyFollow: 已关注
+/// - mutualFollow: 互相关注
+enum FollowType {
+    case futureFollow
+    case alreadyFollow
+    case mutualFollow
+}
+
+/// 用户状态类型
+///
+/// - follow: 关注
+/// - comment: 评论
+/// - forward: 转发
+/// - like: 点赞
+/// - collection: 收藏
+enum FollowUserStatus {
+    case follow
+    case comment
+    case forward
+    case like
+    case collection
+}

+ 215 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/CommunityListViewController.swift

@@ -8,24 +8,239 @@
 
 import UIKit
 import JXSegmentedView
+
+/// 控制器类型
+///
+/// - follow: 关注
+/// - Recommend: 推荐
+enum CommunityListVCType : Int {
+    case follow = 0
+    case recommend = 1
+}
 class CommunityListViewController: UIViewController {
     
+    var communityListVCType : CommunityListVCType!
     
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
         setupLayouts()
+        setupData()
     }
     
     func setupViews() {
         view.backgroundColor = kf7f8faColor
+        view.addSubview(tableView)
+        let emptyView = DIYEmptyView.empty(with: kImage(name: "page04"), titleStr: nil, detailStr: "当前暂无数据")
+        emptyView!.contentViewY = kScaleValue(value: 182)
+        switch communityListVCType {
+        case .follow?:
+            tableView.tableHeaderView = followTableHeaderView
+            break
+        case .recommend?:
+            tableView.ly_emptyView = emptyView
+            break
+        default:
+            break
+        }
     }
     
     func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(kScreenHeight-48-kNavBarTotalHeight-kTabBarTotalHeight)
+        }
+    }
+    
+    func setupData() {
+        //下拉刷新
+        tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) { (page) in
+            
+        }
+        tableView.addFooterWithWithHeader(withAutomaticallyRefresh: false) { (page) in
+            
+        }
     }
+    
+    private lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+    private lazy var followTableHeaderView: CommunityFollowTableHeaderView = {
+        let followTableHeaderView = CommunityFollowTableHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 286))
+        return followTableHeaderView
+    }()
+    
 
 }
 
+extension CommunityListViewController : UITableViewDelegate,UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        switch communityListVCType {
+        case .follow?:
+            return 8
+        case .recommend?:
+            return 0
+        default:
+            return 0
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        switch communityListVCType {
+        case .follow?:
+             return 1
+        case .recommend?:
+            return 0
+        default:
+            return 0
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch communityListVCType {
+        case .follow?:
+            switch indexPath.section {
+            case 0:
+                let cell = CommunityRecommendFollowTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                return cell
+            case 1:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .follow
+                cell.followType = .futureFollow
+                return cell
+            case 2:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .follow
+                cell.followType = .alreadyFollow
+                return cell
+            case 3:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .follow
+                cell.followType = .mutualFollow
+                return cell
+            case 4:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .comment
+                return cell
+            case 5:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .forward
+                return cell
+            case 6:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .like
+                return cell
+            case 7:
+                let cell = CommunityFollowStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                cell.followUserStatus = .collection
+                return cell
+            default:
+                return UITableViewCell()
+            }
+        case .recommend?:
+            return UITableViewCell()
+        default:
+            return UITableViewCell()
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        switch communityListVCType {
+        case .follow?:
+            switch indexPath.section {
+            case 0:
+                return 191
+            case 1:
+                return 160
+            case 2:
+                return 160
+            case 3:
+                return 160
+            case 4:
+                return 193
+            case 5:
+                return 182
+            case 6:
+                return 182
+            case 7:
+                return 182
+                
+            default:
+                return 0
+            }
+        case .recommend?:
+            return 0
+        default:
+            return 0
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        switch communityListVCType {
+        case .follow?:
+            switch section {
+            case 0:
+                return 62
+            default:
+                return 0
+            }
+        case .recommend?:
+            return 0
+        default:
+            return 0
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        switch communityListVCType {
+        case .follow?:
+            switch section {
+            case 0:
+                return 20
+            default:
+                return 10
+            }
+        case .recommend?:
+            return 0
+        default:
+            return 0
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        switch communityListVCType {
+        case .follow?:
+            switch section {
+            case 0:
+                let headerView = CommunityCommonSectionHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 62))
+                headerView.communityCommonSectionHeaderViewType = .recommendFollow
+                return headerView
+            default:
+                return nil
+            }
+        case .recommend?:
+            return nil
+        default:
+            return nil
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+}
+
 extension CommunityListViewController : JXSegmentedListContainerViewListDelegate {
     func listView() -> UIView {
         return view

+ 25 - 0
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/CommunityViewController.swift

@@ -11,6 +11,13 @@ import JXSegmentedView
 
 class CommunityViewController: BaseViewController {
     
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
@@ -60,6 +67,23 @@ class CommunityViewController: BaseViewController {
         communityNavigationBarView.rightButton.rx.tap.subscribe(onNext: { (data) in
             
         }).disposed(by: disposeBag)
+        
+        // 找朋友
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityFindFriends"), object: nil, queue: OperationQueue.main) {(notification) in
+           
+        }
+        
+        // 查看全部
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityLookAll"), object: nil, queue: OperationQueue.main) {(notification) in
+            
+        }
+        
+        // 查看其他用户中心
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityUser"), object: nil, queue: OperationQueue.main) {(notification) in
+            
+        }
+        
+        
     }
     
     
@@ -159,6 +183,7 @@ extension CommunityViewController :JXSegmentedListContainerViewDataSource {
     }
     func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
         let vc = CommunityListViewController()
+        vc.communityListVCType = CommunityListVCType(rawValue: index)
         return vc
     }
 }

+ 1 - 0
RainbowPlanet/RainbowPlanet/Tools/MJRefreshEX/UIScrollView+MJRefreshEX.m

@@ -40,6 +40,7 @@ typedef void(^LoadMoreBlock)(NSInteger pageIndex);
         [weakSelf endHeaderRefresh];
     }];
     
+    
     if (beginRefresh && animation) {
         //有动画的刷新
         [self resetPageNum];