From 37f4c3d8d45c823e4813c407110d07db76022e15 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 10 Feb 2022 17:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=B8=AD=E5=BF=83=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AiTMap.vue | 18 +++++++++++++++++- src/saas/AppHealthUp/AppHealthUp.vue | 1 - 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/AiTMap.vue b/src/components/AiTMap.vue index 64abcb6b..2486313a 100644 --- a/src/components/AiTMap.vue +++ b/src/components/AiTMap.vue @@ -51,10 +51,26 @@ export default { document.body.appendChild(script); }, initTMap() { + var latLng = {} + if(this.config.lat) { //通用版 + latLng = this.config + }else { //上架版 + wx.getLocation({ + type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + success: (res) => { + console.log(res) + latLng = { + lat: res.latitude, + lng: res.longitude + } + } + }); + } + this.mapLib = TMap this.tmap = new TMap.Map(this.$refs.tmap, { zoom: 11, - // center: new TMap.LatLng(this.config.lat, this.config.lng), + center: new TMap.LatLng(latLng.lat, latLng.lng), ...this.ops }) this.$emit('loaded') diff --git a/src/saas/AppHealthUp/AppHealthUp.vue b/src/saas/AppHealthUp/AppHealthUp.vue index 59b9cee7..79c59640 100644 --- a/src/saas/AppHealthUp/AppHealthUp.vue +++ b/src/saas/AppHealthUp/AppHealthUp.vue @@ -278,7 +278,6 @@ uni-page-body { .AppHealthUp { .emptyWrap { - background: #f5f5f5; margin: 0; } ::v-deep .emptyText{