|
@@ -226,7 +226,7 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
let progressView = UIProgressView(progressViewStyle: .default)
|
|
|
progressView.trackTintColor = UIColor(white: 0, alpha: 0.5)
|
|
|
progressView.progressTintColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
|
|
|
- progressView.transform = CGAffineTransform(scaleX: 1.0, y: playerHeaderView.frame.height / 3.0)
|
|
|
+ progressView.transform = CGAffineTransform(scaleX: 1.0, y: playerHeaderView.frame.height)
|
|
|
return progressView
|
|
|
}()
|
|
|
|
|
@@ -296,12 +296,15 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
publicTitleView.isHidden = true
|
|
|
publicTitleView.confirmBtnClock = { [weak self] title in
|
|
|
BFLog(message: "传出的 title is :\(String(describing: title))")
|
|
|
- self?.changPlayerIsPause(isPause: false)
|
|
|
+ if(title?.count != 0 && title != self?.titleLabel.text){
|
|
|
+ self?.changPlayerIsPause(isPause: false)
|
|
|
|
|
|
- self?.setTitleText(text: title ?? "",textColor: .black)
|
|
|
- //更新数据
|
|
|
- self?.videoData?.title = title
|
|
|
- self?.updateCoverImagegOrTitle()
|
|
|
+ self?.setTitleText(text: title ?? "",textColor: .black)
|
|
|
+ //更新数据
|
|
|
+ self?.videoData?.title = title
|
|
|
+ self?.updateCoverImagegOrTitle()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
publicTitleView.viewIsHiddenCallBack = { [weak self] in
|
|
|
|
|
@@ -445,6 +448,7 @@ class PQStuckPointPublicController: PQBaseViewController {
|
|
|
view.addSubview(publicTitleView)
|
|
|
view.addSubview(publicEditCoverView)
|
|
|
|
|
|
+ coverImageTitle.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(settingCoverImage)))
|
|
|
coverImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(settingCoverImage)))
|
|
|
|
|
|
progressView.snp.makeConstraints { make in
|
|
@@ -1129,7 +1133,7 @@ extension PQStuckPointPublicController {
|
|
|
navigationController?.viewControllers = [(navigationController?.viewControllers.first)!]
|
|
|
// 发送通知
|
|
|
postNotification(name: cFinishedPublishedNotiKey)
|
|
|
- postNotification(name: cFinishSharedNotiKey)
|
|
|
+
|
|
|
|
|
|
default:
|
|
|
break
|
|
@@ -1262,7 +1266,7 @@ extension PQStuckPointPublicController {
|
|
|
//更新标题或封面
|
|
|
func updateCoverImagegOrTitle() {
|
|
|
|
|
|
- PQLoadingHUB.shared.showHUB()
|
|
|
+ PQLoadingHUB.shared.showHUB(isMode: true)
|
|
|
|
|
|
PQBaseViewModel.ossTempToken { [weak self] response, msg in
|
|
|
let image: UIImage = (self?.uploadData?.image)!
|
|
@@ -1285,12 +1289,18 @@ extension PQStuckPointPublicController {
|
|
|
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()
|
|
|
+
|
|
|
return
|
|
|
}
|
|
|
-// self?.navigationController?.popToRootViewController(animated: true)
|
|
|
-// postNotification(name: cUpdateVideoSuccessKey, userInfo: ["videoData": newVideoData!])
|
|
|
}
|
|
|
} else {
|
|
|
PQLoadingHUB.shared.dismissHUB()
|
|
@@ -1328,7 +1338,7 @@ extension PQStuckPointPublicController {
|
|
|
|
|
|
@objc func imageSelectedImage(notify: Notification) {
|
|
|
let imageData: UIImage? = notify.userInfo?["image"] as? UIImage
|
|
|
- if imageData != nil {
|
|
|
+ if imageData != nil {
|
|
|
changPlayerIsPause(isPause: false)
|
|
|
BFLog(message: "从系统相册选择了一个照片")
|
|
|
publicEditCoverView.isHidden = true
|