南鑫林 5 rokov pred
rodič
commit
2b7b682477
15 zmenil súbory, kde vykonal 611 pridanie a 1183 odobranie
  1. 8 4
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 16 0
      RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift
  3. 0 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/CommunityNavigationBarView.swift
  4. 46 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift
  5. 44 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/View/CommunityFeaturedTopicsHeaderView.swift
  6. 194 1141
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift
  7. 39 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/View/CommunityMyFollowTopicCell.swift
  8. 78 10
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/ViewController/CommunityMyFollowTopicController.swift
  9. 55 0
      RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityMemberFollowTopicListModel.swift
  10. 2 0
      RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityRecommendFeedModel.swift
  11. 34 0
      RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityTopicDetailModel.swift
  12. 54 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift
  13. 39 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift
  14. 2 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift
  15. 0 13
      RainbowPlanet/RainbowPlanet/Tools/ImageSizeFetcher.swift

+ 8 - 4
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -75,6 +75,8 @@
 		A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71AF0BB226F099B001730FE /* ProductHBigTableViewCell.swift */; };
 		A71AF0BE226F1792001730FE /* ShoppingMallModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A71AF0BD226F1792001730FE /* ShoppingMallModule.xcassets */; };
 		A71CAB3722C9A40A00D908A8 /* TotalBeanModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB3622C9A40A00D908A8 /* TotalBeanModel.swift */; };
+		A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB3822C9DF0600D908A8 /* CommunityTopicDetailModel.swift */; };
+		A71CAB3B22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71CAB3A22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift */; };
 		A71D2A602265673A00A55D16 /* RegisterLoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71D2A5F2265673A00A55D16 /* RegisterLoginView.swift */; };
 		A72623D322C1FFD100AEF875 /* CommunityPostMyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72623D222C1FFD100AEF875 /* CommunityPostMyModel.swift */; };
 		A72623D522C2646200AEF875 /* MessageIndexModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A72623D422C2646200AEF875 /* MessageIndexModel.swift */; };
@@ -278,7 +280,6 @@
 		A7AA9F6322C62B270086498B /* CommunityRecommnendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AA9F6222C62B270086498B /* CommunityRecommnendViewController.swift */; };
 		A7AA9F6522C63DCD0086498B /* CommunityFollowFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AA9F6422C63DCD0086498B /* CommunityFollowFeedModel.swift */; };
 		A7AA9F6722C640F10086498B /* CommunityRecommendFeedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AA9F6622C640F10086498B /* CommunityRecommendFeedModel.swift */; };
-		A7AA9FA322C7A5260086498B /* ImageSizeFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7AA9FA222C7A5260086498B /* ImageSizeFetcher.swift */; };
 		A7B4E71F228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E71E228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift */; };
 		A7B4E721228151F40012914A /* ProductFloorTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E720228151F40012914A /* ProductFloorTitleView.swift */; };
 		A7B4E723228154750012914A /* ProductFloorBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E722228154750012914A /* ProductFloorBannerView.swift */; };
