|
@@ -78,23 +78,18 @@ public class BFRecordItemModel: NSObject {
|
|
if image != nil {
|
|
if image != nil {
|
|
self?.coverImg = image
|
|
self?.coverImg = image
|
|
if self?.mediaType == .Image {
|
|
if self?.mediaType == .Image {
|
|
- DispatchQueue.global().async {[weak self] in
|
|
|
|
- guard let wself = self else { return }
|
|
|
|
-
|
|
|
|
- //
|
|
|
|
- var size = CGSize.zero
|
|
|
|
- let rate = image!.size.width / image!.size.height
|
|
|
|
- if image!.size.width > image!.size.height {
|
|
|
|
- size.height = 50 * UIScreen.main.scale
|
|
|
|
- size.width = size.height * rate
|
|
|
|
- }else {
|
|
|
|
- size.width = 70 * UIScreen.main.scale
|
|
|
|
- size.height = size.width / rate
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if let thumImage = image?.nx_scaleToSize(size: size) {
|
|
|
|
- wself.thumbImgs.append(thumImage)
|
|
|
|
- }
|
|
|
|
|
|
+ var size = CGSize.zero
|
|
|
|
+ let rate = image!.size.width / image!.size.height
|
|
|
|
+ if image!.size.width > image!.size.height {
|
|
|
|
+ size.height = 50 * UIScreen.main.scale
|
|
|
|
+ size.width = size.height * rate
|
|
|
|
+ }else {
|
|
|
|
+ size.width = 70 * UIScreen.main.scale
|
|
|
|
+ size.height = size.width / rate
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if let thumImage = image?.nx_scaleToSize(size: size) {
|
|
|
|
+ self?.thumbImgs.append(thumImage)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
self?.fetchCoverImgCallBack?(image!)
|
|
self?.fetchCoverImgCallBack?(image!)
|