From 3fc27febccd04e2fcffbd2cdd16d2daafd0b3ca3 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 11 Oct 2025 17:23:27 +0800
Subject: [PATCH] feat:首页地图相关调整
---
src/hooks/use-location/index.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hooks/use-location/index.js b/src/hooks/use-location/index.js
index cadcd10..7e063d1 100644
--- a/src/hooks/use-location/index.js
+++ b/src/hooks/use-location/index.js
@@ -5,7 +5,7 @@
* - 地址解析
* - 距离计算
*/
-export default function useLocation() {
+export default function useLocation () {
// 当前位置信息
const location = ref(null)
@@ -191,9 +191,9 @@
const a =
Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos((lat1 * Math.PI) / 180) *
- Math.cos((lat2 * Math.PI) / 180) *
- Math.sin(dLon / 2) *
- Math.sin(dLon / 2)
+ Math.cos((lat2 * Math.PI) / 180) *
+ Math.sin(dLon / 2) *
+ Math.sin(dLon / 2)
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
const distance = R * c
--
Gitblit v1.9.3