|
@@ -98,9 +98,8 @@ class PublishEditVideoCoverImageTableViewCell: UITableViewCell {
|
|
|
}
|
|
|
var coverImage : UIImage? {
|
|
|
didSet {
|
|
|
- coverImageButton.setImage(coverImage, for: UIControl.State.normal)
|
|
|
- let imgData: Data? = UIImage.pngData(coverImage!)()
|
|
|
- do {
|
|
|
+ do {
|
|
|
+
|
|
|
// 清除图片路径
|
|
|
PathURLManager.clearPath(pathURL:
|
|
|
PathURLManager.projectPicturesPath(parentURL:
|
|
@@ -118,15 +117,14 @@ class PublishEditVideoCoverImageTableViewCell: UITableViewCell {
|
|
|
PathURLManager.projectResourcesPath(parentURL:
|
|
|
PathURLManager.projectRecordssPath(parentURL:
|
|
|
PathURLManager.projectDocumentPath()))))))!
|
|
|
-
|
|
|
+ let imgData: Data? = UIImage.pngData(coverImage!)()
|
|
|
try imgData?.write(to: outCoverImagePathURL)
|
|
|
publishManagerVideoModel?.outCoverImagePath = outCoverImagePathURL.path
|
|
|
publishManagerVideoModel?.outCoverImagePathURL = outCoverImagePathURL
|
|
|
- }
|
|
|
- catch {
|
|
|
+ coverImageButton.setImage(coverImage, for: UIControl.State.normal)
|
|
|
+ } catch {
|
|
|
SwiftProgressHUD.shared().showText("封面写入失败")
|
|
|
NXLLog("存入失败")
|
|
|
- return
|
|
|
}
|
|
|
}
|
|
|
}
|