From ec9047869bd2642821d1dfc5bbd339313d910d66 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 06 七月 2026 18:14:11 +0800
Subject: [PATCH] 新增功能

---
 bicycle/utils/utils.js |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/bicycle/utils/utils.js b/bicycle/utils/utils.js
index bbca658..d44f3fc 100644
--- a/bicycle/utils/utils.js
+++ b/bicycle/utils/utils.js
@@ -9,10 +9,13 @@
 		Math.cos(
 			rad2) * Math.pow(
 			Math.sin(b / 2), 2)));
-	s = s * 6378.137;
-	s = Math.round(s * 10000) / 10000;
-	s = s.toString();
-	s = s.substring(0, s.indexOf('.') + 2);
+	s = s * 6378.137 * 1000;
+	
+	s = (Math.round(s * 10000) / 10000).toFixed(2);
+	console.log(s)
+	// s = s.toString();
+	// s = s.substring(0, s.indexOf('.') + 2);
+	
 	return s
 }
 
@@ -36,4 +39,14 @@
 		});
 	})
 	return promise;
-}
\ No newline at end of file
+}
+
+// 鎵嬫満鍙锋帺鐮侊紝闅愯棌涓棿鍥涗綅
+export function maskPhone(phone) {
+	const value = phone === null || phone === undefined ? '' : String(phone).trim()
+	if (!value) {
+		return ''
+	}
+
+	return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
+}

--
Gitblit v1.9.3