From 7a9c49f314bd70005ead683852a85c3c7252cf61 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 19 Aug 2024 20:06:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(IndexController):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=86IndexController=E6=8E=A7=E5=88=B6=E5=99=A8=E4=B8=AD?= =?UTF-8?q?=E7=9A=84index=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BA=86=E5=BA=97=E9=93=BA=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E6=A0=B9=E6=8D=AE=E7=BB=8F=E7=BA=AC=E5=BA=A6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=9C=80=E8=BF=91=E7=9A=84=E5=BA=97=E9=93=BA=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=9B=B4=E6=96=B0=E4=BA=86=E7=9B=B8=E5=85=B3API?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 57afc2be3..8804fcd31 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -215,7 +215,7 @@ class IndexController extends BaseApiController // 计算距离的SQL表达式 $distanceSql = "SQRT(POW(69.1 * (latitude - {$latitude}), 2) + POW(69.1 * ({$longitude} - longitude) * COS(latitude / 57.3), 2))"; - $find = SystemStore::field("id, name, {$distanceSql} AS distance") + $find = SystemStore::field("id, name,abbreviation, {$distanceSql} AS distance") ->where('latitude', '<>', '') ->where('longitude', '<>', '') ->order('distance', 'asc') // 根据距离排序