Quellcode durchsuchen

评论页面完成

南鑫林 vor 5 Jahren
Ursprung
Commit
a858dfda97
27 geänderte Dateien mit 2105 neuen und 42 gelöschten Zeilen
  1. 96 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 2 0
      RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift
  3. 25 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentModel.swift
  4. 31 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentReplysModel.swift
  5. 102 0
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentsModel.swift
  6. 2 2
      RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleMessagesModel.swift
  7. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListContentTableViewCell.swift
  8. 4 7
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListFooterView.swift
  9. 5 6
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListTableViewCell.swift
  10. 95 14
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentTopStepTableViewCell.swift
  11. 10 4
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/CircleLeavingMessageView.swift
  12. 130 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListCommentReplyTableViewCell.swift
  13. 135 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListCommentTableViewCell.swift
  14. 133 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListReplyTableViewCell.swift
  15. 226 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentReplyView.swift
  16. 52 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommnetListRepleyFooterView.swift
  17. 317 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/ViewController/CircleCommentListViewController.swift
  18. 123 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/View/CircleCommentReplyParentTableViewCell.swift
  19. 145 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/View/CircleCommentReplyTableViewCell.swift
  20. 272 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/ViewController/CircleCommentReplyListViewController.swift
  21. 12 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/ViewController/CircleQuestionsAnswersViewController.swift
  22. 4 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleShareContent/CircleShareContentViewController.swift
  23. 11 0
      RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleUserList/ViewController/CircleUserListViewController.swift
  24. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFeaturedTopics/ViewController/CommunityFeaturedTopicsViewController.swift
  25. 104 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaNetWorkServiceCommunity.swift
  26. 66 6
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift
  27. 1 1
      RainbowPlanet/RainbowPlanet/Tools/CommentInputView/CommentInputView.swift

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

@@ -261,6 +261,17 @@
 		A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */; };
 		A77F2CC822320627001BD3F6 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC622320627001BD3F6 /* WRCustomNavigationBar.swift */; };
 		A77F2CCA223209F2001BD3F6 /* BaseTabbarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */; };
+		A77FAEEF23583949002A1D08 /* CircleCommentListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEEE23583949002A1D08 /* CircleCommentListViewController.swift */; };
+		A77FAEF223583BB0002A1D08 /* CommunityCircleCommentsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEF123583BB0002A1D08 /* CommunityCircleCommentsModel.swift */; };
+		A77FAEF6235844BC002A1D08 /* CircleCommentListCommentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEF5235844BC002A1D08 /* CircleCommentListCommentTableViewCell.swift */; };
+		A77FAEF823584EC8002A1D08 /* CircleCommentListCommentReplyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEF723584EC8002A1D08 /* CircleCommentListCommentReplyTableViewCell.swift */; };
+		A77FAEFA23585028002A1D08 /* CircleCommentListReplyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEF923585028002A1D08 /* CircleCommentListReplyTableViewCell.swift */; };
+		A77FAEFC235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEFB235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift */; };
+		A77FAEFE2358822A002A1D08 /* CircleCommentReplyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAEFD2358822A002A1D08 /* CircleCommentReplyView.swift */; };
+		A77FAF0223595989002A1D08 /* CircleCommentReplyListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAF0123595989002A1D08 /* CircleCommentReplyListViewController.swift */; };
+		A77FAF0523595D3E002A1D08 /* CircleCommentReplyParentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAF0423595D3E002A1D08 /* CircleCommentReplyParentTableViewCell.swift */; };
+		A77FAF0723595D4A002A1D08 /* CircleCommentReplyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAF0623595D49002A1D08 /* CircleCommentReplyTableViewCell.swift */; };
+		A77FAF0923595F82002A1D08 /* CommunityCircleCommentReplysModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77FAF0823595F82002A1D08 /* CommunityCircleCommentReplysModel.swift */; };
 		A7811C81231AB05300C2D8DE /* CommunityReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C7F231AB05300C2D8DE /* CommunityReportViewController.swift */; };
 		A7811C85231AB2F600C2D8DE /* CommunityReportHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C84231AB2F600C2D8DE /* CommunityReportHeaderView.swift */; };
 		A7811C87231AB49800C2D8DE /* CommunityReportTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7811C86231AB49800C2D8DE /* CommunityReportTableViewCell.swift */; };
@@ -482,6 +493,7 @@
 		A7F6891023572D15000C313F /* CircleLeavingMessageCommentListContentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F6890F23572D15000C313F /* CircleLeavingMessageCommentListContentTableViewCell.swift */; };
 		A7F6891423572D69000C313F /* CircleLeavingMessageCommentListFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F6891323572D69000C313F /* CircleLeavingMessageCommentListFooterView.swift */; };
 		A7F68916235738EB000C313F /* CircleLeavingMessageCommentTopStepTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F68915235738EB000C313F /* CircleLeavingMessageCommentTopStepTableViewCell.swift */; };
+		A7F689182358030D000C313F /* CommunityCircleCommentModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F689172358030C000C313F /* CommunityCircleCommentModel.swift */; };
 		A7FF1577228C824300A85748 /* OrderModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7FF1576228C824300A85748 /* OrderModule.xcassets */; };
 		A7FF1598228D092A00A85748 /* OrderListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1597228D092A00A85748 /* OrderListModel.swift */; };
 		A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF159B228D9E3C00A85748 /* OrderRefundDetailModel.swift */; };
@@ -966,6 +978,17 @@
 		A77F2CC522320627001BD3F6 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRNavigationBar.swift; sourceTree = "<group>"; };
 		A77F2CC622320627001BD3F6 /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRCustomNavigationBar.swift; sourceTree = "<group>"; };
 		A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTabbarViewController.swift; sourceTree = "<group>"; };