@@ -726,6 +727,8 @@
 		A71AF0BB226F099B001730FE /* ProductHBigTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductHBigTableViewCell.swift; sourceTree = "<group>"; };
 		A71AF0BD226F1792001730FE /* ShoppingMallModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingMallModule.xcassets; sourceTree = "<group>"; };
 		A71CAB3622C9A40A00D908A8 /* TotalBeanModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TotalBeanModel.swift; sourceTree = "<group>"; };
+		A71CAB3822C9DF0600D908A8 /* CommunityTopicDetailModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityTopicDetailModel.swift; sourceTree = "<group>"; };
+		A71CAB3A22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityMemberFollowTopicListModel.swift; sourceTree = "<group>"; };
 		A71D2A5F2265673A00A55D16 /* RegisterLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterLoginView.swift; sourceTree = "<group>"; };
 		A72623D222C1FFD100AEF875 /* CommunityPostMyModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityPostMyModel.swift; sourceTree = "<group>"; };
 		A72623D422C2646200AEF875 /* MessageIndexModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageIndexModel.swift; sourceTree = "<group>"; };
@@ -946,7 +949,6 @@
 		A7AA9F6222C62B270086498B /* CommunityRecommnendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRecommnendViewController.swift; sourceTree = "<group>"; };
 		A7AA9F6422C63DCD0086498B /* CommunityFollowFeedModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityFollowFeedModel.swift; sourceTree = "<group>"; };
 		A7AA9F6622C640F10086498B /* CommunityRecommendFeedModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityRecommendFeedModel.swift; sourceTree = "<group>"; };
-		A7AA9FA222C7A5260086498B /* ImageSizeFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageSizeFetcher.swift; sourceTree = "<group>"; };
 		A7B4E71E228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductSlidingLeftRightCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7B4E720228151F40012914A /* ProductFloorTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductFloorTitleView.swift; sourceTree = "<group>"; };
 		A7B4E722228154750012914A /* ProductFloorBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductFloorBannerView.swift; sourceTree = "<group>"; };
@@ -2964,7 +2966,6 @@
 				A72A727722321DDF00B21995 /* Regex */,
 				A77F2CC422320627001BD3F6 /* WRNavigationBar */,
 				A72A729F22321DE000B21995 /* WKWebView */,
-				A7AA9FA222C7A5260086498B /* ImageSizeFetcher.swift */,
 			);
 			path = Tools;
 			sourceTree = "<group>";
@@ -3841,6 +3842,8 @@
 				A72623E822C4AFF200AEF875 /* CommunityTopicsModel.swift */,
 				A7AA9F6422C63DCD0086498B /* CommunityFollowFeedModel.swift */,
 				A7AA9F6622C640F10086498B /* CommunityRecommendFeedModel.swift */,
+				A71CAB3822C9DF0600D908A8 /* CommunityTopicDetailModel.swift */,
+				A71CAB3A22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift */,
 			);
 			path = CommunityModel;
 			sourceTree = "<group>";
@@ -5645,6 +5648,7 @@
 				BD61229322C3605C00D3F513 /* AliyunEffectResourceModel.m in Sources */,
 				A7A98DFF227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift in Sources */,
 				BD61227422C35A9500D3F513 /* AliyunImage.m in Sources */,
+				A71CAB3B22C9F21100D908A8 /* CommunityMemberFollowTopicListModel.swift in Sources */,
 				BDE376D922C22A260055E2EA /* UIColor+AlivcHelper.m in Sources */,
 				BD0FAA3722C465B900DDFB37 /* AliyunEditViewController.m in Sources */,
 				BDDF3B28228EBB72003A7D16 /* ProductRefundReasonModel.swift in Sources */,
@@ -6003,6 +6007,7 @@
 				A7C0FDEE22B6516A00BC1E86 /* CommunityBannerTableViewCell.swift in Sources */,
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
 				BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */,
+				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
 				BD6122D322C364E400D3F513 /* AliyunMusicPickCell.m in Sources */,
 				A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */,
 				BD108C9622A60C2100837DAB /* HGImagePickerCell.swift in Sources */,
@@ -6056,7 +6061,6 @@
 				BD6122E922C3654500D3F513 /* AliyunTimelineTimeFilterItem.m in Sources */,
 				A729B5B42267254B004AE098 /* PasswordLoginViewController.swift in Sources */,
 				A7B4E7582282897B0012914A /* ProductFloorLeftHeaderCollectionReusableView.swift in Sources */,
-				A7AA9FA322C7A5260086498B /* ImageSizeFetcher.swift in Sources */,
 				A7D4608E227616F800A5A54E /* SQLiteManager.swift in Sources */,
 				A70B2C6B2288815300B2449F /* PickHeaderView.swift in Sources */,
 				A7274C50228EE5F0000E3A07 /* PhotoAndCameraManager.swift in Sources */,

+ 16 - 0
RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift

@@ -179,3 +179,19 @@ enum CommunityType {
     case recommend
     case planet
 }
+
+
+/// 社区banner类型
+///
+/// - none: 纯展示
+/// - content: 内容
+/// - user: 用户
+/// - activity: 活动
+/// - topic: 话题
+enum CommunityBannerType : Int {
+    case none = 0
+    case content = 1
+    case user = 2
+    case activity = 3
+    case topic = 4
+}

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/CommunityNavigationBarView.swift

