|
@@ -80,7 +80,19 @@ public class BFRecordItemModel: NSObject {
|
|
|
if self?.mediaType == .Image {
|
|
|
DispatchQueue.global().async {[weak self] in
|
|
|
guard let wself = self else { return }
|
|
|
- if let thumImage = image?.nx_scaleToSize(size: CGSize(width: 112, height: 200)) {
|
|
|
+
|
|
|
+ //
|
|
|
+ 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)
|
|
|
}
|
|
|
}
|