@@ -244,7 +244,7 @@ class ProductController extends BaseController
->andWhere('`stock`<`stockWarning`')
->andWhere("delStatus=0")
->select($field)->asArray()->all();
- $itemInfoData = ProductClass::cgItemGroup($itemInfoData, $level);
+ $itemInfoData = ProductClass::warningGroup($itemInfoData, $level);
} else {
//通用
$field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell,presellDate';
@@ -101,6 +101,16 @@ class ProductClass extends BaseClass
return current($list);
}
+ //花材列表用到的数据组合 ssh 20221225
+ public static function warningGroup($list, $level = 0)
+ {
+ foreach ($list as $k => $v) {
+ $shortCover = $v['cover'] ?? '';
+ $list[$k]['cover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_100,w_100";
+ }
+ return $list;
+
//花材列表用到的数据组合 ssh 20221225
public static function cgItemGroup($list, $level = 0)
{