Chris 5 years ago
parent
commit
d23b419794

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

@@ -10,7 +10,7 @@ class CommunityPostCommentsModel : NSObject, Mappable{
 
 	var data : [CommunityPostCommentModel]?
 	var pagination : PaginationModel?
-
+    var commentCount : Int?
 
 	class func newInstance(map: Map) -> Mappable?{
 		return CommunityPostCommentsModel()
@@ -22,7 +22,7 @@ class CommunityPostCommentsModel : NSObject, Mappable{
 	{
 		data <- map["data"]
 		pagination <- map["pagination"]
-		
+		commentCount <- map["comment_count"]
 	}
 
 }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/AllCommentCell/RecommendCommentHeader.swift

@@ -24,7 +24,7 @@ class RecommendCommentHeader: BaseView {
     
     private lazy var commentLabel: UILabel = {
         let commentLabel = UILabel()
-        commentLabel.text = "全部评论 8"
+        commentLabel.text = "全部评论"
         commentLabel.textColor = k262626Color
         commentLabel.font = kMediumFont18
         return commentLabel

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

@@ -238,7 +238,7 @@ extension CommunityAllCommentView {
             [weak self] (communityPostCommentsModel) -> (Void) in
             let communityPostCommentsModel = communityPostCommentsModel as? CommunityPostCommentsModel
             self?.communityPostCommentsModel = communityPostCommentsModel
-            let totalComments: Int = communityPostCommentsModel?.pagination?.total ?? 0
+            let totalComments: Int = communityPostCommentsModel?.commentCount ?? 0
             self?.titleLabel.text = "全部评论 \(totalComments)"
             if totalComments == 0 {
                 self?.tableView.isHidden = true
@@ -297,7 +297,7 @@ extension CommunityAllCommentView {
                 }
                 
                 let count = 1 + (self?.communityPostCommentsModel?.pagination?.total ?? 0)
-                self?.communityPostCommentsModel?.pagination?.total = count
+                self?.communityPostCommentsModel?.commentCount = count
                 self?.titleLabel.text = "全部评论 \(count)"
                 VirusViewModel.shared.comment(communityVideoItemModel: (self?.videoItemModel)!, id: communityPostCommentIdModel?.id ?? 0,content: text)
                 

File diff suppressed because it is too large
+ 16 - 7
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/View/CommunityVideoCoverCollectionCell.swift