From 3fdcd0fba666abbc57752ac85134e5e42b4d56f2 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 27 Jan 2022 16:51:51 +0800 Subject: [PATCH] setter --- app/controller/api/Dictionary.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/api/Dictionary.php b/app/controller/api/Dictionary.php index b128669..eae8a16 100644 --- a/app/controller/api/Dictionary.php +++ b/app/controller/api/Dictionary.php @@ -81,10 +81,10 @@ class Dictionary extends Base if($lng && $lat){ $distance = get_distance($lat,$lng,$item['lat'],$item['lng']); - if($distance>=1000){ - $distance = round($distance/1000,2)."Km"; + if ($distance >= 1000) { + $distance = round($distance/1000,2)."km"; }else{ - $distance.="m"; + $distance .= "m"; } $item['distance_text'] = $distance; }else{