+		A77FAEEE23583949002A1D08 /* CircleCommentListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentListViewController.swift; sourceTree = "<group>"; };
+		A77FAEF123583BB0002A1D08 /* CommunityCircleCommentsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityCircleCommentsModel.swift; sourceTree = "<group>"; };
+		A77FAEF5235844BC002A1D08 /* CircleCommentListCommentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentListCommentTableViewCell.swift; sourceTree = "<group>"; };
+		A77FAEF723584EC8002A1D08 /* CircleCommentListCommentReplyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentListCommentReplyTableViewCell.swift; sourceTree = "<group>"; };
+		A77FAEF923585028002A1D08 /* CircleCommentListReplyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentListReplyTableViewCell.swift; sourceTree = "<group>"; };
+		A77FAEFB235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommnetListRepleyFooterView.swift; sourceTree = "<group>"; };
+		A77FAEFD2358822A002A1D08 /* CircleCommentReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentReplyView.swift; sourceTree = "<group>"; };
+		A77FAF0123595989002A1D08 /* CircleCommentReplyListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentReplyListViewController.swift; sourceTree = "<group>"; };
+		A77FAF0423595D3E002A1D08 /* CircleCommentReplyParentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentReplyParentTableViewCell.swift; sourceTree = "<group>"; };
+		A77FAF0623595D49002A1D08 /* CircleCommentReplyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleCommentReplyTableViewCell.swift; sourceTree = "<group>"; };
+		A77FAF0823595F82002A1D08 /* CommunityCircleCommentReplysModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityCircleCommentReplysModel.swift; sourceTree = "<group>"; };
 		A7811C7F231AB05300C2D8DE /* CommunityReportViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportViewController.swift; sourceTree = "<group>"; };
 		A7811C84231AB2F600C2D8DE /* CommunityReportHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportHeaderView.swift; sourceTree = "<group>"; };
 		A7811C86231AB49800C2D8DE /* CommunityReportTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityReportTableViewCell.swift; sourceTree = "<group>"; };
@@ -1197,6 +1220,7 @@
 		A7F6890F23572D15000C313F /* CircleLeavingMessageCommentListContentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLeavingMessageCommentListContentTableViewCell.swift; sourceTree = "<group>"; };
 		A7F6891323572D69000C313F /* CircleLeavingMessageCommentListFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLeavingMessageCommentListFooterView.swift; sourceTree = "<group>"; };
 		A7F68915235738EB000C313F /* CircleLeavingMessageCommentTopStepTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLeavingMessageCommentTopStepTableViewCell.swift; sourceTree = "<group>"; };
+		A7F689172358030C000C313F /* CommunityCircleCommentModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommunityCircleCommentModel.swift; sourceTree = "<group>"; };
 		A7FF1576228C824300A85748 /* OrderModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = OrderModule.xcassets; sourceTree = "<group>"; };
 		A7FF1597228D092A00A85748 /* OrderListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderListModel.swift; sourceTree = "<group>"; };
 		A7FF159B228D9E3C00A85748 /* OrderRefundDetailModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderRefundDetailModel.swift; sourceTree = "<group>"; };
@@ -3115,6 +3139,61 @@
 			path = WRNavigationBar;
 			sourceTree = "<group>";
 		};
+		A77FAEF02358394D002A1D08 /* CircleCommentList */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAEF423583E9A002A1D08 /* View */,
+				A77FAEF323583E96002A1D08 /* ViewController */,
+			);
+			path = CircleCommentList;
+			sourceTree = "<group>";
+		};
+		A77FAEF323583E96002A1D08 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAEEE23583949002A1D08 /* CircleCommentListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A77FAEF423583E9A002A1D08 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAEF5235844BC002A1D08 /* CircleCommentListCommentTableViewCell.swift */,
+				A77FAEF723584EC8002A1D08 /* CircleCommentListCommentReplyTableViewCell.swift */,
+				A77FAEF923585028002A1D08 /* CircleCommentListReplyTableViewCell.swift */,
+				A77FAEFB235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift */,
+				A77FAEFD2358822A002A1D08 /* CircleCommentReplyView.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A77FAEFF2359592B002A1D08 /* CircleCommentReplyList */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAF0323595D0F002A1D08 /* View */,
+				A77FAF002359593D002A1D08 /* ViewController */,
+			);
+			path = CircleCommentReplyList;
+			sourceTree = "<group>";
+		};
+		A77FAF002359593D002A1D08 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAF0123595989002A1D08 /* CircleCommentReplyListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A77FAF0323595D0F002A1D08 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A77FAF0423595D3E002A1D08 /* CircleCommentReplyParentTableViewCell.swift */,
+				A77FAF0623595D49002A1D08 /* CircleCommentReplyTableViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		A7811C7D231AAF6400C2D8DE /* CommunityReport */ = {
 			isa = PBXGroup;
 			children = (
@@ -3351,6 +3430,8 @@
 			isa = PBXGroup;
 			children = (
 				A784F2C323544B1B00E49140 /* Circle */,
+				A77FAEF02358394D002A1D08 /* CircleCommentList */,
+				A77FAEFF2359592B002A1D08 /* CircleCommentReplyList */,
 				A7F688FA2356F069000C313F /* CircleUserList */,
 				A7F688ED2355C17B000C313F /* CircleQuestionsAnswers */,
 				A7F688EA2355AA45000C313F /* CircleShareContent */,
@@ -4141,6 +4222,9 @@
 		A7D5F25D22C0612A00F8E9AF /* CommunityModel */ = {
 			isa = PBXGroup;
 			children = (
+				A77FAEF123583BB0002A1D08 /* CommunityCircleCommentsModel.swift */,
+				A77FAF0823595F82002A1D08 /* CommunityCircleCommentReplysModel.swift */,
+				A7F689172358030C000C313F /* CommunityCircleCommentModel.swift */,
 				A7F6890823571B9D000C313F /* CommunityCircleMessagesModel.swift */,
 				A7F689012356F574000C313F /* CommunityCircleUserListModel.swift */,
 				A7F688F82356C975000C313F /* CommunityCircleSubmitAnswerModel.swift */,
@@ -5783,6 +5867,7 @@
 				BDAF83B422B3B6DF0004BCC3 /* RecommendMajorCommentCell.swift in Sources */,
 				A72A72C022321DE000B21995 /* Extension+UIView.swift in Sources */,
 				BDAF83B022B3B63B0004BCC3 /* RecommendCommentHeader.swift in Sources */,
+				A77FAEFC235871D4002A1D08 /* CircleCommnetListRepleyFooterView.swift in Sources */,
 				A770E5DD22CEDF4F00CBD0A4 /* OpenAppModel.swift in Sources */,
 				A719EE6E22AF441F001AAC98 /* CommunityViewController.swift in Sources */,
 				BD13B6C622BA034D008BB323 /* PublishEditTitleCell.swift in Sources */,
@@ -5839,6 +5924,7 @@
 				A7C0FDF522B65FE000BC1E86 /* FeaturedTopicsCollectionViewCell.swift in Sources */,
 				A7BB6857226965C100AB07A2 /* SelfRecommendationHeaderCollectionReusableView.swift in Sources */,
 				A7F6890B2357233D000C313F /* CircleLeavingMessageContentTableViewCell.swift in Sources */,
+				A77FAF0223595989002A1D08 /* CircleCommentReplyListViewController.swift in Sources */,
 				BDE3045F228554CA001D050F /* ProductCartAmountModel.swift in Sources */,
 				A7BB68672269B1DD00AB07A2 /* AddressPOIViewController.swift in Sources */,
 				A7284A7322546460000BAEC4 /* SwiftMoyaServicePayApi.swift in Sources */,
@@ -5865,6 +5951,7 @@
 				BD13B6B922BA0327008BB323 /* PublishEditController.swift in Sources */,
 				A71AA5102272156A008FF1A5 /* ExpressAddressListViewController.swift in Sources */,
 				A7F6891023572D15000C313F /* CircleLeavingMessageCommentListContentTableViewCell.swift in Sources */,
+				A77FAEF823584EC8002A1D08 /* CircleCommentListCommentReplyTableViewCell.swift in Sources */,
 				A7F6891423572D69000C313F /* CircleLeavingMessageCommentListFooterView.swift in Sources */,
 				A7D07CC922B7769600186014 /* RainbowBeanPhysicalCollectionViewCell.swift in Sources */,
 				A74144A7232F28370062FB6F /* PublishConfirmPhotoNewViewController.swift in Sources */,
@@ -5964,6 +6051,7 @@
 				BD6122B122C3638300D3F513 /* AliyunEffectFilterInfo.m in Sources */,
 				A729B5B72267270B004AE098 /* PasswordLoginView.swift in Sources */,
 				BD13B6DF22BA03BC008BB323 /* PublishTopicHeaderView.swift in Sources */,
+				A77FAEF223583BB0002A1D08 /* CommunityCircleCommentsModel.swift in Sources */,
 				A7778CB82244E97A00C7C47A /* BindPhoneNumberViewController.swift in Sources */,
 				A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */,
 				A71AF0BA226F00F8001730FE /* SearchResultView.swift in Sources */,
@@ -5988,6 +6076,7 @@
 				A70EBBC022561179000AD74F /* Extension+UITableView.swift in Sources */,
 				A72A72B022321DE000B21995 /* CGView.swift in Sources */,
 				BD01B20222BC677900CE9F36 /* PublishVideoView.swift in Sources */,
+				A77FAEF6235844BC002A1D08 /* CircleCommentListCommentTableViewCell.swift in Sources */,
 				A7C0FDF322B65E5400BC1E86 /* FeaturedTopicsTableViewCell.swift in Sources */,
 				A770E61322D6625700CBD0A4 /* ShareCommunityViewCollectionViewCell.swift in Sources */,
 				A7F577D722FED3A100E2D757 /* PathManager.swift in Sources */,
@@ -6132,6 +6221,7 @@
 				A770E60722D64CD700CBD0A4 /* UIView+SwCapture.swift in Sources */,
 				BD6122AE22C3638300D3F513 /* AliyunEffectMvInfo.m in Sources */,
 				A71901752275F71F00104A50 /* BaiduToCityModel.swift in Sources */,
+				A77FAEEF23583949002A1D08 /* CircleCommentListViewController.swift in Sources */,
 				BD12203F22AF8E190051C7C2 /* MessagePlanetNotiController.swift in Sources */,
 				A790705D22B9B723008CE279 /* ModifyDataAvatarView.swift in Sources */,
 				A7BB685922696B9200AB07A2 /* SelfRecommendationCollectionViewCell.swift in Sources */,
@@ -6167,6 +6257,7 @@
 				BD12203622AF807C0051C7C2 /* MessagePlanetActivityController.swift in Sources */,
 				BD13B6C222BA034D008BB323 /* PublishEditAddImgCollectionCell.swift in Sources */,
 				A7778CAB2244B12500C7C47A /* CountDownManager.swift in Sources */,
+				A77FAEFE2358822A002A1D08 /* CircleCommentReplyView.swift in Sources */,
 				A76068F322E4B11B008DF18F /* UIImage+Gif.swift in Sources */,
 				A71AA5212272E527008FF1A5 /* Extension+UINavigationController.swift in Sources */,
 				BD981A8F22C9FEEF0043D951 /* CommunityPublishModel.swift in Sources */,
@@ -6196,12 +6287,14 @@
 				BD13B6C322BA034D008BB323 /* PublishEditDescribeCell.swift in Sources */,
 				A7CC752C2271A1AE003C4F38 /* SetPasswordViewController.swift in Sources */,
 				BD10FBFE22C6F7D90096A34E /* AliyunPublishService.m in Sources */,
+				A77FAEFA23585028002A1D08 /* CircleCommentListReplyTableViewCell.swift in Sources */,
 				A7F688FC2356F0C3000C313F /* CircleUserListViewController.swift in Sources */,
 				A7F688F12355C3E9000C313F /* CommunityCircleQuestionsAnswersModel.swift in Sources */,
 				A75B783022DF2CBF007B986A /* Extension+WKWebView.swift in Sources */,
 				A7C0FDEE22B6516A00BC1E86 /* CommunityBannerTableViewCell.swift in Sources */,
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
 				BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */,
+				A7F689182358030D000C313F /* CommunityCircleCommentModel.swift in Sources */,
 				A7F689022356F575000C313F /* CommunityCircleUserListModel.swift in Sources */,
 				A71CAB3922C9DF0600D908A8 /* CommunityTopicDetailModel.swift in Sources */,
 				BD37E38522CDF91A003A14A2 /* CommunityVideoSelTopicCell.swift in Sources */,
@@ -6236,6 +6329,7 @@
 				A7274C5D228EE636000E3A07 /* LBXScanViewStyle.swift in Sources */,
 				A73911B3229ECE340033177E /* UICollectionViewLeftAlignedLayout.m in Sources */,
 				A7824AFB2271EA2600ABA381 /* SelfMentionContactsListView.swift in Sources */,
+				A77FAF0923595F82002A1D08 /* CommunityCircleCommentReplysModel.swift in Sources */,
 				A72A72AB22321DE000B21995 /* SwiftProgressHUD.swift in Sources */,
 				A7CC751C22716426003C4F38 /* SetLogoutTableViewCell.swift in Sources */,
 				BD61226B22C3595B00D3F513 /* AlivcShortVideoUIConfig.m in Sources */,
@@ -6344,6 +6438,7 @@
 				BD477F6322C23D66008BE2CB /* AliyunReachability.m in Sources */,
 				A7D77DF722DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift in Sources */,
 				A7778CDD2246121500C7C47A /* PhoneCountryAreaListMdoel.swift in Sources */,
+				A77FAF0723595D4A002A1D08 /* CircleCommentReplyTableViewCell.swift in Sources */,
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				BD0FAA6422C4C35E00DDFB37 /* AliyunCropThumbnailView.m in Sources */,
 				BD37E38322CDF5BA003A14A2 /* CommunityVideoTopicView.swift in Sources */,
@@ -6355,6 +6450,7 @@
 				A7811CA7231FB13700C2D8DE /* KSTriangleDisclosureIndicator.m in Sources */,
 				A72A72CF22321E2700B21995 /* NotificationCenterMacro.swift in Sources */,
 				A784F2B12350124200E49140 /* CopyLabel.swift in Sources */,
+				A77FAF0523595D3E002A1D08 /* CircleCommentReplyParentTableViewCell.swift in Sources */,
 				A72A72BF22321DE000B21995 /* Extension+UIButton.swift in Sources */,
 				BDE376DA22C22A260055E2EA /* UIButton+AliyunBlock.m in Sources */,
 				A7F304B523331B0800A4850F /* IMChatRoomViewController.swift in Sources */,

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -161,3 +161,5 @@ let kE5E5E5Color = UIColor(hexString: "E5E5E5")
 let kA8ACBCColor = UIColor(hexString: "A8ACBC")
 
 let k584F60Color = UIColor(hexString: "584F60")
+
+let kEDEDEDColor = UIColor(hexString: "EDEDED")

+ 25 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentModel.swift

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

+ 31 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentReplysModel.swift

@@ -0,0 +1,31 @@
+//
+//  CommunityCircleCommentReplysModel.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import ObjectMapper
+
+class CommunityCircleCommentReplysModel: NSObject, Mappable{
+
+    var data : [CommunityCircleCommentReplyListModel]?
+    var pagination : PaginationModel?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityCircleCommentReplysModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        data <- map["data"]
+        pagination <- map["pagination"]
+        
+    }
+    
+}

+ 102 - 0
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleCommentsModel.swift

@@ -0,0 +1,102 @@
+//
+//	CommunityCircleCommentsModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CommunityCircleCommentsModel : NSObject, Mappable{
+
+	var commentCount : Int?
+	var data : [CommunityCircleCommentListModel]?
+	var pagination : PaginationModel?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CommunityCircleCommentsModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		commentCount <- map["comment_count"]
+		data <- map["data"]
+		pagination <- map["pagination"]
+		
+	}
+
+}
+
+class CommunityCircleCommentListModel : NSObject, Mappable{
+    
+    var avatar : String?
+    var content : String?
+    var createdAt : String?
+    var id : Int?
+    var isDelete : Int?
+    var reply : [CommunityCircleCommentReplyListModel]?
+    var replyCount : Int?
+    var uid : Int?
+    var username : String?
+    var contentHeight : CGFloat?
+    var circleId : Int?
+    var msgId : Int?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityCircleCommentListModel()
+    }
+    required init?(map: Map){}
+    override init(){}
+    
+    func mapping(map: Map)
+    {
+        avatar <- map["avatar"]
+        content <- map["content"]
+        createdAt <- map["created_at"]
+        id <- map["id"]
+        isDelete <- map["is_delete"]
+        reply <- map["reply"]
+        replyCount <- map["reply_count"]
+        uid <- map["uid"]
+        username <- map["username"]
+        
+    }
+    
+}
+
+class CommunityCircleCommentReplyListModel : NSObject, Mappable{
+    
+    var avatar : String?
+    var content : String?
+    var createdAt : String?
+    var id : Int?
+    var isDelete : Int?
+    var replyUsername : String?
+    var uid : Int?
+    var username : String?
+    var contentHeight : CGFloat?
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CommunityCircleCommentReplyListModel()
+    }
+    required init?(map: Map){}
+    override init(){}
+    
+    func mapping(map: Map)
+    {
+        avatar <- map["avatar"]
+        content <- map["content"]
+        createdAt <- map["created_at"]
+        id <- map["id"]
+        isDelete <- map["is_delete"]
+        replyUsername <- map["reply_username"]
+        uid <- map["uid"]
+        username <- map["username"]
+        
+    }
+}
+
+