@@ -89,7 +89,6 @@ class CommunityNavigationBarView: BaseView {
     }()
     
     lazy var scrollNumberLabel: DPScrollNumberLabel = {
-//        let scrollNumberLabel = DPScrollNumberLabel.init(number: 0, font: kMediumFont16, textColor: kFFA42FColor, signSetting: SignSetting.unsigned)
         let scrollNumberLabel = DPScrollNumberLabel.init(number: 0, fontSize: 16, textColor: kFFA42FColor, signSetting: SignSetting.unsigned)
 
         return scrollNumberLabel!

+ 46 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/Main/CommunityViewController.swift

@@ -99,8 +99,52 @@ class CommunityViewController: BaseViewController {
         }
         
         // banner跳转
-        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityBannerClosure"), object: nil, queue: OperationQueue.main) {(notification) in
-            
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("CommunityBannerClosure"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
+            let communityRecommendTypeDataModel = notification.object as? CommunityRecommendTypeDataModel
+            let communityBannerType = CommunityBannerType(rawValue: communityRecommendTypeDataModel?.type ?? 0)
+            switch communityBannerType {
+            case .none?:
+                break
+            case .content?: //内容
+                let postType = PostType(rawValue: communityRecommendTypeDataModel?.postType ?? "image")
+                switch postType {
+                case .image?:
+                    let vc = CommunityRecommendController()
+                    self?.navigationController?.pushViewController(vc, animated: true)
+                    break
+                case .html?:
+                    let vc = CommunityRecommendController()
+                    self?.navigationController?.pushViewController(vc, animated: true)
+                    break
+                case .video?:
+                    break
+                default:
+                    break
+                }
+                break
+            case .user?: //找朋友
+                if communityRecommendTypeDataModel?.linkContentId != UserModel.shared().getModel()?.uid {
+                    let vc = OtherPersonalCenterViewController()
+                    vc.uid = communityRecommendTypeDataModel?.linkContentId ?? 0
+                    self?.navigationController?.pushViewController(vc, animated: true)
+                }
+                
+                break
+            case .activity?: //活动
+                let url = kH5ActivityUrl + "id=\(communityRecommendTypeDataModel?.linkContentId ?? 0)"
+                let vc = BaseWebViewController()
+                vc.URLString = url
+                self?.navigationController?.pushViewController(vc, animated: true)
+                break
+            case .topic?: //话题
+                let vc = CommunityFeaturedTopicsViewController()
+                vc.id = communityRecommendTypeDataModel?.linkContentId ?? 0
+                self?.navigationController?.pushViewController(vc, animated: true)
+                break
+            default:
+                break
+                
+            }
         }
         
         // 精选话题

+ 44 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/View/CommunityFeaturedTopicsHeaderView.swift

@@ -61,8 +61,6 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
     private lazy var followButton: UIButton = {
         let followButton = UIButton(type: UIButton.ButtonType.custom)
         followButton.setTitle("关注话题", for: UIControl.State.normal)
-        followButton.setImage(kImage(name: "center_attention_white"), for: UIControl.State.normal)
-        followButton.setImage(kImage(name: "center_followed_white"), for: UIControl.State.selected)
         followButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for:  UIControl.State.normal)
         followButton.setBackgroundImage(UIImage.imageWithColor(color: UIColor.clear), for: UIControl.State.selected)
         followButton.titleLabel?.font = kMediumFont13
@@ -87,5 +85,49 @@ class CommunityFeaturedTopicsHeaderView: BaseView {
         bottomView.layer.mask = shapeLayer
         return bottomView
     }()
+    
+    var communityTopicDetailModel : CommunityTopicDetailModel? {
+        didSet {
+            numberPeopleLabel.text = "\(communityTopicDetailModel?.followCount ?? 0)位彩虹居民参与此话题"
+            topicLabel.text = communityTopicDetailModel?.name
+            followType = FollowType(rawValue: communityTopicDetailModel?.isFollow ?? 0)
+        }
+    }
+    
+    
+    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: "star_attention"), 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: "star_followed"), 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
+            }
+        }
+    }
 
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 194 - 1141
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift


+ 39 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/View/CommunityMyFollowTopicCell.swift

@@ -64,6 +64,7 @@ class CommunityMyFollowTopicCell: UITableViewCell {
             make.width.equalTo(64)
             make.height.equalTo(26)
         }
+        focusButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 2)
         sepView.snp.makeConstraints { (make) in
             make.left.equalTo(titleLabel.snp_left)
             make.right.equalTo(focusButton.snp_right)
@@ -83,8 +84,18 @@ class CommunityMyFollowTopicCell: UITableViewCell {
     
     private lazy var focusButton: UIButton = {
         let focusButton = UIButton(type: UIButton.ButtonType.custom)
-        focusButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
-        focusButton.setImage(kImage(name: "common_check_icon"), for: UIControl.State.selected)
+        focusButton.setImage(kImage(name: "star_attention"), for: UIControl.State.normal)
+        focusButton.setImage(kImage(name: "star_followed"), for: UIControl.State.selected)
+        focusButton.setTitleColor(k666666Color, for: UIControl.State.selected)
+        focusButton.setTitleColor(kThemeColor, for: UIControl.State.normal)
+        focusButton.setTitle("关注", for: UIControl.State.normal)
+        focusButton.setTitle("关注", for: UIControl.State.selected)
+        focusButton.titleLabel?.font = kMediumFont13
+        focusButton.setBackgroundImage(UIImage.imageWithColor(color: kffffffColor), for: UIControl.State.normal)
+        focusButton.setBackgroundImage(UIImage.imageWithColor(color: kf7f8faColor), for: UIControl.State.selected)
+        focusButton.layer.borderWidth = 1
+        focusButton.cornerRadius = 13
+        focusButton.masksToBounds = true
         focusButton.rx.tap.subscribe(onNext: { [weak self] (data) in
             focusButton.isSelected = !focusButton.isSelected
             if let focusClickClosure = self?.focusClickClosure {
@@ -102,4 +113,30 @@ class CommunityMyFollowTopicCell: UITableViewCell {
         return sepView
     }()
     
+    var communityMemberFollowTopicListDataModel: CommunityMemberFollowTopicListDataModel? {
+        didSet {
+            titleLabel.text = communityMemberFollowTopicListDataModel?.topicName
+            isFollow()
+        }
+    }
+    
+    
+    
+}
+
+
+extension CommunityMyFollowTopicCell {
+    func isFollow() {
+        if communityMemberFollowTopicListDataModel?.isFollow == 1 {
+            focusButton.isSelected = true
+            focusButton.layer.borderColor = kf7f8faColor.cgColor
+        }else {
+            focusButton.isSelected = false
+            focusButton.layer.borderColor = kThemeColor.cgColor
+        }
+    }
+}
+
+extension CommunityMyFollowTopicCell {
+    
 }

+ 78 - 10
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityMyFollowTopic/ViewController/CommunityMyFollowTopicController.swift

@@ -10,29 +10,61 @@ import UIKit
 
 class CommunityMyFollowTopicController: BaseViewController {
     
+    var communityMemberFollowTopicListDataModels = Array<CommunityMemberFollowTopicListDataModel>()
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
         setupLayouts()
+        setupData()
         
     }
     
     override func setupViews() {
         navigationBar.title = "我的关注话题"
         view.backgroundColor = kf7f8faColor
-        
         view.addSubview(tableView)
     }
     
     override func setupLayouts() {
         tableView.snp.makeConstraints { (make) in
             make.top.equalToSuperview().offset(kNavBarTotalHeight)
-            make.left.right.bottom.equalTo(0)
+            make.left.right.equalTo(0)
+            make.height.equalTo(kScreenHeight-kNavBarTotalHeight-kSafeTabBarHeight)
+        }
+        
+        if #available(iOS 11.0, *) {
+            tableView.contentInsetAdjustmentBehavior =  .never
         }
     }
     
     override func setupData() {
         
+        let emptyView = DIYEmptyView.emptyActionView(withImageStr: "default_page_topic", titleStr: nil, detailStr: "暂无关注,去发现好玩的话题吧", btnTitleStr: "去首页") {
+            [weak self] in
+            self?.tabBarController?.selectedIndex = 0
+            self?.navigationController?.popToRootViewController(animated: false)
+        }
+        emptyView?.actionBtnHorizontalMargin = 58
+        emptyView?.contentViewY = kScaleValue(value: 164)
+        emptyView?.subViewMargin = 20
+        emptyView?.actionBtnFont = kBoldFont16
+        emptyView?.actionBtnHeight = 32
+        emptyView?.actionBtnCornerRadius = 32/2
+        emptyView?.actionBtnTitleColor = kffffffColor
+        emptyView?.actionBtnBackGroundColor = kThemeColor
+        emptyView?.detailLabFont = kRegularFont14
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+        
+        tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) {
+            [weak self] (page) in
+            self?.communityMemberFollowTopicListApi(page: page)
+        }
+        tableView.addFooterWithWithHeader(withAutomaticallyRefresh: false) {
+            [weak self] (page) in
+            self?.communityMemberFollowTopicListApi(page: page)
+        }
     }
     
     lazy var tableView: UITableView = {
@@ -41,29 +73,53 @@ class CommunityMyFollowTopicController: BaseViewController {
         tableView.backgroundColor = kf7f8faColor
         tableView.dataSource = self
         tableView.delegate = self
-        tableView.estimatedRowHeight = 60
-        tableView.estimatedSectionFooterHeight = 0.000001
-        tableView.estimatedSectionHeaderHeight = 0.000001
+        tableView.rowHeight = 60
         return tableView
     }()
 }
 
+extension CommunityMyFollowTopicController {
+    //我的关注话题
+    func communityMemberFollowTopicListApi(page:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityMemberFollowTopicListApi(page: page) {
+            [weak self] (communityMemberFollowTopicListModel) -> (Void) in
+            let communityMemberFollowTopicListModel = communityMemberFollowTopicListModel as? CommunityMemberFollowTopicListModel
+            if communityMemberFollowTopicListModel?.pagination?.currentPage ?? 1  <= communityMemberFollowTopicListModel?.pagination?.totalPages ?? 1 {
+                if communityMemberFollowTopicListModel?.pagination?.currentPage == 1{
+                    self?.communityMemberFollowTopicListDataModels.removeAll()
+                }
+                self?.communityMemberFollowTopicListDataModels = (self?.communityMemberFollowTopicListDataModels)! + (communityMemberFollowTopicListModel?.data!)!
+                self?.tableView.reloadData()
+                if  self?.communityMemberFollowTopicListDataModels.count ?? 0 >= communityMemberFollowTopicListModel?.pagination?.total ?? 0 {
+                    self?.tableView.endFooterNoMoreData()
+                }
+            }else {
+                self?.tableView.endFooterNoMoreData()
+            }
+        }
+    }
+}
+
 // MARK: - tableView dataSource && delegate
 extension CommunityMyFollowTopicController: UITableViewDataSource, UITableViewDelegate {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 1
+    }
     
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        return 3
+        return communityMemberFollowTopicListDataModels.isEmpty ? 0 : communityMemberFollowTopicListDataModels.count
     }
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let cell = CommunityMyFollowTopicCell.cellWith(tableView: tableView, indexPath: indexPath)
-        cell.focusClickClosure = {
-            [weak self] (isSelected) in
-            print("当前item选中状态为\(isSelected)")
-        }
+        cell.communityMemberFollowTopicListDataModel = communityMemberFollowTopicListDataModels[indexPath.row]
         return cell
     }
     
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        tableView.deselectRow(at: indexPath, animated: true)
+    }
+    
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
         return 60
     }
