master
wangxinglong 2021-12-20 14:46:19 +08:00
parent 43dcb97717
commit ba016bf633
1 changed files with 3 additions and 3 deletions

View File

@ -347,11 +347,11 @@ class Coupon extends Base
$distance = get_distance($coupon->couponMain->lat,$coupon->couponMain->lng,$lat,$lng);
if($distance > $signDistance){
if ($distance >= 1000) {
$distance_text = round($distance / 1000, 2) . "千米";
$distanceText = round($distance / 1000, 2) . "千米";
} else {
$distance_text = $distance . "";
$distanceText = $distance . "";
}
return $this->json(4001, "您距离商家位置距离超过规定距离{$distance_text}");
return $this->json(4001, "您距离商家位置距离超过规定距离{$distanceText}");
}
}