+ 2 - 2
RainbowPlanet/RainbowPlanet/Model/CommunityModel/CommunityCircleMessagesModel.swift

@@ -29,6 +29,7 @@ class CommunityCircleMessagesModel : NSObject, Mappable{
 
 class CommunityCircleMessageModel : NSObject, Mappable{
     
+    var circleId : Int?
     var action : Int?
     var bad : Int?
     var comment : [CommunityCircleMessageCommentModel]?
@@ -80,7 +81,7 @@ class CommunityCircleMessageCommentModel : NSObject, Mappable{
         return CommunityCircleMessageCommentModel()
     }
     required init?(map: Map){}
-    private override init(){}
+    override init(){}
     
     func mapping(map: Map)
     {
@@ -123,4 +124,3 @@ class CommunityCircleMessageUserModel : NSObject, Mappable{
     }
     
 }
-

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListContentTableViewCell.swift

@@ -71,7 +71,7 @@ class CircleLeavingMessageCommentListContentTableViewCell: UITableViewCell {
             let contentStr = "\(communityCircleMessageCommentModel?.content ?? "")"
             commentLabel.text =  nameStr + contentStr
             if nameStr != "" {
-                self.commentLabel.addClickText(nameStr, attributeds: [NSAttributedString.Key.font:kBoldFont14], transmitBody: nil) {
+                self.commentLabel.addClickText(nameStr, attributeds: [NSAttributedString.Key.font:kMediumFont14!], transmitBody: nil) {
                     (data) in
                     
                 }

+ 4 - 7
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListFooterView.swift

@@ -33,13 +33,10 @@ class CircleLeavingMessageCommentListFooterView: BaseView {
     }()
     
     @objc func tapAction() {
-//        if communityRecommendDataModel != nil {
-//            if PostType(rawValue: communityRecommendDataModel?.type ?? "video") == .video {
-//                Mediator.push(CommunityRouterModuleType.pushPostDetailVoide(postId: "\(communityRecommendDataModel?.id ?? 0)", departType: .others, topicId: 0))
-//            }else {
-//                Mediator.push(CommunityRouterModuleType.pushPostDetailContent(postId: "\(communityRecommendDataModel?.id ?? 0)"))
-//            }
-//        }
+        let vc = CircleCommentListViewController()
+        vc.msgId = communityCircleMessageModel?.id
+        vc.circleId = communityCircleMessageModel?.circleId
+        UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
     }
     
     var communityCircleMessageModel: CommunityCircleMessageModel? {

+ 5 - 6
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentListTableViewCell.swift

@@ -99,11 +99,10 @@ extension CircleLeavingMessageCommentListTableViewCell : UITableViewDelegate,UIT
     }
     
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-//        if PostType(rawValue: communityRecommendDataModel?.type ?? "video") == .video {
-//            Mediator.push(CommunityRouterModuleType.pushPostDetailVoide(postId: "\(communityRecommendDataModel?.id ?? 0)", departType: .others, topicId: 0))
-//        }else {
-//            Mediator.push(CommunityRouterModuleType.pushPostDetailContent(postId: "\(communityRecommendDataModel?.id ?? 0)"))
-//        }
+        let vc = CircleCommentListViewController()
+        vc.msgId = communityCircleMessageModel?.id
+        vc.circleId = communityCircleMessageModel?.circleId
+        UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
     }
     
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
@@ -112,7 +111,7 @@ extension CircleLeavingMessageCommentListTableViewCell : UITableViewDelegate,UIT
         let contentStr = "\(communityCircleMessageCommentModel?.content ?? "")"
         
         let str =  nameStr + contentStr
-        let strHeight = (str.heightForComment(font: kRegularFont14!, width: kScreenWidth-28) + 5)
+        let strHeight = (str.heightForComment(font: kMediumFont14!, width: kScreenWidth-28) + 5)
         return strHeight
     }
     

+ 95 - 14
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/Cell/CircleLeavingMessageCommentTopStepTableViewCell.swift

@@ -7,8 +7,11 @@
 //
 
 import UIKit
+import RxSwift
 
 class CircleLeavingMessageCommentTopStepTableViewCell: UITableViewCell {
+    
+    let disposeBag = DisposeBag()
 
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleLeavingMessageCommentTopStepTableViewCell {
         let ID = "CircleLeavingMessageCommentTopStepTableViewCell"
@@ -22,6 +25,7 @@ class CircleLeavingMessageCommentTopStepTableViewCell: UITableViewCell {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         setupViews()
         setupLayouts()
+        setupData()
     }
     
     required init?(coder aDecoder: NSCoder) {
@@ -68,6 +72,15 @@ class CircleLeavingMessageCommentTopStepTableViewCell: UITableViewCell {
         
     }
     
+    func setupData() {
+        topButton.rx.tap.subscribe(onNext: {[weak self] in
+            self?.communityCircleMessageAction(action:1)
+        }).disposed(by: disposeBag)
+        stepButton.rx.tap.subscribe(onNext: {[weak self] in
+            self?.communityCircleMessageAction(action:-1)
+        }).disposed(by: disposeBag)
+    }
+    
     private lazy var commentLabel: UILabel = {
         let commentLabel = UILabel()
         commentLabel.numberOfLines = 1
@@ -75,6 +88,7 @@ class CircleLeavingMessageCommentTopStepTableViewCell: UITableViewCell {
         commentLabel.font = kRegularFont14
         commentLabel.textAlignment = .left
         commentLabel.text = "添加评论..."
+        commentLabel.addTapGesture(1, target: self, action: #selector(commentAction))
         return commentLabel
     }()
     
@@ -98,22 +112,89 @@ class CircleLeavingMessageCommentTopStepTableViewCell: UITableViewCell {
     
     var communityCircleMessageModel: CommunityCircleMessageModel? {
         didSet {
-            
-            if communityCircleMessageModel?.action ?? 0 == 0 {
-                topButton.isSelected = false
-                stepButton.isSelected = false
-            }else if communityCircleMessageModel?.action ?? 0 == 1 {
-                topButton.isSelected = true
-                stepButton.isSelected = false
-            }else if communityCircleMessageModel?.action ?? 0 == -1 {
-                topButton.isSelected = false
-                stepButton.isSelected = true
+            action()
+        }
+    }
+    
+    func action() {
+        if communityCircleMessageModel?.action ?? 0 == 0 {
+            topButton.isUserInteractionEnabled = true
+            stepButton.isUserInteractionEnabled = true
+            topButton.isSelected = false
+            stepButton.isSelected = false
+        }else if communityCircleMessageModel?.action ?? 0 == 1 {
+            topButton.isUserInteractionEnabled = false
+            stepButton.isUserInteractionEnabled = false
+            topButton.isSelected = true
+            stepButton.isSelected = false
+        }else if communityCircleMessageModel?.action ?? 0 == -1 {
+            topButton.isUserInteractionEnabled = false
+            stepButton.isUserInteractionEnabled = false
+            topButton.isSelected = false
+            stepButton.isSelected = true
+        }
+        topButton.setTitle("\(communityCircleMessageModel?.good ?? 0)", for: UIControl.State.normal)
+        topButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 4)
+        stepButton.setTitle("\(communityCircleMessageModel?.bad ?? 0)", for: UIControl.State.normal)
+        stepButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 4)
+    }
+    
+    
+    /// 评论回调
+    typealias CommentCloSure = () -> Void
+    var commentCloSure : CommentCloSure?
+    
+    // 评论
+    @objc func commentAction() {
+        showKeyBoardCommentView()
+    }
+    
+    /// 显示键盘
+    func showKeyBoardCommentView() {
+        
+        KeyBoardInputView.show(inputViewResultClosure: { [weak self] (content) in
+            self?.communityCircleCommentPostApi(content: content)
+        }) {
+        }
+    }
+    
+    /// 评论
+    ///
+    /// - Parameter content: 评论内容
+    func communityCircleCommentPostApi(content:String?) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentPostApi(circleId: communityCircleMessageModel?.circleId ?? 0, msgId: communityCircleMessageModel?.id ?? 0, content: content ?? "") { [weak self] (communityCircleCommentModel) -> (Void) in
+            let communityCircleCommentModel = communityCircleCommentModel as? CommunityCircleCommentModel
+            let communityCircleMessageCommentModel = CommunityCircleMessageCommentModel()
+            communityCircleMessageCommentModel.id = communityCircleCommentModel?.id
+            communityCircleMessageCommentModel.uid = UserModel.shared().getModel()?.uid
+            communityCircleMessageCommentModel.username = UserModel.shared().getModel()?.username
+            communityCircleMessageCommentModel.content = content
+            communityCircleMessageCommentModel.isDelete = 0
+            communityCircleMessageCommentModel.replyCount = 0
+            self?.communityCircleMessageModel?.commentCount = (self?.communityCircleMessageModel?.commentCount ?? 0) + 1
+            self?.communityCircleMessageModel?.comment?.insert(communityCircleMessageCommentModel, at: 0)
+            if let commentCloSure = self?.commentCloSure {
+                commentCloSure()
             }
-            topButton.setTitle("\(communityCircleMessageModel?.good ?? 0)", for: UIControl.State.normal)
-            topButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 4)
-            stepButton.setTitle("\(communityCircleMessageModel?.bad ?? 0)", for: UIControl.State.normal)
-            stepButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 4)
         }
     }
+    
+    
+    /// 提问顶踩
+    ///
+    /// - Parameter action: 0/1/-1
+    func communityCircleMessageAction(action:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleMessageActionApi(msgId: communityCircleMessageModel?.id ?? 0, action: action) { [weak self] (_) -> (Void) in
+            self?.communityCircleMessageModel?.action = action
+            if action == -1 {
+                self?.communityCircleMessageModel?.bad = (self?.communityCircleMessageModel?.bad ?? 0) + 1
+            }else if action == 1 {
+                self?.communityCircleMessageModel?.good = (self?.communityCircleMessageModel?.good ?? 0) + 1
+            }
+            self?.action()
+        }
+    }
+    
+    
 
 }

+ 10 - 4
RainbowPlanet/RainbowPlanet/Modules/CircleModule/Circle/View/CircleLeavingMessageView/CircleLeavingMessageView.swift

@@ -89,6 +89,7 @@ extension CircleLeavingMessageView : UITableViewDelegate,UITableViewDataSource {
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let communityCircleMessageModel = communityCircleMessageModels[indexPath.section]
+        communityCircleMessageModel.circleId = circleId
         switch indexPath.row {
         //贴子用户
         case 0:
@@ -112,6 +113,12 @@ extension CircleLeavingMessageView : UITableViewDelegate,UITableViewDataSource {
         case 3:
             let cell = CircleLeavingMessageCommentTopStepTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.communityCircleMessageModel = communityCircleMessageModel
+            cell.commentCloSure = {
+                var indexPath = indexPath
+                indexPath.row = 2
+                tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
+//                tableView.reloadSections([indexPath.section], with: UITableView.RowAnimation.none)
+            }
             return cell
         default:
             return UITableViewCell()
@@ -120,7 +127,6 @@ extension CircleLeavingMessageView : UITableViewDelegate,UITableViewDataSource {
     }
     
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        
     }
     
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
@@ -146,14 +152,14 @@ extension CircleLeavingMessageView : UITableViewDelegate,UITableViewDataSource {
                     let contentStr = "\(communityCircleMessageModel.content ?? "")"
                     
                     let str =  nameStr + contentStr
-                    let strHeight = (str.heightForComment(font: kRegularFont14!, width:  kScreenWidth-28) + 10.0)
+                    let strHeight = (str.heightForComment(font: kMediumFont14!, width:  kScreenWidth-28) + 5)
                     height = (height ?? 0) + strHeight
                 }
                 
                 if (communityCircleMessageModel.commentCount ?? 0) <= 2 {
-                    return (height ?? 0)
+                    return (height ?? 0) + 10
                 }else {
-                    return 18 + (height ?? 0)
+                    return 18 + (height ?? 0) + 10
                 }
             }
             return 0

+ 130 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListCommentReplyTableViewCell.swift

@@ -0,0 +1,130 @@
+//
+//  CircleCommentListCommentReplyTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CircleCommentListCommentReplyTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleCommentListCommentReplyTableViewCell {
+        let ID = "CircleCommentListCommentReplyTableViewCell"
+        tableView.register(CircleCommentListCommentReplyTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleCommentListCommentReplyTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleCommentListCommentReplyTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        self.selectionStyle = .none
+        backgroundColor = UIColor.white
+        addSubview(tableView)
+    }
+    
+    func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.bottom.equalToSuperview()
+            make.left.equalTo(62)
+            make.right.equalTo(-14)
+        }
+    }
+    
+    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
+        tableView.isScrollEnabled = false
+        tableView.cornerRadius = 4
+        tableView.masksToBounds = true
+        return tableView
+    }()
+    
+    private lazy var footerView: CircleCommnetListRepleyFooterView = {
+        let footerView = CircleCommnetListRepleyFooterView(frame: CGRect(x: 0, y: 0, width: kScreenWidth - 101 - 21, height: 40))
+        return footerView
+    }()
+    
+    var communityCircleCommentListModel : CommunityCircleCommentListModel? {
+        didSet {
+            if communityCircleCommentListModel?.replyCount ?? 0 > 2 {
+                footerView.communityCircleCommentListModel = communityCircleCommentListModel
+                tableView.tableFooterView = footerView
+            }
+            tableView.reloadData()
+        }
+    }
+}
+
+extension CircleCommentListCommentReplyTableViewCell : UITableViewDelegate,UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return communityCircleCommentListModel?.reply?.isEmpty ?? true ? 0 : 1
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return communityCircleCommentListModel?.reply?.isEmpty ?? true ? 0 : communityCircleCommentListModel?.reply?.prefix(2).count ?? 0
+        
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = CircleCommentListReplyTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        cell.communityCircleCommentReplyListModel = communityCircleCommentListModel?.reply?[indexPath.row]
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        if communityCircleCommentListModel?.isDelete == 1 {
+            SwiftProgressHUD.shared().showText("该评论已删除,暂时不能评论")
+        }else {
+            let vc = CircleCommentReplyListViewController()
+            vc.communityCircleCommentListModel = communityCircleCommentListModel
+            UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        let communityCircleCommentReplyListModel = communityCircleCommentListModel?.reply?[indexPath.row]
+        let contentHeight = 17.0 + (communityCircleCommentReplyListModel?.contentHeight ?? 0.0) + 15.0
+        let spacingHeight : CGFloat = 10.0 + 8.0 + 7.0
+        let strHeight = contentHeight + spacingHeight
+        return strHeight
+    }
+    
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+        
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+}

