作者 李忠强

更新

... ... @@ -63,7 +63,7 @@ class Buy extends Api
*/
public function priceCalculation()
{
$json = $this->request->post('data_json');
$json = $this->request->param('data_json');
if (!$json) $this->error('data_json参数不能为空');
$data = json_decode($json,true);
$goodsmodel = new \app\api\model\Goods();
... ...
... ... @@ -202,8 +202,7 @@ class Cart extends Api
*/
public function priceCalculation()
{
$json = $this->request->param();
var_dump($json);exit();
$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}]';
$data = json_decode($json,true);
... ...
... ... @@ -175,7 +175,7 @@ class Order extends Api
*/
public function orderCalculation()
{
$json = $this->request->post('data_json');
$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}]';
$data = json_decode($json,true);
... ... @@ -364,9 +364,9 @@ class Order extends Api
*/
public function addOrder()
{
$json = $this->request->post('data_json');
$coupon_id = $this->request->post('coupon_id');
$address_id = $this->request->post('address_id');
$json = $this->request->param('data_json');
$coupon_id = $this->request->param('coupon_id');
$address_id = $this->request->param('address_id');
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}]';
$address = Db::name('user_address')
... ...