diff --git a/application/api/controller/Cart.php b/application/api/controller/Cart.php index f761d1d..28e2b27 100644 --- a/application/api/controller/Cart.php +++ b/application/api/controller/Cart.php @@ -206,10 +206,10 @@ class Cart extends Api if (!$json) $this->error('data_json参数不能为空'); // $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]'; $data = json_decode($json,true); + var_dump($json,$data);exit(); $goodsmodel = new \app\api\model\Goods(); $skumodel = new GoodsSpec(); $sum_price = 0; //总价格 - var_dump($data);exit(); foreach ($data as $key => $value){ if (!is_numeric($value['goods_id']) || !is_numeric($value['goods_sku_id']) || !is_numeric($value['number'])){ $this->error('参数不合法');