@@ -72,4 +128,16 @@ extension CommunityMyFollowTopicController: UITableViewDataSource, UITableViewDe
         return 10
     }
     
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
 }

+ 55 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityMemberFollowTopicListModel.swift

@@ -0,0 +1,55 @@
+//
+//	CommunityMemberFollowTopicListModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CommunityMemberFollowTopicListModel : NSObject, Mappable{
+
+	var data : [CommunityMemberFollowTopicListDataModel]?
+	var pagination : PaginationModel?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CommunityMemberFollowTopicListModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		data <- map["data"]
+		pagination <- map["pagination"]
+		
+	}
+}
+
+class CommunityMemberFollowTopicListDataModel : NSObject, Mappable{
+    
+    var id : Int?
+    var isSuggest : Int?
+    var topicId : Int?
+    var topicName : String?
+    var uid : Int?
+    var isFollow : Int = 1
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityMemberFollowTopicListDataModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        id <- map["id"]
+        isSuggest <- map["is_suggest"]
+        topicId <- map["topic_id"]
+        topicName <- map["topic_name"]
+        uid <- map["uid"]
+        
+    }
+}
+

+ 2 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityRecommendFeedModel.swift

@@ -101,6 +101,7 @@ class CommunityRecommendTypeDataModel : NSObject, Mappable{
     // banner
     var image : String?
     var linkContentId : Int?
+    var postType : String?
     var type : Int?
     
     // 推荐关注/推荐视频 公共
@@ -132,6 +133,7 @@ class CommunityRecommendTypeDataModel : NSObject, Mappable{
         image <- map["image"]
         linkContentId <- map["link_content_id"]
         type <- map["type"]
+        postType <- map["post_type"]
         
         // 推荐关注/推荐视频 公共
         uid <- map["uid"]

+ 34 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CommunityModel/CommunityTopicDetailModel.swift

@@ -0,0 +1,34 @@
+//
+//	CommunityTopicDetailModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CommunityTopicDetailModel : NSObject, Mappable{
+
+	var followCount : Int?
+	var id : Int?
+	var img : String?
+	var isFollow : Int?
+	var name : String?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CommunityTopicDetailModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		followCount <- map["follow_count"]
+		id <- map["id"]
+		img <- map["img"]
+		isFollow <- map["is_follow"]
+		name <- map["name"]
+		
+	}
+
+}

