|
|
@@ -46,7 +46,7 @@ class freight
|
|
|
//距离计算
|
|
|
Yii::info("距离为:".$phpStatDistance);
|
|
|
$phpStatDistance = $phpStatDistance -2;
|
|
|
- if($phpStatDistance){
|
|
|
+ if($phpStatDistance > 0){
|
|
|
if ($phpStatDistance <=10){
|
|
|
//每新增1km加2
|
|
|
$diffCost = $phpStatDistance*2;
|
|
|
@@ -66,7 +66,7 @@ class freight
|
|
|
//重量计算
|
|
|
Yii::info("重量为:".$weight);
|
|
|
$weight = $weight -2;
|
|
|
- if($weight){
|
|
|
+ if($weight > 0){
|
|
|
if ($weight <=10){
|
|
|
//每增1 kg 加2
|
|
|
$diff = ceil(($weight - 2));
|