From 42aed0dd54d9c43d6334b0b063faa4e58e467c25 Mon Sep 17 00:00:00 2001 From: yanzai Date: Tue, 15 Oct 2024 14:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=AD=A3=E5=BC=8F=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=9D=90=E6=A0=87=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/index/index.vue | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 3186be7..2ea30aa 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -98,7 +98,7 @@ } return a.long - b.long }) - const hospital_id = $store.save.hospital + let hospital_id = $store.save.hospital if (!!hospital_id) { hospital_id = '' for (let i in list) { @@ -151,6 +151,7 @@ uni.getLocation({ type: 'wgs84', success: (res) => { + console.log(res) lola.value = { longitude: res.longitude, latitude: res.latitude @@ -204,6 +205,25 @@ }; onShow(() => { + uni.getLocation({ + type: 'wgs84', + success: (res) => { + console.log(res) + lola.value = { + longitude: res.longitude, + latitude: res.latitude + } + + }, + fail: (e) => { + console.log(e) + lola.value = { + longitude: 0, + latitude: 0 + } + + } + }); if (!!user_box_ref.value) { getLong() } @@ -261,7 +281,7 @@ - 10151056 + 10151416