+ 54 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift

@@ -34,9 +34,9 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
         var parameters = Dictionary<String,Any>()
         parameters.updateValue(isSuggest, forKey: "is_suggest")
         parameters.updateValue(page, forKey: "page")
-//        SwiftProgressHUD.shared().showWait()
+        SwiftProgressHUD.shared().showWait()
         SwiftMoyaNetWorkManager.shared.requestObject(CommunityTopicCategoryModel.self,target: MultiTarget(SwiftMoyaServiceCommunityApi.communityTopicCategory(parameters: parameters))) { (communityTopicCategoryModel) in
-//            SwiftProgressHUD.shared().hide()
+            SwiftProgressHUD.shared().hide()
             completion(communityTopicCategoryModel)
         }
     }
@@ -146,5 +146,57 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
             completion(communityRecommendFeedModel)
         }
     }
+    
+    
+    /// 话题详情
+    ///
+    /// - Parameters:
+    ///   - id: 话题Id
+    ///   - completion: 回调
+    func communityTopicDetailApi(id:Int,completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(id, forKey: "id")
+        SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityTopicDetailModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityTopicDetail(parameters: parameters))) {  (communityTopicDetailModel) in
+            SwiftProgressHUD.shared().hide()
+            completion(communityTopicDetailModel)
+        }
+    }
+    
+    
+    /// 话题内容列表
+    ///
+    /// - Parameters:
+    ///   - id: 话题Id
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityPostTopicApi(id:Int,page:Int = 1,completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(page, forKey: "page")
+        parameters.updateValue(id, forKey: "id")
+        SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityRecommendFeedModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityPostTopic(parameters: parameters))) {  (communityRecommendFeedModel) in
+            SwiftProgressHUD.shared().hide()
+            completion(communityRecommendFeedModel)
+        }
+    }
+    
+    
+    /// 我关注的话题列表
+    ///
+    /// - Parameters:
+    ///   - name: 话题名字
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityMemberFollowTopicListApi(name:String = "",page:Int = 1,completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(page, forKey: "page")
+        parameters.updateValue(name, forKey: "name")
+        SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityMemberFollowTopicListModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityMemberFollowTopicList(parameters: parameters))) {  (communityMemberFollowTopicListModel) in
+            SwiftProgressHUD.shared().hide()
+            completion(communityMemberFollowTopicListModel)
+        }
+    }
         
 }

