shish 3 лет назад
Родитель
Сommit
06d3176bd6
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      app-ghs/controllers/ProductController.php

+ 6 - 1
app-ghs/controllers/ProductController.php

@@ -284,7 +284,12 @@ class ProductController extends BaseController
             $itemInfoData = ProductClass::stockOutGroup($itemInfoData, $level);
         } elseif ($requestType == 'cg') {
             //采购花材
-            $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,presell,ratioType,smallUnit,bigUnit,ratio,weight';
+            if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
+                //惠雅鲜花的不列出frontHide字段,因为他花材太多很慢了
+                $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,presell,ratioType,smallUnit,bigUnit,ratio,weight';
+            }else{
+                $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,presell,ratioType,smallUnit,bigUnit,ratio,weight,frontHide';
+            }
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
             $itemInfoData = ProductClass::cgItemGroup($itemInfoData, $level);
         } elseif ($requestType == 'warning') {