+ 135 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListCommentTableViewCell.swift

@@ -0,0 +1,135 @@
+//
+//  CircleCommentListCommentTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleCommentListCommentTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleCommentListCommentTableViewCell {
+        let ID = "CircleCommentListCommentTableViewCell"
+        tableView.register(CircleCommentListCommentTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleCommentListCommentTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleCommentListCommentTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        selectionStyle = .none
+        addSubview(avatarImageView)
+        addSubview(nameLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+        addSubview(bottomLineLabel)
+    }
+    
+    func setupLayouts() {
+        avatarImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(14)
+            make.size.equalTo(38)
+        }
+        nameLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(avatarImageView.snp.right).offset(10)
+            make.right.equalTo(-14)
+            make.height.equalTo(17)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(nameLabel.snp.bottom).offset(8)
+            make.left.equalTo(nameLabel)
+            make.right.equalTo(-14)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp.bottom).offset(7)
+            make.left.equalTo(nameLabel)
+            make.height.equalTo(15)
+        }
+        bottomLineLabel.snp.makeConstraints { (make) in
+            make.bottom.equalToSuperview()
+            make.height.equalTo(0.5)
+            make.left.equalTo(62)
+            make.right.equalTo(-14)
+        }
+    }
+    
+    lazy var avatarImageView : UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.image = kImage(name: "default_avatar")
+        avatarImageView.cornerRadius = 19
+        avatarImageView.masksToBounds = true
+        avatarImageView.addTapGesture(1, target: self, action: #selector(avatarAction))
+        return avatarImageView
+    }()
+    
+    lazy var nameLabel: UILabel = {
+        let nameLabel = UILabel()
+        nameLabel.textColor = k666666Color
+        nameLabel.font = kRegularFont14
+        return nameLabel
+    }()
+    
+    lazy var contentLabel: UILabel = {
+        let contentLabel = UILabel()
+        contentLabel.textColor = k333333Color
+        contentLabel.font = kRegularFont15
+        contentLabel.numberOfLines = 0
+        return contentLabel
+    }()
+    
+    lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    lazy var bottomLineLabel: UILabel = {
+        let bottomLineLabel = UILabel()
+        bottomLineLabel.backgroundColor = kEDEDEDColor
+        return bottomLineLabel
+    }()
+    
+    var communityCircleCommentListModel : CommunityCircleCommentListModel? {
+        didSet {
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCircleCommentListModel?.avatar ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            nameLabel.text = communityCircleCommentListModel?.username ?? ""
+            contentLabel.text = communityCircleCommentListModel?.content ?? ""
+            contentLabel.snp.remakeConstraints { (make) in
+                make.top.equalTo(nameLabel.snp.bottom).offset(8)
+                make.left.equalTo(nameLabel)
+                make.right.equalTo(-14)
+                make.height.equalTo(communityCircleCommentListModel?.contentHeight ?? 0)
+            }
+            timeLabel.text = communityCircleCommentListModel?.createdAt ?? ""
+        }
+    }
+    
+    @objc func avatarAction() {
+        if communityCircleCommentListModel?.uid != UserModel.shared().getModel()?.uid {
+            Mediator.push(MineRouterModuleType.pushOtherPersonalCenter(uid: communityCircleCommentListModel?.uid ?? 0))
+        }
+    }
+    
+}

+ 133 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentListReplyTableViewCell.swift

@@ -0,0 +1,133 @@
+//
+//  CircleCommentListReplyTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleCommentListReplyTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleCommentListReplyTableViewCell {
+        let ID = "CircleCommentListReplyTableViewCell"
+        tableView.register(CircleCommentListReplyTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleCommentListReplyTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleCommentListReplyTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        backgroundColor = kf7f8faColor
+        selectionStyle = .none
+        addSubview(avatarImageView)
+        addSubview(nameLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+    }
+    
+    func setupLayouts() {
+        avatarImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(7)
+            make.size.equalTo(24)
+        }
+        nameLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(avatarImageView.snp.right).offset(10)
+            make.right.equalTo(-7)
+            make.height.equalTo(17)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(nameLabel.snp.bottom).offset(8)
+            make.left.equalTo(nameLabel)
+            make.right.equalTo(-7)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp.bottom).offset(7)
+            make.left.equalTo(nameLabel)
+            make.height.equalTo(15)
+        }
+    }
+    
+    lazy var avatarImageView : UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.image = kImage(name: "default_avatar")
+        avatarImageView.cornerRadius = 12
+        avatarImageView.masksToBounds = true
+        avatarImageView.addTapGesture(1, target: self, action: #selector(avatarAction))
+        return avatarImageView
+    }()
+    
+    lazy var nameLabel: UILabel = {
+        let nameLabel = UILabel()
+        nameLabel.textColor = k666666Color
+        nameLabel.font = kRegularFont14
+        return nameLabel
+    }()
+    
+    lazy var contentLabel: FMLinkLabel = {
+        let contentLabel = FMLinkLabel()
+        contentLabel.textColor = k333333Color
+        contentLabel.font = kRegularFont15
+        contentLabel.isUserInteractionEnabled = false
+        contentLabel.numberOfLines = 0
+        return contentLabel
+    }()
+    
+    lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    var communityCircleCommentReplyListModel : CommunityCircleCommentReplyListModel? {
+        didSet {
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCircleCommentReplyListModel?.avatar ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            nameLabel.text = communityCircleCommentReplyListModel?.username ?? ""
+            if communityCircleCommentReplyListModel?.replyUsername != nil && communityCircleCommentReplyListModel?.replyUsername != "" {
+                
+                contentLabel.text = "回复 @\(communityCircleCommentReplyListModel?.replyUsername ?? ""):\(communityCircleCommentReplyListModel?.content ?? "")"
+                contentLabel.addClickText("回复 @\(communityCircleCommentReplyListModel?.replyUsername ?? "")", attributeds: [NSAttributedString.Key.font:kMediumFont15!], transmitBody: nil) {
+                    (data) in
+
+                }
+            }else {
+                contentLabel.text = communityCircleCommentReplyListModel?.content ?? ""
+            }
+            contentLabel.snp.remakeConstraints { (make) in
+                make.top.equalTo(nameLabel.snp.bottom).offset(8)
+                make.left.equalTo(nameLabel)
+                make.right.equalTo(-7)
+                make.height.equalTo(communityCircleCommentReplyListModel?.contentHeight ?? 0)
+            }
+            timeLabel.text = communityCircleCommentReplyListModel?.createdAt ?? ""
+        }
+    }
+    
+    @objc func avatarAction() {
+        if communityCircleCommentReplyListModel?.uid != UserModel.shared().getModel()?.uid {
+            Mediator.push(MineRouterModuleType.pushOtherPersonalCenter(uid: communityCircleCommentReplyListModel?.uid ?? 0))
+        }
+    }
+    
+}

+ 226 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommentReplyView.swift

