|
@@ -942,19 +942,30 @@ extension VirusViewModel {
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {
|
|
[weak button,weak label] (data) -> (Void) in
|
|
[weak button,weak label] (data) -> (Void) in
|
|
|
|
+ let followStatusModel = FollowStatusModel()
|
|
|
|
+
|
|
if isCommentLike == 1 {
|
|
if isCommentLike == 1 {
|
|
button?.isSelected = false
|
|
button?.isSelected = false
|
|
let commentLikeCount = (commentLikeCount ?? 0) - 1
|
|
let commentLikeCount = (commentLikeCount ?? 0) - 1
|
|
label?.text = "\(commentLikeCount)"
|
|
label?.text = "\(commentLikeCount)"
|
|
|
|
+ followStatusModel.isFollowStatus = 0
|
|
|
|
+ followStatusModel.commentLikeCount = commentLikeCount
|
|
completion(0)
|
|
completion(0)
|
|
|
|
|
|
}else {
|
|
}else {
|
|
button?.isSelected = true
|
|
button?.isSelected = true
|
|
let commentLikeCount = ((commentLikeCount ?? 0) + 1)
|
|
let commentLikeCount = ((commentLikeCount ?? 0) + 1)
|
|
label?.text = "\(commentLikeCount)"
|
|
label?.text = "\(commentLikeCount)"
|
|
|
|
+ followStatusModel.isFollowStatus = 1
|
|
|
|
+ followStatusModel.commentLikeCount = commentLikeCount
|
|
completion(1)
|
|
completion(1)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ followStatusModel.uid = commentUId
|
|
|
|
+ followStatusModel.postId = postId
|
|
|
|
+ followStatusModel.commnetId = commentId
|
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isCommnetLikeApi"), object: followStatusModel)
|
|
|
|
+
|
|
}, fail: {_ in})
|
|
}, fail: {_ in})
|
|
}
|
|
}
|
|
}
|
|
}
|