|
|
@@ -108,7 +108,7 @@ class PurchaseController extends BaseController
|
|
|
|
|
|
$sendType = $post['sendType'] ?? 0;
|
|
|
$sendCost = 0;
|
|
|
- $packCost = 0;
|
|
|
+
|
|
|
if ($sendType == dict::getDict('sendType', 'thirdSend')) {
|
|
|
$weight = 0;
|
|
|
foreach ($productList as $itemData) {
|
|
|
@@ -117,9 +117,13 @@ class PurchaseController extends BaseController
|
|
|
}
|
|
|
$result = PurchaseClass::getDistanceFee($this->shop, $ghsShopInfo, $weight);
|
|
|
$sendCost = $result['fee'] ?? 0;
|
|
|
- $packCost = $ghsShopInfo->packCost ?? 0;
|
|
|
}
|
|
|
$post['sendCost'] = $sendCost;
|
|
|
+ //出车和发快递可以算打包费
|
|
|
+ $packCost = 0;
|
|
|
+ if ($sendType == dict::getDict('sendType', 'thirdSend') || $sendType == dict::getDict('sendType', 'carGet')) {
|
|
|
+ $packCost = $ghsShopInfo->packCost ?? 0;
|
|
|
+ }
|
|
|
$post['packCost'] = $packCost;
|
|
|
|
|
|
$respond = PurchaseService::createPurchase($post, $ghsInfo);
|