zengh
2022-09-14 8ea19a6bb34daab1410f6186992a4c1e90299c92
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 () {
@@ -63,7 +65,7 @@
        beginMap (map, data) {
            var that = this,
                center = [data[0].wd, data[0].jd],
                url = `http://223.82.109.183:2082/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`
                url = `http://106.225.193.35:83/api/alarm/alarm/APP-getAlarm?id=${data[0].id}`
            // url = `http://localhost:89/alarm/alarm/APP-getAlarm?id=${data[0].id}`;
            this.nowPosition = center
@@ -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()