zengh
2022-05-09 52c39f5e2711e5535b689b66dfa5e100c7882b7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
    <view class="content">
        <web-view :src="urls" @message="handleMessage"></web-view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                urls: '',
                // dataList: [],
                regionName: ""
            }
        },
        methods: {
            handleMessage(event) {
                var that = this
                console.log(event)
                var regionName = event.detail.data[0]
                if (regionName.indexOf('区') != -1) {
                    that.regionName = regionName.replace('区', '分局');
                } else if (regionName.indexOf('县') != -1) {
                    that.regionName = regionName.replace('县', '分局');
                } else if (regionName.indexOf('市') != -1) {
                    that.regionName = regionName.replace('市', '市公安局');
                }
                
                this.goBack()
            },
            goBack() {
                uni.$emit('updateDataRegionName', this.regionName)
                uni.navigateBack({
                    delta: 1
                })
            }
        },
        mounted() {},
        onLoad: function(options) {
 
            this.urls = "http://192.168.0.115:5500/leafletMapOur/loginMap/loginMap.html?data=" + options.data;
 
        },
    }
</script>
 
<style>
</style>