diff --git a/FlyCube/Api/Controller/CheckController.class.php b/FlyCube/Api/Controller/CheckController.class.php index 38c28a6..6d07282 100644 --- a/FlyCube/Api/Controller/CheckController.class.php +++ b/FlyCube/Api/Controller/CheckController.class.php @@ -104,7 +104,16 @@ class CheckController extends PublicController //后台校验总价格 和 前端总价格 if ($total_price != $_REQUEST['total']) { - echo json_encode(array('status' => 1, 'msg' => '价格不符!')); + echo json_encode(array('status' => 0, 'msg' => '价格不符!')); + exit(); //有问题跳出 + } + + //后台校验 运费 打包费 和 前端提交值 ps:目前和商铺表 里的运费 打包费进行比较 后续可能要根据比如运输距离 商户根据订单单独修改的值 进行对比 + $shopDb = D('shop'); + $whereShop['shop_id'] = $_REQUEST['shop_id']; + $shop = $shopDb->where($whereShop)->find(); + if ($_REQUEST['default_transport_price'] != $shop['default_transport_price'] || $_REQUEST['default_pack_price'] != $shop['default_pack_price']) { + echo json_encode(array('status' => 0, 'msg' => '运费和打包费不符!')); exit(); //有问题跳出 }