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