From 7425a25bd5d24477e5e7a8a461eadc4441b5b1c1 Mon Sep 17 00:00:00 2001
From: Tuzki <1720599558@qq.com>
Date: Thu, 27 Jul 2023 09:00:39 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=AA=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=BD=93=E5=89=8D=E5=9D=90=E6=A0=87=EF=BC=8C=E4=B8=8D=E5=AD=98?=
=?UTF-8?q?=E5=82=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 9 ++++++
pages/index/index.vue | 15 ++++++---
pages/index/myLocation/myLocation.vue | 45 +++++++++++++++++++++++++++
pages/index/pointPick/pointPick.vue | 2 +-
4 files changed, 66 insertions(+), 5 deletions(-)
create mode 100644 pages/index/myLocation/myLocation.vue
diff --git a/pages.json b/pages.json
index 28e6b9f..ebf6f5d 100644
--- a/pages.json
+++ b/pages.json
@@ -24,6 +24,15 @@
}
}
+ ,{
+ "path" : "pages/index/myLocation/myLocation",
+ "style" :
+ {
+ "navigationBarTitleText": "我的位置",
+ "enablePullDownRefresh": false
+ }
+
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f7e4529..25c9123 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,7 +1,8 @@
-
-
+
+
+
@@ -20,10 +21,14 @@ export default {
uni.navigateTo({
url:'pointPick/pointPick'
})
- }else{
+ }else if(val == 2){
uni.navigateTo({
url:'lineDraw/lineDraw'
})
+ }else{
+ uni.navigateTo({
+ url:'myLocation/myLocation'
+ })
}
}
}
@@ -31,5 +36,7 @@ export default {
diff --git a/pages/index/myLocation/myLocation.vue b/pages/index/myLocation/myLocation.vue
new file mode 100644
index 0000000..8b3e6cf
--- /dev/null
+++ b/pages/index/myLocation/myLocation.vue
@@ -0,0 +1,45 @@
+
+
+
+ 经度:{{longitude}}
+ 纬度:{{latitude}}
+
+
+
+
+
+
+
+
diff --git a/pages/index/pointPick/pointPick.vue b/pages/index/pointPick/pointPick.vue
index 65d9a74..ad46e5b 100644
--- a/pages/index/pointPick/pointPick.vue
+++ b/pages/index/pointPick/pointPick.vue
@@ -207,7 +207,7 @@ export default {
getLocation() {
let this_ = this;
uni.getLocation({
- type: 'wgs84',
+ type: 'gcj02',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);