|
|
@@ -172,13 +172,13 @@ class OrderLogic extends BaseLogic
|
|
|
if ($is_address == 0) {
|
|
|
$userAddress = [];
|
|
|
}
|
|
|
-
|
|
|
+ $area_flag = ConfigService::get('shop', 'area_flag');
|
|
|
outFileLog($userAddress,'freight','$userAddress');
|
|
|
//计算运费(自提订单不需要运费)
|
|
|
if ($params['delivery_type'] == DeliveryEnum::SELF_DELIVERY) {
|
|
|
self::$orderPrice['express_price'] = 0;
|
|
|
} else {
|
|
|
- $area_flag = ConfigService::get('shop', 'area_flag');
|
|
|
+
|
|
|
if($area_flag==1){
|
|
|
// $express_data = FreightLogic::calculateFreight($goodsLists, $userAddress);
|
|
|
$new_express_price = self::getNewExpressPrice($goodsLists,$userAddress);
|
|
|
@@ -237,6 +237,7 @@ class OrderLogic extends BaseLogic
|
|
|
'is_address' => $is_address,
|
|
|
'draw_record_id' => $params['draw_record_id'] ?? 0,
|
|
|
];
|
|
|
+ outFileLog($result,'freight','express_price2');
|
|
|
//门店自提显示上次提货人信息
|
|
|
if ($params['delivery_type'] == DeliveryEnum::SELF_DELIVERY) {
|
|
|
$selffetch_info = Order::where(['user_id' => $user['id'], 'delivery_type' => DeliveryEnum::SELF_DELIVERY])
|
|
|
@@ -298,7 +299,7 @@ class OrderLogic extends BaseLogic
|
|
|
}
|
|
|
|
|
|
// 判断是否符合包邮活动条件
|
|
|
- if (self::isFreeShipping($result)) {
|
|
|
+ if (self::isFreeShipping($result) && $area_flag==0) {
|
|
|
$result['order_amount'] = $result['order_amount'] - $result['express_price'];
|
|
|
$result['total_amount'] = $result['total_amount'] - $result['express_price'];
|
|
|
$result['express_price'] = 0;
|