From e3dcaeb0180a4e37347ac9ceb44c8a59ae7af37f Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Mon, 21 Feb 2022 19:40:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 leafletMapOur/loginMap/js/vueMain.js |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/leafletMapOur/loginMap/js/vueMain.js b/leafletMapOur/loginMap/js/vueMain.js
index 8f30fe0..faf0089 100644
--- a/leafletMapOur/loginMap/js/vueMain.js
+++ b/leafletMapOur/loginMap/js/vueMain.js
@@ -22,11 +22,13 @@
         resultFeedbackPopupShow: false,
         popupDisplay: "none",
 
-        regionName: ''
+        regionName: '',
+        byValue: ''
     },
     methods: {
         getLocalPoliceStation () {
-            window.parent.getRegionName(this.regionName)
+            this.regionName = this.byValue
+
         },
         getDataList () {
             var that = this
@@ -119,7 +121,7 @@
             // 定位成功之后调用的方法
             function showPosition (position) {
 
-                that.regionName = position.district || position.city
+                that.byValue = position.district || position.city
 
                 that.lat = position.lat //
                 that.lng = position.lng //火星坐标 //TODO 实现业务代码逻辑 
@@ -167,7 +169,19 @@
         }
 
     },
-    created () { },
+    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()
         this.getLocationData()

--
Gitblit v1.9.3