From 4dd938e88607da6c3fd195ad2386131bf626b40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E8=BE=89?= <13935151924@163.com> Date: Tue, 18 Nov 2025 19:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=AE=9A=E4=BD=8D=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=8F=90=E7=A4=BA=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- delete-large-json.ps1 | 1 - .../components/map-location-picker.vue | 54 +++++++++---------- pages/nearby/components/one.vue | 2 +- stores/useLocationStore.js | 2 +- 4 files changed, 29 insertions(+), 30 deletions(-) delete mode 100644 delete-large-json.ps1 diff --git a/delete-large-json.ps1 b/delete-large-json.ps1 deleted file mode 100644 index 0519ecb..0000000 --- a/delete-large-json.ps1 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/pages/complete-info/components/map-location-picker.vue b/pages/complete-info/components/map-location-picker.vue index 01ccbb9..50d3c1a 100644 --- a/pages/complete-info/components/map-location-picker.vue +++ b/pages/complete-info/components/map-location-picker.vue @@ -514,34 +514,34 @@ const getCurrentLocation = () => { isLocating.value = false // 根据错误类型给出不同提示 - let errorMsg = '定位失败' - if (err.errMsg.includes('auth deny')) { - errorMsg = '定位权限被拒绝,请在设置中开启' - } else if (err.errMsg.includes('timeout')) { - errorMsg = '定位超时,请重试' - } else if (err.errMsg.includes('network')) { - errorMsg = '网络异常,请检查网络连接' - } + // let errorMsg = '定位失败' + // if (err.errMsg.includes('auth deny')) { + // errorMsg = '定位权限被拒绝,请在设置中开启' + // } else if (err.errMsg.includes('timeout')) { + // errorMsg = '定位超时,请重试' + // } else if (err.errMsg.includes('network')) { + // errorMsg = '网络异常,请检查网络连接' + // } - uni.showModal({ - title: '定位失败', - content: errorMsg + ',是否使用默认位置?', - confirmText: '使用默认位置', - cancelText: '重试', - success: (modalRes) => { - if (modalRes.confirm) { - // 使用默认位置(北京) - longitude.value = 116.397428 - latitude.value = 39.90923 - reverseGeocode(longitude.value, latitude.value) - } else { - // 重试定位 - setTimeout(() => { - getCurrentLocation() - }, 2000) - } - } - }) + // uni.showModal({ + // title: '定位失败', + // content: errorMsg + ',是否使用默认位置?', + // confirmText: '使用默认位置', + // cancelText: '重试', + // success: (modalRes) => { + // if (modalRes.confirm) { + // // 使用默认位置(北京) + // longitude.value = 116.397428 + // latitude.value = 39.90923 + // reverseGeocode(longitude.value, latitude.value) + // } else { + // // 重试定位 + // setTimeout(() => { + // getCurrentLocation() + // }, 2000) + // } + // } + // }) } }) }, diff --git a/pages/nearby/components/one.vue b/pages/nearby/components/one.vue index 5c159bf..c7e8ee8 100644 --- a/pages/nearby/components/one.vue +++ b/pages/nearby/components/one.vue @@ -221,7 +221,7 @@ function handleControl(e) { } onMounted(() => { - $api.msg('使用模拟定位'); + // $api.msg('使用模拟定位'); getInit(); }); diff --git a/stores/useLocationStore.js b/stores/useLocationStore.js index 0d2d64c..fc0c453 100644 --- a/stores/useLocationStore.js +++ b/stores/useLocationStore.js @@ -49,7 +49,7 @@ const useLocationStore = defineStore("location", () => { } longitudeVal.value = resd.longitude latitudeVal.value = resd.latitude - msg('用户位置获取失败,使用模拟定位') + // msg('用户位置获取失败,使用模拟定位') resole(resd) }, complete: function(e) {