|
@@ -72,7 +72,7 @@ class FreightLogic extends BaseLogic
|
|
|
}
|
|
}
|
|
|
$area_flag = ConfigService::get('shop', 'area_flag');
|
|
$area_flag = ConfigService::get('shop', 'area_flag');
|
|
|
if($area_flag == 1){
|
|
if($area_flag == 1){
|
|
|
- $expressPrice +=22;
|
|
|
|
|
|
|
+ $expressPrice += self::calculate2($goods, $userAddress);
|
|
|
}else {
|
|
}else {
|
|
|
|
|
|
|
|
|
|
|
|
@@ -171,7 +171,15 @@ class FreightLogic extends BaseLogic
|
|
|
return $freight['first_money'];
|
|
return $freight['first_money'];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ //特定地区运费计算
|
|
|
|
|
+ public static function calculate2($data, $userAddress)
|
|
|
|
|
+ {
|
|
|
|
|
+ $goods_price=0;
|
|
|
|
|
+ foreach ($data as &$v){
|
|
|
|
|
+ $goods_price +=$v['sub_price'];
|
|
|
|
|
+ }
|
|
|
|
|
+ return $goods_price;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @notes 通过用户地址获取运费模板
|
|
* @notes 通过用户地址获取运费模板
|