|
|
@@ -62,20 +62,22 @@ class business
|
|
|
$smallImg = self::getSmallImg($imgUrl);
|
|
|
$small = $prefixImgUrl . $smallImg;
|
|
|
$normal = $prefixImgUrl . $imgUrl;
|
|
|
- $preImg = $imageRoot . str_replace('/uploads', '', $imgUrl);
|
|
|
- if (file_exists($preImg)) {
|
|
|
- //没有小图则生成小图,兼容旧系统
|
|
|
- if (file_exists($imageRoot . $smallImg) == false) {
|
|
|
- $imgInfo = getimagesize($preImg);
|
|
|
- $width = $imgInfo[0];
|
|
|
- $height = $imgInfo[1];
|
|
|
- //生成小图 200px
|
|
|
- $smallWidth = 200;
|
|
|
- $smallHeight = ceil((200 * $height) / $width);
|
|
|
- $smallFullPathFile = $imageRoot . str_replace('/uploads', '', $smallImg);
|
|
|
- Image::thumbnail($preImg, $smallWidth, $smallHeight)->save($smallFullPathFile, ['quality' => 100]);
|
|
|
- }
|
|
|
- }
|
|
|
+ /*
|
|
|
+ $preImg = $imageRoot . str_replace('/uploads', '', $imgUrl);
|
|
|
+ if (file_exists($preImg)) {
|
|
|
+ //没有小图则生成小图,兼容旧系统
|
|
|
+ if (file_exists($imageRoot . $smallImg) == false) {
|
|
|
+ $imgInfo = getimagesize($preImg);
|
|
|
+ $width = $imgInfo[0];
|
|
|
+ $height = $imgInfo[1];
|
|
|
+ //生成小图 200px
|
|
|
+ $smallWidth = 200;
|
|
|
+ $smallHeight = ceil((200 * $height) / $width);
|
|
|
+ $smallFullPathFile = $imageRoot . str_replace('/uploads', '', $smallImg);
|
|
|
+ Image::thumbnail($preImg, $smallWidth, $smallHeight)->save($smallFullPathFile, ['quality' => 100]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ */
|
|
|
$imgList[] = $normal;
|
|
|
$smallImgList[] = $small;
|
|
|
}
|