diff --git a/pages/index/index.vue b/pages/index/index.vue index 235f91a..ed23293 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -100,6 +100,7 @@ if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( (position) => { + const coords = position.coords; console.log('纬度: ', coords.latitude); console.log('经度: ', coords.longitude); console.log('高度: ', coords.altitude); diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 6741f92..56f8502 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@