|
@@ -392,12 +392,22 @@ extension PublishEditController {
|
|
|
SwiftMoyaNetWorkServiceCommunity.shared().communityPublishApi(type: typeStr, img: majorImageUrl ?? "", topic_ids: topicJsonStr, video: paraVideo, title: pubTitle, content: pubContent, location: locationStr, imgs: imgsJsonStr) {
|
|
|
[weak self] (communityPublishModel) -> (Void) in
|
|
|
let communityPublishModel = communityPublishModel as? CommunityPublishModel
|
|
|
-
|
|
|
self?.publishSuccessAction(communityPublishModel!)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
func publishSuccessAction(_ pubModel: CommunityPublishModel) {
|
|
|
+ var typeStr: String = ""
|
|
|
+ if mediaType == .image {
|
|
|
+ typeStr = "image"
|
|
|
+ } else {
|
|
|
+ typeStr = "video"
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ VirusViewModel.shared.publishVirueRecordAddApi(postId: pubModel.postId, postType: typeStr, title: pubTitle, content: pubContent, postCover: majorImageUrl)
|
|
|
+
|
|
|
+
|
|
|
let sucVc = PublishSuccessController()
|
|
|
sucVc.postId = pubModel.postId
|
|
|
sucVc.bean = pubModel.bean
|
|
@@ -412,12 +422,6 @@ extension PublishEditController {
|
|
|
sucVc.nameStr = userMdl?.username
|
|
|
sucVc.avatarStr = userMdl?.avatarurl
|
|
|
sucVc.uid = userMdl?.uid
|
|
|
- var typeStr: String = ""
|
|
|
- if mediaType == .image {
|
|
|
- typeStr = "image"
|
|
|
- } else {
|
|
|
- typeStr = "video"
|
|
|
- }
|
|
|
sucVc.type = typeStr
|
|
|
|
|
|
self.navigationController?.pushViewController(sucVc, animated: true)
|