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