@@ -0,0 +1,226 @@
+//
+//  CircleCommentReplyView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import FWPopupView
+import RxSwift
+
+class CircleCommentReplyView: FWPopupView {
+    
+    let disposeBag = DisposeBag()
+    
+    var userName : String = ""
+    var content : String = ""
+    var isDelete : Bool = false
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+    }
+    
+    init(userName:String,content:String,isDelete:Bool = false) {
+        self.init()
+        self.userName = userName
+        self.content = content
+        self.isDelete = isDelete
+        if isDelete {
+            frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 150 + 49 + kSafeTabBarHeight)
+        }else {
+            frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: 150+kSafeTabBarHeight)
+        }
+        // fillCode
+        self.configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
+        setupViews()
+        setLayouts()
+        setupData()
+        
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func setupViews() {
+        addSubview(titleLabel)
+        addSubview(lineLabel)
+        addSubview(replyButton)
+        
+        if isDelete {
+            addSubview(twoLineLabel)
+            addSubview(deleteButton)
+        }
+        addSubview(specLabel)
+        
+        addSubview(cancelButton)
+    }
+    
+    func setLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(14)
+            make.left.equalTo(28)
+            make.right.equalTo(-28)
+            make.height.equalTo(20)
+        }
+        lineLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(14)
+            make.right.left.equalToSuperview()
+            make.height.equalTo(1)
+        }
+        replyButton.snp.makeConstraints { (make) in
+            make.top.equalTo(lineLabel.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(48)
+        }
+        
+        if isDelete {
+            twoLineLabel.snp.makeConstraints { (make) in
+                make.top.equalTo(replyButton.snp.bottom)
+                make.right.left.equalToSuperview()
+                make.height.equalTo(1)
+            }
+            deleteButton.snp.makeConstraints { (make) in
+                make.top.equalTo(twoLineLabel.snp.bottom)
+                make.left.right.equalToSuperview()
+                make.height.equalTo(48)
+            }
+            specLabel.snp.makeConstraints { (make) in
+                make.top.equalTo(deleteButton.snp.bottom)
+                make.left.right.equalToSuperview()
+                make.height.equalTo(5)
+            }
+        }else {
+            specLabel.snp.makeConstraints { (make) in
+                make.top.equalTo(replyButton.snp.bottom)
+                make.left.right.equalToSuperview()
+                make.height.equalTo(5)
+            }
+        }
+        
+        
+        cancelButton.snp.makeConstraints { (make) in
+            make.top.equalTo(specLabel.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(48)
+        }
+        
+    }
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "\(self.userName):\(self.content)"
+        titleLabel.textColor = k999999Color
+        titleLabel.font = kRegularFont14
+        titleLabel.textAlignment = .center
+        return titleLabel
+    }()
+    
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = keeeeeeColor
+        return lineLabel
+    }()
+    
+    lazy var replyButton: UIButton = {
+        let replyButton = UIButton(type: UIButton.ButtonType.custom)
+        replyButton.setTitle("回复", for: UIControl.State.normal)
+        replyButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        replyButton.titleLabel?.font = kRegularFont16
+        return replyButton
+    }()
+    
+    lazy var twoLineLabel: UILabel = {
+        let twoLineLabel = UILabel()
+        twoLineLabel.backgroundColor = keeeeeeColor
+        return twoLineLabel
+    }()
+    
+    lazy var deleteButton: UIButton = {
+        let deleteButton = UIButton(type: UIButton.ButtonType.custom)
+        deleteButton.setTitle("删除评论", for: UIControl.State.normal)
+        deleteButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        deleteButton.titleLabel?.font = kRegularFont16
+        return deleteButton
+    }()
+    
+    lazy var specLabel: UILabel = {
+        let specLabel = UILabel()
+        specLabel.backgroundColor = kf2f2f2Color
+        return specLabel
+    }()
+    
+    lazy var cancelButton: UIButton = {
+        let cancelButton = UIButton(type: UIButton.ButtonType.custom)
+        cancelButton.setTitle("取消", for: UIControl.State.normal)
+        cancelButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        cancelButton.titleLabel?.font = kRegularFont16
+        
+        return cancelButton
+    }()
+    
+    typealias ReplyButtonClosure = () -> Void
+    var replyButtonClosure: ReplyButtonClosure?
+    
+    typealias DeleteButtonClosure = () -> Void
+    var deleteButtonClosure: DeleteButtonClosure?
+    
+    func setupData() {
+        cancelButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+            self?.hide()
+        }).disposed(by: disposeBag)
+        
+        replyButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            self?.hide()
+            if let replyButtonClosure = self?.replyButtonClosure {
+                replyButtonClosure()
+            }
+        }).disposed(by: disposeBag)
+        
+        deleteButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            self?.hide()
+            if let deleteButtonClosure = self?.deleteButtonClosure {
+                deleteButtonClosure()
+            }
+        }).disposed(by: disposeBag)
+        
+    }
+    
+    
+    
+}
+
+extension CircleCommentReplyView {
+    /// 评论回复
+    class func commentReplyView(id:Int?,uid:Int?,userName:String,content:String,replyClosure:@escaping (() -> Void),deleteClosure:@escaping (() -> Void))  {
+        var isDelete : Bool? = false
+        if uid == UserModel.shared().getModel()?.uid {
+            isDelete = true
+        }
+        let view = CommentReplyView(userName: userName, content: content,isDelete: isDelete!)
+        let vProperty = FWPopupViewProperty()
+        vProperty.popupCustomAlignment = .bottomCenter
+        vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+        vProperty.popupAnimationType = .frame
+        vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
+        vProperty.touchWildToHide = "1"
+        view.vProperty = vProperty
+        view.replyButtonClosure = {
+            [weak view] in
+            view?.hide()
+            replyClosure()
+        }
+        view.deleteButtonClosure = {
+            [weak view] in
+            view?.hide()
+            if isDelete! {
+                deleteClosure()
+            }
+        }
+        view.show()
+        
+    }
+}

+ 52 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/View/CircleCommnetListRepleyFooterView.swift

@@ -0,0 +1,52 @@
+//
+//  CircleCommnetListRepleyFooterView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class CircleCommnetListRepleyFooterView: BaseView {
+
+    //MRAK: - 设置View
+    override func setupViews() {
+        backgroundColor = kf7f8faColor
+        addSubview(allCommentLabel)
+        self.addTapGesture(1, target: self, action: #selector(tapAction))
+    }
+    
+    override func setupLayouts() {
+        allCommentLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(39)
+            make.right.equalTo(-14)
+            make.centerY.equalToSuperview()
+        }
+    }
+    
+    private lazy var allCommentLabel: UILabel = {
+        let allCommentLabel = UILabel()
+        allCommentLabel.text = "展开3条回复"
+        allCommentLabel.textColor = kThemeColor
+        allCommentLabel.font = kRegularFont13
+        return allCommentLabel
+    }()
+    
+    @objc func tapAction() {
+        if communityCircleCommentListModel?.isDelete == 1 {
+            SwiftProgressHUD.shared().showText("该评论已删除,暂时不能评论")
+        }else {
+            let vc = CircleCommentReplyListViewController()
+            vc.communityCircleCommentListModel = communityCircleCommentListModel
+            UIViewController.topMost?.navigationController?.pushViewController(vc, animated: true)
+        }
+    }
+    
+    var communityCircleCommentListModel : CommunityCircleCommentListModel? {
+        didSet {
+            allCommentLabel.text = "展开\(communityCircleCommentListModel?.replyCount ?? 3)条回复"
+        }
+    }
+    
+}

+ 317 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentList/ViewController/CircleCommentListViewController.swift