+ 39 - 4
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift

@@ -37,6 +37,17 @@ public let kCommunityFollowFeedApi = "/community/feed"
 /// 推荐内容
 public let kCommunityPostSuggestApi = "/community/post/suggest"
 
+// MARK: - 话题详情
+/// 话题详情
+public let kCommunityTopicDetailApi = "/community/topic/detail"
+
+// MARK: - 话题内容列表
+/// 话题内容列表
+public let kCommunityPostTopicApi = "/community/post/topic"
+
+// MARK: - 我关注的话题列表
+/// 我关注的话题列表
+public let kCommunityMemberFollowTopicListApi = "/community/memberFollowTopic"
 
 /// 社区
 ///
@@ -47,6 +58,9 @@ public let kCommunityPostSuggestApi = "/community/post/suggest"
 /// - communityPosts: 内容列表
 /// - communityFeed: 关注页面feed流
 /// - communityPostSuggest: 关注页面feed流
+/// - communityTopicDetail: 话题详情
+/// - communityPostTopic: 话题内容列表
+/// - communityMemberFollowTopicList: 话题内容列表
 public enum SwiftMoyaServiceCommunityApi {
     case communityTopicCategory(parameters:Dictionary<String, Any>)
     case communityMemberFollowTopic(parameters:Dictionary<String, Any>)
@@ -55,6 +69,9 @@ public enum SwiftMoyaServiceCommunityApi {
     case communityPosts(parameters:Dictionary<String, Any>)
     case communityFollowFeed(parameters:Dictionary<String, Any>)
     case communityPostSuggest(parameters:Dictionary<String, Any>)
+    case communityTopicDetail(parameters:Dictionary<String, Any>)
+    case communityPostTopic(parameters:Dictionary<String, Any>)
+    case communityMemberFollowTopicList(parameters:Dictionary<String, Any>)
 }
 
 extension SwiftMoyaServiceCommunityApi: TargetType {
@@ -67,7 +84,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityTopics,
              .communityPosts,
              .communityFollowFeed,
-             .communityPostSuggest
+             .communityPostSuggest,
+             .communityTopicDetail,
+             .communityPostTopic,
+             .communityMemberFollowTopicList
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -89,6 +109,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
             return kCommunityFollowFeedApi
         case .communityPostSuggest:
             return kCommunityPostSuggestApi
+        case .communityTopicDetail:
+            return kCommunityTopicDetailApi
+        case .communityPostTopic:
+            return kCommunityPostTopicApi
+        case .communityMemberFollowTopicList:
+            return kCommunityMemberFollowTopicListApi
         }
     }
     
@@ -102,7 +128,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityTopics,
              .communityPosts,
              .communityFollowFeed,
-             .communityPostSuggest
+             .communityPostSuggest,
+             .communityTopicDetail,
+             .communityPostTopic,
+             .communityMemberFollowTopicList
             :
             return .get
             
@@ -118,7 +147,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityTopics(var parameters),
              .communityPosts(var parameters),
              .communityFollowFeed(var parameters),
-             .communityPostSuggest(var parameters)
+             .communityPostSuggest(var parameters),
+             .communityTopicDetail(var parameters),
+             .communityPostTopic(var parameters),
+             .communityMemberFollowTopicList(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -147,7 +179,10 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityTopics,
              .communityPosts,
              .communityFollowFeed,
-             .communityPostSuggest
+             .communityPostSuggest,
+             .communityTopicDetail,
+             .communityPostTopic,
+             .communityMemberFollowTopicList
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -49,8 +49,8 @@ public func kApiVirusPrefix() -> String {
     }
 }
 
-let kH5PersonalService = true
-let kH5DevelopSever = false
+let kH5PersonalService = false
+let kH5DevelopSever = true
 let kH5BetaSever = false
 let kH5ProductSever = false
 

+ 0 - 13
RainbowPlanet/RainbowPlanet/Tools/ImageSizeFetcher.swift

@@ -1,13 +0,0 @@
-//
-//  ImageSizeFetcher.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/6/29.
-//  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
-
-import UIKit
-
-class ImageSizeFetcher: NSObject {
-
-}