作者 李忠强

更新

... ... @@ -65,7 +65,7 @@ class Buy extends Api
{
$json = $this->request->param('data_json');
if (!$json) $this->error('data_json参数不能为空');
$json = str_replace('&qout;','"',$json);
$json = str_replace('"','"',$json);
$data = json_decode($json,true);
$goodsmodel = new \app\api\model\Goods();
$skumodel = new GoodsSpec();
... ...
... ... @@ -205,7 +205,7 @@ class Cart extends Api
$json = $this->request->param('data_json');
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}]';
$json = str_replace('&qout;','"',$json);
$json = str_replace('"','"',$json);
$data = json_decode($json,true);
$goodsmodel = new \app\api\model\Goods();
$skumodel = new GoodsSpec();
... ...
... ... @@ -177,7 +177,7 @@ class Order extends Api
{
$json = $this->request->param('data_json');
if (!$json) $this->error('data_json参数不能为空');
$json = str_replace('&qout;','"',$json);
$json = str_replace('"','"',$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);
$goodsmodel = new \app\api\model\Goods();
... ... @@ -383,7 +383,7 @@ class Order extends Api
->find();
if (!$coupon) $this->error('优惠券不存在');
}
$json = str_replace('&qout;','"',$json);
$json = str_replace('"','"',$json);
$data = json_decode($json,true);
$goodsmodel = new \app\api\model\Goods();
$skumodel = new GoodsSpec();
... ...