@@ -0,0 +1,317 @@
+//
+//  CircleCommentListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import Kingfisher
+
+class CircleCommentListViewController: BaseViewController {
+
+    deinit {
+        NXLLog("deinit")
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
+    var circleId : Int?
+    var msgId : Int?
+    
+    var communityCircleCommentsModel : CommunityCircleCommentsModel?
+    var communityCircleCommentListModels = Array<CommunityCircleCommentListModel>()
+    var communityCircleCommentListModel : CommunityCircleCommentListModel?
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    override func setupViews() {
+        view.addSubview(tableView)
+        view.addSubview(commentInputView)
+    }
+    
+    override func setupLayouts() {
+        commentInputView.snp.makeConstraints { (make) in
+            make.left.right.bottom.equalToSuperview()
+            make.height.equalTo(48 + kSafeTabBarHeight)
+        }
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.equalTo(0)
+            make.bottom.equalTo(commentInputView.snp.top)
+        }
+    }
+    
+    override func setupData() {
+        tableView.addHeader(withBeginRefresh: true, animation: true) {
+            [weak self] (page) in
+            self?.communityCircleCommentsApi(page: page)
+        }
+        tableView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
+            [weak self] (page) in
+            self?.communityCircleCommentsApi(page: page)
+        })
+        
+        commentInputView.commentInputViewClosure = {
+            [weak self]  in
+            self?.communityCircleCommentListModel = nil
+            self?.showKeyBoardCommentView(placeholder:"添加评论...")
+        }
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect(x: 0, y: kNavBarTotalHeight, width: kScreenWidth, height: kScreenHeight - kNavBarTotalHeight), style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        let headerView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 10))
+        headerView.backgroundColor = kf7f8faColor
+        tableView.tableHeaderView = headerView
+        return tableView
+    }()
+    
+    lazy var footerView: UIView = {
+        let footerView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 10))
+        footerView.backgroundColor = UIColor.white
+        return footerView
+    }()
+    
+    lazy var commentInputView: CommentInputView = {
+        let commentInputView = CommentInputView()
+        commentInputView.inputTextView.placeholderTextColor = k999999Color
+        return commentInputView
+    }()
+    
+   
+    
+    /// 显示键盘
+    func showKeyBoardCommentView(placeholder:String) {
+        KeyBoardInputView.show(placeholder: placeholder, inputViewResultClosure: {
+            [weak self] content in
+            self?.communityCircleCommentPostApi(content: content)
+            
+        }) {
+            [weak self] in
+            self?.communityCircleCommentListModel = nil
+            
+        }
+    }
+    
+    
+    /// 评论列表
+    ///
+    /// - Parameter page: 分页
+    func communityCircleCommentsApi(page:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentsApi(msgId: msgId ?? 0, page: page, completion: {
+            [weak self] (communityCircleCommentsModel) -> (Void) in
+            self?.tableView.tableFooterView = self?.footerView
+            DIYEmptyView.emptyNoDataTableView(tableView: self?.tableView,imageStr: .one,detailStr: .one)
+            self?.communityCircleCommentsModel = communityCircleCommentsModel as? CommunityCircleCommentsModel
+            self?.navigationBar.title = "\(self?.communityCircleCommentsModel?.commentCount ?? 0)条评论"
+            if self?.communityCircleCommentsModel?.pagination?.currentPage == 1{
+                self?.communityCircleCommentListModels.removeAll()
+                self?.tableView.resetNoMoreData()
+            }
+            self?.communityCircleCommentListModels = (self?.communityCircleCommentListModels)! + ((self?.communityCircleCommentsModel?.data!)!)
+            self?.tableView.reloadData()
+            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentsModel?.pagination)
+        }) { [weak self] (loadingStatus) in
+            MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
+        }
+    }
+    
+    
+    /// 评论
+    ///
+    /// - Parameter content: 评论内容
+    func communityCircleCommentPostApi(content:String) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentPostApi(circleId: circleId ?? 0, msgId: msgId ?? 0, content: content,parentId:self.communityCircleCommentListModel?.id ?? 0) {
+            [weak self] (communityCircleCommentModel) -> (Void) in
+            let communityCircleCommentModel = communityCircleCommentModel as? CommunityCircleCommentModel
+
+            if self?.communityCircleCommentListModel != nil {
+                let communityCircleCommentReplyListModel = CommunityCircleCommentReplyListModel()
+                communityCircleCommentReplyListModel.id = communityCircleCommentModel?.id
+                communityCircleCommentReplyListModel.uid = UserModel.shared().getModel()?.uid
+                communityCircleCommentReplyListModel.username = UserModel.shared().getModel()?.username
+                communityCircleCommentReplyListModel.content = content
+                communityCircleCommentReplyListModel.avatar = UserModel.shared().getModel()?.avatarurl
+                communityCircleCommentReplyListModel.isDelete = 0
+                communityCircleCommentReplyListModel.createdAt = "刚刚"
+                self?.communityCircleCommentListModel?.replyCount = (self?.communityCircleCommentListModel?.replyCount ?? 0) + 1
+                self?.communityCircleCommentsModel?.commentCount = (self?.communityCircleCommentsModel?.commentCount ?? 0) + 1
+                self?.navigationBar.title = "\(self?.communityCircleCommentsModel?.commentCount ?? 0)条评论"
+                if (self?.communityCircleCommentListModel?.reply?.isEmpty ?? true) {
+                    var replys = Array<CommunityCircleCommentReplyListModel>()
+                    replys.insert(communityCircleCommentReplyListModel, at: 0)
+                    self?.communityCircleCommentListModel?.reply = replys
+                }else {
+                    self?.communityCircleCommentListModel?.reply?.insert(communityCircleCommentReplyListModel, at: 0)
+                }
+            }else {
+                let communityCircleCommentListModel = CommunityCircleCommentListModel()
+                communityCircleCommentListModel.id = communityCircleCommentModel?.id
+                communityCircleCommentListModel.uid = UserModel.shared().getModel()?.uid
+                communityCircleCommentListModel.username = UserModel.shared().getModel()?.username
+                communityCircleCommentListModel.avatar = UserModel.shared().getModel()?.avatarurl
+                communityCircleCommentListModel.content = content
+                communityCircleCommentListModel.isDelete = 0
+                communityCircleCommentListModel.replyCount = 0
+                communityCircleCommentListModel.createdAt = "刚刚"
+                self?.communityCircleCommentsModel?.commentCount = (self?.communityCircleCommentsModel?.commentCount ?? 0) + 1
+                self?.navigationBar.title = "\(self?.communityCircleCommentsModel?.commentCount ?? 0)条评论"
+                self?.communityCircleCommentListModels.insert(communityCircleCommentListModel, at: 0)
+            }
+            self?.tableView.reloadData()
+            self?.communityCircleCommentListModel = nil
+
+        }
+    }
+    
+    /// 删除评论
+    func communityCircleCommentDeleteApi(commentId:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentDeleteApi(commentId: commentId) {
+            [weak self] (_) -> (Void) in
+            self?.communityCircleCommentListModel?.content = "该评论已被删除"
+            self?.communityCircleCommentListModel?.isDelete = 1
+            self?.tableView.reloadData()
+            self?.communityCircleCommentListModel = nil
+        }
+    }
+
+}
+
+extension CircleCommentListViewController : UITableViewDelegate, UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return communityCircleCommentListModels.count
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        let communityCircleCommentListModel = communityCircleCommentListModels[section]
+        if communityCircleCommentListModel.replyCount ?? 0 > 0 {
+            return 2
+        }else {
+            return 1
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let communityCircleCommentListModel = communityCircleCommentListModels[indexPath.section]
+        communityCircleCommentListModel.circleId = circleId
+        communityCircleCommentListModel.msgId = msgId
+        switch indexPath.row {
+        case 0:
+            let cell = CircleCommentListCommentTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.communityCircleCommentListModel = communityCircleCommentListModel
+            if communityCircleCommentListModel.replyCount ?? 0 > 0 {
+               cell.bottomLineLabel.isHidden = true
+            }else {
+               cell.bottomLineLabel.isHidden = false
+            }
+            return cell
+        case 1:
+            let cell = CircleCommentListCommentReplyTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+
+            cell.communityCircleCommentListModel = communityCircleCommentListModel
+            return cell
+        default:
+            return UITableViewCell()
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        
+        switch indexPath.row {
+        case 0:
+            let communityCircleCommentListModel = communityCircleCommentListModels[indexPath.section]
+            communityCircleCommentListModel.contentHeight = communityCircleCommentListModel.content?.heightForComment(font: kRegularFont15!, width: kScreenWidth - 62 - 14)
+            let contentHeight = 17.0 + (communityCircleCommentListModel.contentHeight ?? 0.0) + 15.0 + 0.5
+            let spacingHeight : CGFloat = 10.0 + 8.0 + 7.0 + 12.0
+            return contentHeight + spacingHeight
+        case 1:
+            let communityCircleCommentListModel = communityCircleCommentListModels[indexPath.section]
+            
+            if !(communityCircleCommentListModel.reply?.isEmpty ?? true) {
+                var height : CGFloat?
+                for communityCircleCommentReplyListModel in (communityCircleCommentListModel.reply?.prefix(2))! {
+                    var content : String = ""
+                    if communityCircleCommentReplyListModel.replyUsername != nil &&  communityCircleCommentReplyListModel.replyUsername != "" {
+                        
+                        content = "回复 @\(communityCircleCommentReplyListModel.replyUsername ?? ""):\(communityCircleCommentReplyListModel.content ?? "")"
+                    }else {
+                        content = communityCircleCommentReplyListModel.content ?? ""
+                    }
+                    
+                    communityCircleCommentReplyListModel.contentHeight = content.heightForComment(font: kMediumFont15!, width: kScreenWidth - 101 - 21)
+
+                    let contentHeight = 17.0 + (communityCircleCommentReplyListModel.contentHeight ?? 0.0) + 15.0
+                    let spacingHeight : CGFloat = 10.0 + 8.0 + 7.0
+                    let strHeight = contentHeight + spacingHeight
+                    height = (height ?? 0) + strHeight
+                }
+               
+                if (communityCircleCommentListModel.replyCount ?? 0) <= 2 {
+                    return (height ?? 0) + 3
+                }else {
+                    return 40 + (height ?? 0)
+                }
+            }
+            return 0
+        default:
+            return 0
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        switch indexPath.row {
+        case 0:
+            let communityCircleCommentListModel = communityCircleCommentListModels[indexPath.section]
+            self.communityCircleCommentListModel = communityCircleCommentListModel
+            
+            if communityCircleCommentListModel.isDelete != 1 {
+                
+                CircleCommentReplyView.commentReplyView(id: communityCircleCommentListModel.id, uid: communityCircleCommentListModel.uid, userName: communityCircleCommentListModel.username ?? "", content: communityCircleCommentListModel.content ?? "", replyClosure: {
+                    [weak self] in
+                    self?.showKeyBoardCommentView(placeholder:"回复:@\(communityCircleCommentListModel.username ?? "")")
+                    }, deleteClosure: {
+                        [weak self] in
+                    self?.communityCircleCommentDeleteApi(commentId:self?.communityCircleCommentListModel?.id ?? 0)
+                })
+            }else {
+                SwiftProgressHUD.shared().showText("该评论已删除,暂时不能评论")
+            }
+            
+            break
+        default:
+            break
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}

+ 123 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/View/CircleCommentReplyParentTableViewCell.swift

@@ -0,0 +1,123 @@
+//
+//  CircleCommentReplyParentTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleCommentReplyParentTableViewCell: UITableViewCell {
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleCommentReplyParentTableViewCell {
+        let ID = "CircleCommentReplyParentTableViewCell"
+        tableView.register(CircleCommentReplyParentTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleCommentReplyParentTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleCommentReplyParentTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        selectionStyle = .none
+        backgroundColor = .white
+        addSubview(avatarImageView)
+        addSubview(nameLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+    }
+    
+    func setupLayouts() {
+        avatarImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(15)
+            make.left.equalTo(14)
+            make.size.equalTo(38)
+        }
+        nameLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(15)
+            make.left.equalTo(avatarImageView.snp.right).offset(10)
+            make.right.equalTo(-14)
+            make.height.equalTo(17)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(nameLabel.snp.bottom).offset(8)
+            make.left.equalTo(nameLabel)
+            make.right.equalTo(-14)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp.bottom).offset(7)
+            make.left.equalTo(nameLabel)
+            make.height.equalTo(15)
+        }
+    }
+    
+    lazy var avatarImageView : UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.image = kImage(name: "default_avatar")
+        avatarImageView.cornerRadius = 19
+        avatarImageView.masksToBounds = true
+        avatarImageView.addTapGesture(1, target: self, action: #selector(avatarAction))
+        return avatarImageView
+    }()
+    
+    lazy var nameLabel: UILabel = {
+        let nameLabel = UILabel()
+        nameLabel.textColor = k666666Color
+        nameLabel.font = kRegularFont14
+        return nameLabel
+    }()
+    
+    lazy var contentLabel: UILabel = {
+        let contentLabel = UILabel()
+        contentLabel.textColor = k333333Color
+        contentLabel.font = kRegularFont15
+        contentLabel.numberOfLines = 0
+        return contentLabel
+    }()
+    
+    lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    var communityCircleCommentListModel : CommunityCircleCommentListModel? {
+        didSet {
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCircleCommentListModel?.avatar ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            nameLabel.text = communityCircleCommentListModel?.username ?? ""
+            contentLabel.text = communityCircleCommentListModel?.content ?? ""
+            contentLabel.snp.remakeConstraints { (make) in
+                make.top.equalTo(nameLabel.snp.bottom).offset(8)
+                make.left.equalTo(nameLabel)
+                make.right.equalTo(-14)
+                make.height.equalTo(communityCircleCommentListModel?.contentHeight ?? 0)
+            }
+            timeLabel.text = communityCircleCommentListModel?.createdAt ?? ""
+        }
+    }
+    
+    @objc func avatarAction() {
+        if communityCircleCommentListModel?.uid != UserModel.shared().getModel()?.uid {
+            Mediator.push(MineRouterModuleType.pushOtherPersonalCenter(uid: communityCircleCommentListModel?.uid ?? 0))
+        }
+    }
+    
+}

+ 145 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/View/CircleCommentReplyTableViewCell.swift

@@ -0,0 +1,145 @@
+//
+//  CircleCommentReplyTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class CircleCommentReplyTableViewCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> CircleCommentReplyTableViewCell {
+        let ID = "CircleCommentReplyTableViewCell"
+        tableView.register(CircleCommentReplyTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : CircleCommentReplyTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! CircleCommentReplyTableViewCell
+        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 {
+            
+        }
+    }
+    
+    func setupViews() {
+        selectionStyle = .none
+        backgroundColor = kf7f8faColor
+        addSubview(avatarImageView)
+        addSubview(nameLabel)
+        addSubview(contentLabel)
+        addSubview(timeLabel)
+        addSubview(bottomLineLabel)
+    }
+    
+    func setupLayouts() {
+        avatarImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(14)
+            make.size.equalTo(38)
+        }
+        nameLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(avatarImageView.snp.right).offset(10)
+            make.right.equalTo(-14)
+            make.height.equalTo(17)
+        }
+        contentLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(nameLabel.snp.bottom).offset(8)
+            make.left.equalTo(nameLabel)
+            make.right.equalTo(-14)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(contentLabel.snp.bottom).offset(7)
+            make.left.equalTo(nameLabel)
+            make.height.equalTo(15)
+        }
+        bottomLineLabel.snp.makeConstraints { (make) in
+            make.bottom.equalToSuperview()
+            make.height.equalTo(0.5)
+            make.left.equalTo(62)
+            make.right.equalTo(-14)
+        }
+    }
+    
+    lazy var avatarImageView : UIImageView = {
+        let avatarImageView = UIImageView()
+        avatarImageView.image = kImage(name: "default_avatar")
+        avatarImageView.cornerRadius = 19
+        avatarImageView.masksToBounds = true
+        avatarImageView.addTapGesture(1, target: self, action: #selector(avatarAction))
+        return avatarImageView
+    }()
+    
+    lazy var nameLabel: UILabel = {
+        let nameLabel = UILabel()
+        nameLabel.textColor = k666666Color
+        nameLabel.font = kRegularFont14
+        return nameLabel
+    }()
+    
+    lazy var contentLabel: FMLinkLabel = {
+        let contentLabel = FMLinkLabel()
+        contentLabel.textColor = k333333Color
+        contentLabel.font = kRegularFont15
+        contentLabel.numberOfLines = 0
+        return contentLabel
+    }()
+    
+    lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = kbbbbbbColor
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    lazy var bottomLineLabel: UILabel = {
+        let bottomLineLabel = UILabel()
+        bottomLineLabel.backgroundColor = kEDEDEDColor
+        return bottomLineLabel
+    }()
+    
+    var communityCircleCommentReplyListModel : CommunityCircleCommentReplyListModel? {
+        didSet {
+            avatarImageView.kf.setImage(with: kURLImage(name: communityCircleCommentReplyListModel?.avatar ?? "default_pic"), placeholder: kImage(name: "default_pic"))
+            nameLabel.text = communityCircleCommentReplyListModel?.username ?? ""
+            if communityCircleCommentReplyListModel?.replyUsername != nil && communityCircleCommentReplyListModel?.replyUsername != "" {
+                
+                contentLabel.text = "回复 @\(communityCircleCommentReplyListModel?.replyUsername ?? ""):\(communityCircleCommentReplyListModel?.content ?? "")"
+                contentLabel.addClickText("回复 @\(communityCircleCommentReplyListModel?.replyUsername ?? "")", attributeds: [NSAttributedString.Key.font:kMediumFont15!], transmitBody: nil) {
+                    (data) in
+                    
+                }
+            }else {
+                contentLabel.text = (communityCircleCommentReplyListModel?.content ?? "")
+            }
+            contentLabel.snp.remakeConstraints { (make) in
+                make.top.equalTo(nameLabel.snp.bottom).offset(8)
+                make.left.equalTo(nameLabel)
+                make.right.equalTo(-7)
+                make.height.equalTo(communityCircleCommentReplyListModel?.contentHeight ?? 0)
+            }
+            timeLabel.text = communityCircleCommentReplyListModel?.createdAt ?? ""
+        }
+    }
+    
+    @objc func avatarAction() {
+        if communityCircleCommentReplyListModel?.uid != UserModel.shared().getModel()?.uid {
+            Mediator.push(MineRouterModuleType.pushOtherPersonalCenter(uid: communityCircleCommentReplyListModel?.uid ?? 0))
+        }
+    }
+    
+}

