|
|
@@ -15,12 +15,12 @@ class ExpressService extends BaseService
|
|
|
public static $baseFile = '\biz\merchant\classes\ExpressClass';
|
|
|
|
|
|
//计算客户的距离和运费 shish 2020.5.14
|
|
|
- public static function getUserDistance($lnt, $lat, $shopId, $extend)
|
|
|
+ public static function getUserDistance($lng, $lat, $shopId, $extend)
|
|
|
{
|
|
|
$shop = ShopClass::getById($shopId);
|
|
|
$shopLat = isset($shop['lat']) ? $shop['lat'] : '';
|
|
|
$shopLong = isset($shop['long']) ? $shop['long'] : '';
|
|
|
- $distance = mapUtil::calculateDistance($shopLong, $shopLat, $lnt, $lat);
|
|
|
+ $distance = mapUtil::calculateDistance($shopLong, $shopLat, $lng, $lat);
|
|
|
$perKiloFee = isset($extend['freight']) ? $extend['freight'] : 10;
|
|
|
$freeDistance = isset($extend['freeDistance']) ? $extend['freeDistance'] : 5;
|
|
|
$fee = 0;
|