diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 06e335b..6c66074 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -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}"); } }