Pārlūkot izejas kodu

生成分享图片时长问题

jsonwang 3 gadi atpakaļ
vecāks
revīzija
f85bcb3f3f

+ 6 - 3
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -1292,18 +1292,21 @@ extension PQStuckPointPublicController {
                 .uploadObjectAsync(bucketName: bucketName, objectKey: objectKey, data: data!, fileExtensions: "png", imageUploadBlock: { _, code, ossObjectKey, _ in
                     if code == 1 && ossObjectKey == objectKey && ossObjectKey.count > 0 {
                         PQUploadViewModel.updateVideo(title: self?.videoData?.title ?? "", videoId: self?.videoData?.uniqueId ?? "", coverImgPath: objectKey, descr: "") { newVideoData, msg in
-                            PQLoadingHUB.shared.dismissHUB()
-                   
+                            
                             if newVideoData == nil {
                                 cShowHUB(superView: self?.view, msg: msg)
                                 //可能有敏感词 要刷一组新标题并自动更新
                                 let numberRandom: UInt32 = UInt32(arc4random_uniform(UInt32(  self?.publicTitleView.titles.count ?? 0)))
                      
                                 self?.setTitleText(text:   self?.publicTitleView.titles[Int(numberRandom)] ?? "")
-                                
                                 self?.updateCoverImagegOrTitle()
+                                sleep(UInt32(1.5))
+                                PQLoadingHUB.shared.dismissHUB()
                                 
                                 return
+                            }else{
+                                
+                                PQLoadingHUB.shared.dismissHUB()
                             }
                         }
                     } else {