|
@@ -120,16 +120,16 @@ class OrderController extends BaseController
|
|
|
|
|
|
|
|
//计算运费
|
|
//计算运费
|
|
|
$post['sendDistance'] = isset($post['sendDistance']) ? $post['sendDistance'] : 0;
|
|
$post['sendDistance'] = isset($post['sendDistance']) ? $post['sendDistance'] : 0;
|
|
|
- $sendCost = 0;
|
|
|
|
|
|
|
+ $sendCost = isset($post['sendCost']) && is_numeric($post['sendCost']) ? $post['sendCost'] : 0;
|
|
|
//按距离计算运费并且客户要求送的
|
|
//按距离计算运费并且客户要求送的
|
|
|
//运费计算方式
|
|
//运费计算方式
|
|
|
- $freightType = 0;
|
|
|
|
|
- if ($freightType == 0 && $needSend == 1) {
|
|
|
|
|
- //$lat = $post['latitude']??'';//收货人纬度
|
|
|
|
|
- //$lng = $post['longitude']??'';//收货人经度
|
|
|
|
|
- //$respond = ExpressService::getUserDistance($lng, $lat, $defaultShopId, $this->sjExtend);
|
|
|
|
|
- //$sendCost = isset($respond['fee']) ? $respond['fee'] : 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //$freightType = 0;
|
|
|
|
|
+ //if ($freightType == 0 && $needSend == 1) {
|
|
|
|
|
+ //$lat = $post['latitude']??'';//收货人纬度
|
|
|
|
|
+ //$lng = $post['longitude']??'';//收货人经度
|
|
|
|
|
+ //$respond = ExpressService::getUserDistance($lng, $lat, $defaultShopId, $this->sjExtend);
|
|
|
|
|
+ //$sendCost = isset($respond['fee']) ? $respond['fee'] : 0;
|
|
|
|
|
+ //}
|
|
|
$post['sendCost'] = $sendCost;
|
|
$post['sendCost'] = $sendCost;
|
|
|
$currentPrice = stringUtil::calcAdd($sendCost, $totalGoodsPrice);
|
|
$currentPrice = stringUtil::calcAdd($sendCost, $totalGoodsPrice);
|
|
|
$post['prePrice'] = $currentPrice;
|
|
$post['prePrice'] = $currentPrice;
|