From 0e6ddf5d62b9cfc9c9eef94cd62f061627a95633 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 21 Feb 2022 19:45:51 +0800
Subject: [PATCH] 地图

---
 leafletMapOur/loginMap/js/vueMain.js |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/leafletMapOur/loginMap/js/vueMain.js b/leafletMapOur/loginMap/js/vueMain.js
index faf0089..4aef551 100644
--- a/leafletMapOur/loginMap/js/vueMain.js
+++ b/leafletMapOur/loginMap/js/vueMain.js
@@ -23,11 +23,13 @@
         popupDisplay: "none",
 
         regionName: '',
-        byValue: ''
     },
     methods: {
         getLocalPoliceStation () {
-            this.regionName = this.byValue
+
+            uni.postMessage({
+                data: this.regionName
+            })
 
         },
         getDataList () {
@@ -121,7 +123,7 @@
             // 定位成功之后调用的方法
             function showPosition (position) {
 
-                that.byValue = position.district || position.city
+                that.regionName = position.district || position.city
 
                 that.lat = position.lat //
                 that.lng = position.lng //火星坐标 //TODO 实现业务代码逻辑 
@@ -170,17 +172,6 @@
 
     },
     created () {
-        var that = this
-        document.addEventListener('UniAppJSBridgeReady', function (e) {
-            uni.getEnv(function (res) {
-                console.log('当前环境:' + JSON.stringify(res))
-            })
-
-            // 向uniapp底座发送消息
-            uni.postMessage({
-                data: that.regionName
-            })
-        })
     },
     mounted () {
         this.getDataList()

--
Gitblit v1.9.3