+ 272 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleCommentReplyList/ViewController/CircleCommentReplyListViewController.swift

@@ -0,0 +1,272 @@
+//
+//  CircleCommentReplyListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/10/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import Kingfisher
+
+class CircleCommentReplyListViewController: BaseViewController {
+    
+    deinit {
+        NXLLog("deinit")
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
+
+    var communityCircleCommentListModel : CommunityCircleCommentListModel?
+    var communityCircleCommentReplysModel : CommunityCircleCommentReplysModel?
+    var communityCircleCommentReplyListModels = Array<CommunityCircleCommentReplyListModel>()
+    var communityCircleCommentReplyListModel : CommunityCircleCommentReplyListModel?
+    
+    override func viewDidLoad() {
+        
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "0条评论"
+        view.backgroundColor = kf7f8faColor
+        
+        view.addSubview(tableView)
+        view.addSubview(commentInputView)
+    }
+    
+    override func setupLayouts() {
+        commentInputView.snp.makeConstraints { (make) in
+            make.left.right.bottom.equalToSuperview()
+            make.height.equalTo(48 + kSafeTabBarHeight)
+        }
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kNavBarTotalHeight)
+            make.left.right.equalTo(0)
+            make.bottom.equalTo(commentInputView.snp.top)
+        }
+        
+        
+    }
+    
+    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
+        let headerView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 10))
+        headerView.backgroundColor = kf7f8faColor
+        tableView.tableHeaderView = headerView
+        return tableView
+    }()
+    
+    lazy var commentInputView: CommentInputView = {
+        let commentInputView = CommentInputView()
+        commentInputView.inputTextView.placeholderTextColor = k999999Color
+        return commentInputView
+    }()
+    
+    override func setupData() {
+        tableView.addHeader(withBeginRefresh: true, animation: true) { [weak self] (page) in
+            self?.communityCircleReplysApi(page: page)
+        }
+        tableView.addAutoNormalFooter(withAutomaticallyRefresh: true, loadMoreBlock: {
+            [weak self] (page) in
+            self?.communityCircleReplysApi(page: page)
+        })
+        commentInputView.commentInputViewClosure = {
+            [weak self]  in
+            self?.communityCircleCommentReplyListModel = nil
+            self?.showKeyBoardCommentView(placeholder:"添加评论...")
+        }
+        
+    }
+    
+    
+    /// 显示键盘
+    func showKeyBoardCommentView(placeholder:String) {
+        KeyBoardInputView.show(placeholder: placeholder, inputViewResultClosure: {
+            [weak self] content in
+            self?.communityCircleCommentReplyPostApi(content: content)
+        }) {
+            [weak self] in
+            self?.communityCircleCommentReplyListModel = nil
+            
+        }
+    }
+    
+    /// 回复列表
+    ///
+    /// - Parameter page: 分页
+    func communityCircleReplysApi(page:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleReplysApi(commentId: communityCircleCommentListModel?.id ?? 0, page: page, completion: {
+            [weak self] (communityCircleCommentReplysModel) -> (Void) in
+            DIYEmptyView.emptyNoDataTableView(tableView: self?.tableView,imageStr: .one,detailStr: .one)
+            self?.communityCircleCommentReplysModel = communityCircleCommentReplysModel as? CommunityCircleCommentReplysModel
+            self?.navigationBar.title = "\(self?.communityCircleCommentReplysModel?.pagination?.total ?? 0)条评论"
+            if self?.communityCircleCommentReplysModel?.pagination?.currentPage == 1{
+                self?.communityCircleCommentReplyListModels.removeAll()
+                self?.tableView.resetNoMoreData()
+            }
+            self?.communityCircleCommentReplyListModels = (self?.communityCircleCommentReplyListModels)! + ((self?.communityCircleCommentReplysModel?.data!)!)
+            self?.tableView.reloadData()
+            MJRefreshManager.mjRefreshManagerPaginationNoHiddenFooter(tableView: self?.tableView, pagination:self?.communityCircleCommentReplysModel?.pagination)
+        }) { [weak self] (loadingStatus) in
+            MJRefreshManager.mjRefreshManagerLoadingStatus(tableView: self?.tableView,loadingStatus: loadingStatus)
+        }
+    }
+    
+    /// 评论
+    ///
+    /// - Parameter content: 评论内容
+    func communityCircleCommentReplyPostApi(content:String) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentPostApi(circleId: communityCircleCommentListModel?.circleId ?? 0, msgId: communityCircleCommentListModel?.msgId ?? 0, content: content,parentId:communityCircleCommentListModel?.id ?? 0,replyUid:communityCircleCommentReplyListModel?.uid ?? 0,replyUsername: communityCircleCommentReplyListModel?.username ?? "") {
+            [weak self] (communityCircleCommentModel) -> (Void) in
+            let communityCircleCommentModel = communityCircleCommentModel as? CommunityCircleCommentModel
+            let communityCircleCommentReplyListModel = CommunityCircleCommentReplyListModel()
+            communityCircleCommentReplyListModel.id = communityCircleCommentModel?.id
+            communityCircleCommentReplyListModel.uid = UserModel.shared().getModel()?.uid
+            communityCircleCommentReplyListModel.username = UserModel.shared().getModel()?.username
+            communityCircleCommentReplyListModel.content = content
+            communityCircleCommentReplyListModel.avatar = UserModel.shared().getModel()?.avatarurl
+            communityCircleCommentReplyListModel.isDelete = 0
+            communityCircleCommentReplyListModel.createdAt = "刚刚"
+            if self?.communityCircleCommentReplyListModel != nil {
+                communityCircleCommentReplyListModel.replyUsername = self?.communityCircleCommentReplyListModel?.username ?? ""
+                communityCircleCommentReplyListModel.uid = self?.communityCircleCommentReplyListModel?.uid
+            }
+            self?.communityCircleCommentListModel?.replyCount = (self?.communityCircleCommentListModel?.replyCount ?? 0) + 1
+            self?.communityCircleCommentReplysModel?.pagination?.total = (self?.communityCircleCommentReplysModel?.pagination?.total  ?? 0) + 1
+            self?.navigationBar.title = "\(self?.communityCircleCommentReplysModel?.pagination?.total ?? 0)条评论"
+            self?.communityCircleCommentReplyListModels.insert(communityCircleCommentReplyListModel, at: 0)
+            self?.tableView.reloadData()
+            self?.communityCircleCommentReplyListModel = nil
+        }
+    }
+    
+    /// 删除评论
+    func communityCircleCommentDeleteApi(commentId:Int) {
+        SwiftMoyaNetWorkServiceCommunity.shared().communityCircleCommentDeleteApi(commentId: commentId) {
+            [weak self] (_) -> (Void) in
+            self?.communityCircleCommentReplyListModel?.content = "该评论已被删除"
+            self?.communityCircleCommentReplyListModel?.isDelete = 1
+            self?.tableView.reloadData()
+            self?.communityCircleCommentReplyListModel = nil
+        }
+    }
+}
+
+// MARK: - tableView dataSource && delegate
+extension CircleCommentReplyListViewController: UITableViewDataSource, UITableViewDelegate {
+    
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 2
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        switch section {
+        case 0:
+            if communityCircleCommentListModel != nil {
+                return 1
+            }else {
+                return 0
+            }
+        default:
+            return communityCircleCommentReplyListModels.count
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        
+        switch indexPath.section {
+        case 0:
+            let cell = CircleCommentReplyParentTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.communityCircleCommentListModel =  communityCircleCommentListModel
+            return cell
+        default:
+            let cell = CircleCommentReplyTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.communityCircleCommentReplyListModel = communityCircleCommentReplyListModels[indexPath.row]
+            return cell
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        tableView.deselectRow(at: indexPath, animated: true)
+        
+        switch indexPath.section {
+        case 0:
+            break
+        default:
+            communityCircleCommentReplyListModel = communityCircleCommentReplyListModels[indexPath.row]
+            if communityCircleCommentReplyListModel?.isDelete != 1 {
+                CircleCommentReplyView.commentReplyView(id: communityCircleCommentReplyListModel?.id, uid: communityCircleCommentReplyListModel?.uid, userName: communityCircleCommentReplyListModel?.username ?? "", content: communityCircleCommentReplyListModel?.content ?? "", replyClosure: {
+                    [weak self] in
+                    self?.showKeyBoardCommentView(placeholder: "回复:@\(self?.communityCircleCommentReplyListModel?.username ?? "")")
+                    }, deleteClosure: {
+                        [weak self] in
+                        self?.communityCircleCommentDeleteApi(commentId: self?.communityCircleCommentReplyListModel?.id ?? 0)
+                })
+            }else {
+                SwiftProgressHUD.shared().showText("该回复已删除,暂时不能评论")
+            }
+            
+            break
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        switch indexPath.section {
+        case 0:
+            communityCircleCommentListModel?.contentHeight = communityCircleCommentListModel?.content?.heightForComment(font: kRegularFont15!, width: kScreenWidth - 62 - 14)
+            let contentHeight = 17.0 + (communityCircleCommentListModel?.contentHeight ?? 0.0) + 15.0
+            let spacingHeight : CGFloat = 15.0 + 8.0 + 7.0 + 15.0
+            return contentHeight + spacingHeight
+        case 1:
+            let communityCircleCommentReplyListModel = communityCircleCommentReplyListModels[indexPath.row]
+            var content : String = ""
+            if communityCircleCommentReplyListModel.replyUsername != nil &&  communityCircleCommentReplyListModel.replyUsername != "" {
+                content = "回复 @\(communityCircleCommentReplyListModel.replyUsername ?? ""):\(communityCircleCommentReplyListModel.content ?? "")"
+            }else {
+                content = communityCircleCommentReplyListModel.content ?? ""
+            }
+            
+            communityCircleCommentReplyListModel.contentHeight = content.heightForComment(font: kMediumFont15!, width: kScreenWidth - 62 - 14)
+            
+            let contentHeight = 17.0 + (communityCircleCommentReplyListModel.contentHeight ?? 0.0) + 15.0
+            let spacingHeight : CGFloat = 10.0 + 8.0 + 7.0 + 12
+            let strHeight = contentHeight + spacingHeight
+            return strHeight
+        default:
+            return 0.0000001
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.0000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+        
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+}

+ 12 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleQuestionsAnswers/ViewController/CircleQuestionsAnswersViewController.swift

@@ -7,9 +7,21 @@
 //
 
 import UIKit
+import Kingfisher
 
 class CircleQuestionsAnswersViewController: BaseViewController {
     
+    
+    deinit {
+        NXLLog("deinit")
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
     var circleId : Int?
     var communityCircleQuestionsAnswersModel : CommunityCircleQuestionsAnswersModel?
     var array = Array<CustomAnswer>()

+ 4 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleShareContent/CircleShareContentViewController.swift

@@ -12,6 +12,10 @@ import Kingfisher
 
 class CircleShareContentViewController: BaseViewController {
 
+    deinit {
+        NXLLog("deinit")
+    }
+    
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
         KingfisherManager.shared.cache.clearDiskCache()

+ 11 - 0
RainbowPlanet/RainbowPlanet/Modules/CircleModule/CircleUserList/ViewController/CircleUserListViewController.swift

@@ -8,10 +8,21 @@
 
 import UIKit
 import SwiftyMediator
+import Kingfisher
 
 class CircleUserListViewController: BaseViewController {
 
     
+    deinit {
+        NXLLog("deinit")
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        KingfisherManager.shared.cache.clearDiskCache()
+        KingfisherManager.shared.cache.clearMemoryCache()
+    }
+    
     var circleId : Int?
     
     var communityCircleUserModels = Array<CommunityCircleUserModel>()

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

@@ -219,7 +219,7 @@ class CommunityFeaturedTopicsViewController: BaseViewController {
         
         circleButton.rx.tap.subscribe(onNext: { [weak self] _ in
 //            Mediator.push(CircleRouterModuleType.circle(circleId: "\(self?.communityTopicDetailModel?.circle?.id ?? 0)"))
-            Mediator.push(CircleRouterModuleType.circle(circleId: "\(2)"))
+            Mediator.push(CircleRouterModuleType.circle(circleId: "\(1)"))
 
         }).disposed(by: disposeBag)
         

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

@@ -704,4 +704,108 @@ public class SwiftMoyaNetWorkServiceCommunity: NSObject {
             fail(loadingStatus)
         }
     }
+    // MARK: - 提问-顶踩
+    /// 提问-顶踩
+    ///
+    /// - Parameters:
+    ///   - msgId: 提问ID
+    ///   - action: 动作 1顶-1踩
+    ///   - completion: 动作 1顶-1踩
+    func communityCircleMessageActionApi(msgId:Int,action:Int,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(msgId, forKey: "msg_id")
+        parameters.updateValue(action, forKey: "action")
+        
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleMessageAction(parameters: parameters)), completion: {  (communityCircleMessagesModel) in
+            completion(communityCircleMessagesModel)
+        }) {
+            (loadingStatus) in
+        }
+    }
+    // MARK: - 提问-提问评论&回复
+    /// 提问-提问评论&回复
+    ///
+    /// - Parameters:
+    ///   - circleId: 圈子ID
+    ///   - msgId: 提问ID
+    ///   - content: 评论内容
+    ///   - completion: 完成
+    func communityCircleCommentPostApi(circleId:Int,msgId:Int,content:String,parentId:Int = 0,replyUid:Int = 0,replyUsername:String = "",completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(circleId, forKey: "circle_id")
+        parameters.updateValue(msgId, forKey: "msg_id")
+        parameters.updateValue(content, forKey: "content")
+        if parentId != 0 {
+            parameters.updateValue(parentId, forKey: "parent_id")
+        }
+        if replyUid != 0 {
+            parameters.updateValue(replyUid, forKey: "reply_uid")
+        }
+        if replyUsername != "" {
+            parameters.updateValue(replyUsername, forKey: "reply_username")
+        }
+    
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityCircleCommentModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleCommentPost(parameters: parameters)), completion: {  (communityCircleCommentModel) in
+            completion(communityCircleCommentModel)
+        }) {
+            (loadingStatus) in
+        }
+    }
+    
+    // MARK: - 删除评论
+    /// 删除评论
+    ///
+    /// - Parameters:
+    ///   - commentId: 评论Id
+    ///   - completion: 完成
+    func communityCircleCommentDeleteApi(commentId:Int,completion: @escaping successCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(commentId, forKey: "id")
+        
+        SwiftMoyaNetWorkManager.shared.requestAny(target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleCommentDelete(parameters: parameters)), completion: {  (_) in
+            completion("")
+        }) {
+            (loadingStatus) in
+        }
+    }
+    
+    // MARK: - 评论列表
+    /// 评论列表
+    ///
+    /// - Parameters:
+    ///   - id: 圈子Id
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityCircleCommentsApi(msgId:Int,page:Int = 1,completion: @escaping successCallBack,fail:@escaping failCallback) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(page, forKey: "page")
+        parameters.updateValue(msgId, forKey: "msg_id")
+        
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityCircleCommentsModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleComments(parameters: parameters)), completion: {  (communityCircleCommentsModel) in
+            completion(communityCircleCommentsModel)
+        }) {
+            (loadingStatus) in
+            fail(loadingStatus)
+        }
+    }
+    
+    // MARK: - 提问-评论回复列表
+    /// 提问-评论回复列表
+    ///
+    /// - Parameters:
+    ///   - commentId: 评论Id
+    ///   - page: 分页
+    ///   - completion: 回调
+    func communityCircleReplysApi(commentId:Int,page:Int = 1,completion: @escaping successCallBack,fail:@escaping failCallback) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(page, forKey: "page")
+        parameters.updateValue(commentId, forKey: "comment_id")
+        
+        SwiftMoyaNetWorkManager.shared.requestObject(CommunityCircleCommentReplysModel.self, target: MultiTarget(SwiftMoyaServiceCommunityApi.communityCircleReplys(parameters: parameters)), completion: {  (communityCircleCommentReplysModel) in
+            completion(communityCircleCommentReplysModel)
+        }) {
+            (loadingStatus) in
+            fail(loadingStatus)
+        }
+    }
 }

