shish 5 лет назад
Родитель
Сommit
4a1b4e64ac
1 измененных файлов с 8 добавлено и 8 удалено
  1. 8 8
      app-hd/controllers/OrderController.php

+ 8 - 8
app-hd/controllers/OrderController.php

@@ -120,16 +120,16 @@ class OrderController extends BaseController
 
             //计算运费
             $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;
             $currentPrice = stringUtil::calcAdd($sendCost, $totalGoodsPrice);
             $post['prePrice'] = $currentPrice;