|
@@ -46,7 +46,7 @@ extension VirusViewModel {
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "unlikeApi"), object: followStatusModel)
|
|
|
completion(1)
|
|
|
}
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 喜欢/不喜欢
|
|
@@ -111,7 +111,7 @@ extension VirusViewModel {
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isLikeApi"), object: followStatusModel)
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 点赞
|
|
@@ -175,7 +175,7 @@ extension VirusViewModel {
|
|
|
completion(0)
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isCollectApi"), object: followStatusModel)
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 收藏
|
|
@@ -228,7 +228,7 @@ extension VirusViewModel {
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "unlikeApi"), object: followStatusModel)
|
|
|
completion(1)
|
|
|
}
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 喜欢/不喜欢
|
|
@@ -296,7 +296,7 @@ extension VirusViewModel {
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isLikeApi"), object: followStatusModel)
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 点赞
|
|
@@ -359,7 +359,7 @@ extension VirusViewModel {
|
|
|
completion(0)
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isCollectApi"), object: followStatusModel)
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 收藏
|
|
@@ -421,7 +421,7 @@ extension VirusViewModel {
|
|
|
completion(0)
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isLikeApi"), object: followStatusModel)
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 点赞
|
|
@@ -486,7 +486,7 @@ extension VirusViewModel {
|
|
|
}
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isCollectApi"), object: followStatusModel)
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
/// 收藏
|
|
@@ -526,7 +526,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.commentId = id
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func comment(communityFollowDataModel:CommunityFollowDataModel? = nil,id:Int,content:String) {
|
|
@@ -553,7 +553,7 @@ extension VirusViewModel {
|
|
|
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
|
|
@@ -579,7 +579,7 @@ extension VirusViewModel {
|
|
|
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func commentReply(communityPostDetailModel:CommunityPostDetailModel,id:Int,content:String,communityPostCommentModel:CommunityPostCommentModel? = nil) {
|
|
@@ -608,7 +608,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.commentId = id
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func commentReplyAIT(communityPostDetailModel:CommunityPostDetailModel,id:Int,content:String,communityPostCommentModel:CommunityPostCommentModel? = nil,communityPostReplyModel:CommunityPostReplyModel? = nil) {
|
|
@@ -642,7 +642,7 @@ extension VirusViewModel {
|
|
|
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func commentVideo(communityVideoItemModel:CommunityVideoItemModel,id:Int,content:String) {
|
|
@@ -667,7 +667,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.commentId = id
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func commentVideoReply(communityVideoItemModel:CommunityVideoItemModel,id:Int,content:String,communityPostCommentModel:CommunityPostCommentModel? = nil) {
|
|
@@ -697,7 +697,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.commentId = id
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
func commentVideoReplyAIT(communityVideoItemModel:CommunityVideoItemModel,id:Int,content:String,communityPostCommentModel:CommunityPostCommentModel? = nil,communityPostReplyModel:CommunityPostReplyModel? = nil) {
|
|
@@ -730,7 +730,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.commentId = id
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -783,7 +783,7 @@ extension VirusViewModel {
|
|
|
commentView?.communityPostDetailModel = communityPostDetailModel
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isLikeApi"), object: followStatusModel)
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
|
|
|
|
|
@@ -836,7 +836,7 @@ extension VirusViewModel {
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isCollectApi"), object: followStatusModel)
|
|
|
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -894,7 +894,7 @@ extension VirusViewModel {
|
|
|
cell?.likeBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "isLikeApi"), object: followStatusModel)
|
|
|
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -920,7 +920,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.postType = postType
|
|
|
virueRecordAddParameterModel.postCover = postCover
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -945,13 +945,13 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.postCover = postCover
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// MARK: - 发布
|
|
|
extension VirusViewModel {
|
|
|
- func publishVirueRecordAddApi(postId:Int?,postType:String?,title:String?,content:String?,postCover:String?,completion:@escaping ()->Void) {
|
|
|
+ func publishVirueRecordAddApi(postId:Int?,postType:String?,title:String?,content:String?,postCover:String?,completion:@escaping ()->Void,fail:@escaping ()->Void) {
|
|
|
|
|
|
let virueRecordAddParameterModel = VirueRecordAddParameterModel()
|
|
|
virueRecordAddParameterModel.behaviorId = (ConfigModel.shared.object()?.virus?.publish ?? "")
|
|
@@ -971,7 +971,9 @@ extension VirusViewModel {
|
|
|
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
completion()
|
|
|
- })
|
|
|
+ }){ _ in
|
|
|
+ fail()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -987,7 +989,7 @@ extension VirusViewModel {
|
|
|
virueRecordAddParameterModel.actionId = BehaviorFlagType.register.rawValue
|
|
|
SwiftMoyaNetWorkServiceVirus.shared().virueRecordAddApi(virueRecordAddParameterModel: virueRecordAddParameterModel, completion: {(data) -> (Void) in
|
|
|
completion()
|
|
|
- })
|
|
|
+ }, fail: {_ in})
|
|
|
}
|
|
|
}
|
|
|
}
|