|
|
@@ -55,7 +55,7 @@ class GhsController extends BaseController
|
|
|
$perKmPrice = $shCurrentConfig['perKmPrice'] ?? 0;//超出起步,每公里加收金额
|
|
|
$changeRate = $shCurrentConfig['changeRate'] ?? 0;//负值时为降价百分比,正值时为涨价百分比
|
|
|
if ($startKm <= 0 || $startPrice <= 0 || $perKmPrice <= 0) {
|
|
|
- util::success(['sendCost' => 0, 'distanceKm' => 0,'distance'=>0]);
|
|
|
+ util::success(['sendCost' => 0, 'distanceKm' => 0, 'distance' => 0]);
|
|
|
}
|
|
|
//计算客户到店的距离,骑电动车
|
|
|
$distanceRespond = mapUtil::calcShopDistanceByEleBike($custom, $ghs, 0);
|
|
|
@@ -64,7 +64,7 @@ class GhsController extends BaseController
|
|
|
$distance = floatval($distance);
|
|
|
$sendDistance = floatval($sendDistance);
|
|
|
if ($sendDistance <= 0) {
|
|
|
- util::success(['sendCost' => 0, 'distanceKm' => 0,'distance'=>0]);
|
|
|
+ util::success(['sendCost' => 0, 'distanceKm' => 0, 'distance' => 0]);
|
|
|
}
|
|
|
// 计算运费逻辑
|
|
|
$sendCost = $startPrice;
|
|
|
@@ -79,7 +79,7 @@ class GhsController extends BaseController
|
|
|
$sendCost = bcmul($sendCost, $rate, 2);
|
|
|
}
|
|
|
$sendCost = floatval($sendCost);
|
|
|
- util::success(['sendCost' => $sendCost, 'distanceKm' => $sendDistance,'distance'=>$distance]);
|
|
|
+ util::success(['sendCost' => $sendCost, 'distanceKm' => $sendDistance, 'distance' => $distance]);
|
|
|
}
|
|
|
|
|
|
//提示花店有多个供货商
|
|
|
@@ -379,8 +379,8 @@ class GhsController extends BaseController
|
|
|
/*****此区域部分可以考虑删除******/
|
|
|
|
|
|
//是否使用新的配送方式,关键词 sh_method_area
|
|
|
- $newShMethod = dict::getNewMethodShop();
|
|
|
- $ghsInfo['useNewShMethod'] = in_array($ghsShopId, $newShMethod) ? 1 : 0;
|
|
|
+ $newStatus = dict::getNewMethod($ghsShopId);
|
|
|
+ $ghsInfo['useNewShMethod'] = $newStatus ? 1 : 0;
|
|
|
|
|
|
util::success($ghsInfo);
|
|
|
}
|
|
|
@@ -443,8 +443,8 @@ class GhsController extends BaseController
|
|
|
$ghs['pfLevel'] = $ghsShop->pfLevel ?? 0;
|
|
|
|
|
|
//是否使用新的配送方式,关键词 sh_method_area
|
|
|
- $newShMethod = dict::getNewMethodShop();
|
|
|
- $ghs['useNewShMethod'] = in_array($ghsShopId, $newShMethod) ? 1 : 0;
|
|
|
+ $newStatus = dict::getNewMethod($ghsShopId);
|
|
|
+ $ghs['useNewShMethod'] = $newStatus ? 1 : 0;
|
|
|
|
|
|
} else {
|
|
|
//没有开店也给显示供货商信息
|