shish 6 سال پیش
والد
کامیت
e4327370c4
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      common/components/business.php

+ 2 - 3
common/components/business.php

@@ -5,8 +5,8 @@
  */
 
 namespace common\components;
-
 use Yii;
+use yii\imagine\Image;
 
 class business
 {
@@ -63,8 +63,7 @@ class business
 			$normal = $prefixImgUrl . $imgUrl;
 			//没有小图则生成小图,兼容旧系统
 			if (file_exists($imageRoot . $smallImg) == false) {
-				$noPreImgUrl = str_replace('/uploads','',$imgUrl);
-				$preImg = $imageRoot . $noPreImgUrl;
+				$preImg = $imageRoot . str_replace('/uploads', '', $imgUrl);
 				$imgInfo = getimagesize($preImg);
 				$width = $imgInfo[0];
 				$height = $imgInfo[1];