From 5d75fcaea0a3774052b7484a4ffe755258502363 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 06 十二月 2025 20:49:11 +0800
Subject: [PATCH] fix:开始执行人员就绪按钮
---
app/api/map.js | 33 ++++++++++++++++++++++++++++-----
1 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/app/api/map.js b/app/api/map.js
index bf9cc31..bbd122c 100644
--- a/app/api/map.js
+++ b/app/api/map.js
@@ -8,7 +8,8 @@
}
return request({
- url: '/system/gps/address/search',
+// url: '/system/gps/address/search',
+ url: '/system/gps/tianditu/place/suggestion',
method: 'get',
params: {
keyword: keyword,
@@ -28,9 +29,12 @@
if (isNaN(lat) || isNaN(lng)) {
return Promise.reject(new Error('鍙傛暟鏃犳晥锛岀粡绾害鍧愭爣鏍煎紡閿欒'))
}
-
+ /**
+ * 杩欓噷鐢ㄥ埌澶╁湴鍥�
+ */
return request({
- url: '/system/gps/address/geocoder',
+ // url: '/system/gps/address/geocoder',
+ url: '/system/gps/tianditu/reverseGeocoding',
method: 'get',
params: {
lat: lat,
@@ -39,6 +43,21 @@
})
}
+export function calculateTianDiTuDistance(fromAddress, toAddress) {
+ // 鍙傛暟楠岃瘉
+ if (!fromAddress || !toAddress) {
+ return Promise.reject(new Error('鍙傛暟涓嶅畬鏁达紝缂哄皯鍦板潃'))
+ }
+
+ return request({
+ url: '/system/gps/tianditu/distance/byAddress',
+ method: 'get',
+ params: {
+ fromAddress: fromAddress,
+ toAddress: toAddress
+ }
+ })
+}
// 鍦板浘璺嚎瑙勫垝API锛堣绠椾袱鐐归棿璺濈锛�
export function calculateDistance(fromLat, fromLng, toLat, toLng) {
// 鍙傛暟楠岃瘉
@@ -56,6 +75,7 @@
return request({
url: '/system/gps/route/distance',
+ // url: '/system/gps/tianditu/byAddress',
method: 'get',
params: {
fromLat: fromLat,
@@ -84,6 +104,9 @@
}
})
}
+
+// 鍒悕锛屼笌baiduGeocoding鍔熻兘鐩稿悓
+export const baiduGeocode = baiduGeocoding
// 鐧惧害鍦板浘璺嚎瑙勫垝API锛堣绠椾袱涓潗鏍囦箣闂寸殑椹捐溅璺濈锛�
export function baiduRouteDriving(origin, destination) {
@@ -249,7 +272,7 @@
})
}
-// 澶╁湴鍥惧湴鍧�鎼滅储鎻愮ずAPI锛堣緭鍏ヨ仈鎯筹級
+// 澶╁湴鍥炬櫘閫氭悳绱㈡湇鍔PI锛堝湴鍧�鎼滅储锛�
export function tiandituPlaceSuggestion(keyWord, region, city, count) {
// 鍙傛暟楠岃瘉
if (!keyWord) {
@@ -266,4 +289,4 @@
count: count || 10
}
})
-}
\ No newline at end of file
+}
--
Gitblit v1.9.1