|
|
@@ -66,6 +66,7 @@ use app\common\service\ConfigService;
|
|
|
use app\common\service\FileService;
|
|
|
use app\shopapi\logic\BargainLogic;
|
|
|
use app\shopapi\logic\TeamLogic;
|
|
|
+use app\common\model\SpecialArea;
|
|
|
use expressage\Kd100;
|
|
|
use expressage\Kdniao;
|
|
|
use think\Exception;
|
|
|
@@ -330,7 +331,24 @@ class OrderLogic extends BaseLogic
|
|
|
foreach ($goods as $v){
|
|
|
$goods_total_price += $v['sub_price'];
|
|
|
}
|
|
|
- return $goods_total_price;
|
|
|
+ $area_id = $address['area_id'];
|
|
|
+ //无特殊地区设置默认10元
|
|
|
+ if($area_id == 0){
|
|
|
+ return 10;
|
|
|
+ }
|
|
|
+
|
|
|
+ $area_info = SpecialArea::where(['id'=>$area_id])->findOrEmpty();
|
|
|
+ if(empty($area_info)){
|
|
|
+ return 10;
|
|
|
+ }
|
|
|
+ $ship_fee = $area_info['shipping_fee'];
|
|
|
+
|
|
|
+ if($area_info['free_shipping_money'] <= $goods_total_price && $area_info['free_shipping_money']>0){
|
|
|
+ $ship_fee = 0;
|
|
|
+ }else if($area_info['reduce_shipping_money'] <= $goods_total_price && $area_info['reduce_shipping_money']>0){
|
|
|
+ $ship_fee = $area_info['reduce_shipping_fee'];
|
|
|
+ }
|
|
|
+ return $ship_fee;
|
|
|
}
|
|
|
/**
|
|
|
* @notes 是否符合包邮活动条件
|