Răsfoiți Sursa

商品列表接口(goods/list)添加查询参数 priceType

shizhongqi 10 luni în urmă
părinte
comite
5122774645
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      app-hd/controllers/GoodsController.php

+ 4 - 0
app-hd/controllers/GoodsController.php

@@ -115,12 +115,16 @@ class GoodsController extends BaseController
     {
         $get = Yii::$app->request->get();
         $cId = isset($get['cId']) ? intval($get['cId']) : 0;
+        $priceType = isset($get['priceType']) ? $get['priceType'] : null;
         $shop = $this->shop;
         $custom = $this->custom;
         $argument = [];
         if (!empty($cId)) {
             $argument['catId'] = $cId;
         }
+        if ($priceType != null && in_array($priceType, [0, 1])) {
+            $argument['priceType'] = $priceType;
+        }
         $argument['pageSize'] = 20;
         $argument['requestType'] = 'goodsList';
         $data = GoodsCategoryClass::getGoodsList($argument, $shop, $custom);