From a8ca5bd5338788798b53693493cc5bdd6f156532 Mon Sep 17 00:00:00 2001 From: shidongli Date: Tue, 9 Jan 2024 11:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 8 ++++---- pagesB/site/site.vue | 33 ++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 7bab419..5577e24 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -140,10 +140,10 @@ }, //失败 fail: (res) => { - uni.showToast({ - icon: 'none', - title: '获取地址失败,请打开定位', - }) + // uni.showToast({ + // icon: 'none', + // title: '获取地址失败,请打开定位', + // }) } }) }, diff --git a/pagesB/site/site.vue b/pagesB/site/site.vue index 8b68936..0292980 100644 --- a/pagesB/site/site.vue +++ b/pagesB/site/site.vue @@ -98,8 +98,10 @@ pageNum: 1, pageSize: 10, total: 0, - latitude: 39.90374, - longitude: 116.397827, + // latitude: 39.90374, + // longitude: 116.397827, + latitude:'', + longitude:'', nurseClassId: '', //护理站分类id itemClassId: '', //护理项目分类id searchName: '', //通用名称 @@ -190,6 +192,7 @@ success: function(res) { that.latitude = res.latitude that.longitude = res.longitude + that.mask = false } }); @@ -278,23 +281,27 @@ const value = uni.getStorageSync('patientId'); if (value) { getPatientInfo(value).then(res => { + console.log(res) if (res.code == 200) { if (res.data.homeLatitude && res.data.homeLongitude) { that.latitude = res.data.homeLatitude that.longitude = res.data.homeLongitude + that.requestinfo(); } else { - uni.getLocation({ - type: 'wgs84', - success: function(resp) { - that.latitude = resp.latitude - that.longitude = resp.longitude - that.requestinfo(); - }, - fail(err) { - that.mask = true; - } - }); + that.requestinfo(); + // uni.getLocation({ + // type: 'wgs84', + // success: function(resp) { + // that.latitude = resp.latitude + // that.longitude = resp.longitude + // console.log(that.latitude,that.longitude) + // that.requestinfo(); + // }, + // fail(err) { + // that.mask = true; + // } + // }); } } else if (res.code == 9999) {} else { that.requestinfo();