shish 2 tahun lalu
induk
melakukan
f968f1ecd3
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      app-ghs/controllers/ItemController.php

+ 4 - 2
app-ghs/controllers/ItemController.php

@@ -71,8 +71,10 @@ class ItemController extends BaseController
             //开单的花材列表
             $field = 'id,py,cover,name,cost,itemId,classId,skPrice,variety,price,hjPrice,hjDiscountPrice,skDiscountPrice,discountPrice,stock,weight,stockWarning,presell,ratioType,smallUnit,smallRatio,bigUnit,ratio,frontHide,reachNum,reachNumDiscount';
             $result = ProductClass::getList($field, $where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC]);
-            $itemInfoData = $result['list'] ?? [];
-            $itemInfoData = ProductClass::kdItemGroup($itemInfoData, $level);
+            $list = $result['list'] ?? [];
+            $list = ProductClass::kdItemGroup($list, $level);
+            $result['list'] = $list;
+            util::success($result);
         } elseif ($requestType == 'book') {
             //预订花材列表
             $field = 'id,py,cover,name,cost,itemId,classId,skPrice,variety,price,hjPrice,hjDiscountPrice,skDiscountPrice,discountPrice,stock,weight,stockWarning,presell,ratioType,smallUnit,smallRatio,bigUnit,ratio,frontHide';