|
|
@@ -37,7 +37,7 @@ class business
|
|
|
//对商品图片转化 ssh 2019.12.2
|
|
|
public static function formatGoodsImg($info)
|
|
|
{
|
|
|
- $shopImg = isset($info['shopImg']) ? $info['shopImg'] : [];
|
|
|
+ $shopImg = $info['shopImg'] ?? [];
|
|
|
unset($info['shopImg']);
|
|
|
if (empty($shopImg)) {
|
|
|
$info['shortImgList'] = ['/hhb_small.png'];
|
|
|
@@ -46,7 +46,7 @@ class business
|
|
|
return $info;
|
|
|
}
|
|
|
$arr = json_decode($shopImg, true);
|
|
|
- if (is_array($arr) == false) {
|
|
|
+ if (!is_array($arr)) {
|
|
|
$info['shortImgList'] = ['/hhb_small.png'];
|
|
|
$info['imgList'] = [imgUtil::groupImg('')];
|
|
|
$info['smallImgList'] = [imgUtil::groupImg('')];
|
|
|
@@ -54,10 +54,9 @@ class business
|
|
|
}
|
|
|
$imgList = [];
|
|
|
$smallImgList = [];
|
|
|
- $prefixImgUrl = imgUtil::getPrefix();
|
|
|
foreach ($arr as $imgUrl) {
|
|
|
$small = imgUtil::groupImg($imgUrl) . "?x-oss-process=image/resize,m_fill,h_700,w_700";
|
|
|
- $normal = $prefixImgUrl . $imgUrl;
|
|
|
+ $normal = imgUtil::groupImg($imgUrl) . "?x-oss-process=image/resize,m_fill,h_900,w_900";
|
|
|
$imgList[] = $normal;
|
|
|
$smallImgList[] = $small;
|
|
|
}
|