+ 66 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCommunity/SwiftMoyaServiceCommunityApi.swift

@@ -140,6 +140,22 @@ public let kCommunityCircleArticlesApi = "/community/circle/articles"
 ///  提问-提问列表
 public let kCommunityCircleMessagesApi = "/community/circle/messages"
 
+// MARK: -  提问-顶踩
+///  提问-顶踩
+public let kCommunityCircleMessageActionApi = "/community/circle/message/action"
+
+// MARK: -  提问-提问评论&回复
+///  提问-提问评论&回复
+public let kCommunityCircleCommentApi = "/community/circle/comment"
+
+// MARK: -  提问-评论列表
+///  提问-评论列表
+public let kCommunityCircleCommentsApi = "/community/circle/comments"
+
+// MARK: -  提问-评论回复列表
+///  提问-评论回复列表
+public let kCommunityCircleReplysApi = "/community/circle/replys"
+
 /// 社区
 ///
 /// - communityTopicCategory: 话题组列表
@@ -175,6 +191,14 @@ public let kCommunityCircleMessagesApi = "/community/circle/messages"
 /// - communityCircleMembers : 圈子用户列表
 /// - communityCircleArticles : 圈子-精华帖列表
 /// - communityCircleMessages : 提问-提问列表
+/// - communityCircleMessageAction : 提问-提问列表
+/// - communityCircleCommentPost : 提问-提问评论&回复
+/// - communityCircleCommentDelete : 提问-删除评论回复
+/// - communityCircleComments : 提问评论列表
+/// - communityCircleReplys : 提问评论列表
+
+
+
 
 
 public enum SwiftMoyaServiceCommunityApi {
@@ -212,6 +236,12 @@ public enum SwiftMoyaServiceCommunityApi {
     case communityCircleMembers(parameters:Dictionary<String, Any>)
     case communityCircleArticles(parameters:Dictionary<String, Any>)
     case communityCircleMessagesGet(parameters:Dictionary<String, Any>)
+    case communityCircleMessageAction(parameters:Dictionary<String, Any>)
+    case communityCircleCommentPost(parameters:Dictionary<String, Any>)
+    case communityCircleCommentDelete(parameters:Dictionary<String, Any>)
+    case communityCircleComments(parameters:Dictionary<String, Any>)
+    case communityCircleReplys(parameters:Dictionary<String, Any>)
+
     
 }
 
@@ -252,7 +282,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleQuestion,
              .communityCircleMembers,
              .communityCircleArticles,
-             .communityCircleMessagesGet
+             .communityCircleMessagesGet,
+             .communityCircleMessageAction,
+             .communityCircleCommentPost,
+             .communityCircleCommentDelete,
+             .communityCircleComments,
+             .communityCircleReplys
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -328,6 +363,16 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
             return kCommunityCircleArticlesApi
         case .communityCircleMessagesGet:
             return kCommunityCircleMessagesApi
+        case .communityCircleMessageAction:
+            return kCommunityCircleMessageActionApi
+        case .communityCircleCommentPost:
+            return kCommunityCircleCommentApi
+        case .communityCircleCommentDelete:
+            return kCommunityCircleCommentApi
+        case .communityCircleComments:
+            return kCommunityCircleCommentsApi
+        case .communityCircleReplys:
+            return kCommunityCircleReplysApi
         }
     }
     
@@ -338,7 +383,9 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityMemberFollowTopicFollow,
              .communityPostComment,
              .communityUploadMusic,
-             .communityCircleJoinPost
+             .communityCircleJoinPost,
+             .communityCircleCommentPost,
+             .communityCircleMessageAction
             :
             return .post
         case .communityTopicCategory,
@@ -364,13 +411,16 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleQuestion,
              .communityCircleMembers,
              .communityCircleArticles,
-             .communityCircleMessagesGet
+             .communityCircleMessagesGet,
+             .communityCircleComments,
+             .communityCircleReplys
             :
             return .get
         case .communityMemberFollowTopicCancelFollow,
              .communityDelete,
              .communityPostDeleteComment,
-             .communityCircleJoinDelete
+             .communityCircleJoinDelete,
+             .communityCircleCommentDelete
             :
             return .delete
 
@@ -413,7 +463,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleQuestion(var parameters),
              .communityCircleMembers(var parameters),
              .communityCircleArticles(var parameters),
-             .communityCircleMessagesGet(var parameters)
+             .communityCircleMessagesGet(var parameters),
+             .communityCircleMessageAction(var parameters),
+             .communityCircleCommentPost(var parameters),
+             .communityCircleCommentDelete(var parameters),
+             .communityCircleComments(var parameters),
+             .communityCircleReplys(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -469,7 +524,12 @@ extension SwiftMoyaServiceCommunityApi: TargetType {
              .communityCircleQuestion,
              .communityCircleMembers,
              .communityCircleArticles,
-             .communityCircleMessagesGet
+             .communityCircleMessagesGet,
+             .communityCircleMessageAction,
+             .communityCircleCommentPost,
+             .communityCircleCommentDelete,
+             .communityCircleComments,
+             .communityCircleReplys
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Tools/CommentInputView/CommentInputView.swift

@@ -51,7 +51,7 @@ class CommentInputView: UIView {
     lazy var sendButton: UIButton = {
         let sendButton = UIButton(type: UIButton.ButtonType.custom)
         sendButton.frame = CGRect(x: kScreenWidth - 14 - 60, y: 11, width: 60, height: 28)
-        sendButton.setTitle("发", for: UIControl.State.normal)
+        sendButton.setTitle("发", for: UIControl.State.normal)
         sendButton.setBackgroundImage(UIImage.imageWithColor(color: kThemeColor), for: UIControl.State.normal)
         sendButton.setBackgroundImage(UIImage.imageWithColor(color: kd8d8d8Color), for: UIControl.State.disabled)
         sendButton.titleLabel?.font = kRegularFont14