|
|
@@ -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];
|