shish 6 years ago
parent
commit
cc977e5403
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/mall/controllers/OrderController.php

+ 3 - 3
app/mall/controllers/OrderController.php

@@ -46,8 +46,8 @@ class OrderController extends BaseController
 		if (isset($goodsInfo['stock']) == false || $goodsInfo['stock'] == 0) {
 			util::fail('已经卖完了');
 		}
-		//确认是否要配送的商品
-		$needSend = isset($goodsInfo['needSend']) && $goodsInfo['needSend'] == 1 ? 1 : 0;
+		//运费计算方式
+		$freightType = isset($goodsInfo['freightType']) ? $goodsInfo['freightType'] : 0;
 
 		$post['userId'] = $this->userId;
 		$user = $this->user;
@@ -66,7 +66,7 @@ class OrderController extends BaseController
 		//计算运费
 		$post['sendDistance'] = isset($post['sendDistance']) ? $post['sendDistance'] : 0;
 		$sendCost = 0;
-		if ($needSend == 1) {
+		if ($freightType == 0) {
 			$lat = $post['receiveLat'];//收货人纬度
 			$lng = $post['receiveLong'];//收货人经度
 			$respond = ExpressService::getUserDistance($lng, $lat, $defaultShopId, $this->merchantExtend);