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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
| <template>
| <view class="content">
| <web-view :src="urls"></web-view>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| urls: '',
| // dataList: [],
| }
| },
| methods: {},
| mounted() {},
| onLoad: function(options) {
| var that = this;
| var data = [];
| if (options.data == undefined) {
| data = [{
| "id": '100000',
| "place": '无数据',
| "state": '0',
| "dtype": '0',
| "size": '300',
| "jd": "115.822311",
| "wd": "28.646341"
| }]
| data = JSON.stringify(data);
| } else {
| data = options.data;
| }
|
| //alert("Hello");
| wx.getLocation({
| type: 'wgs84',
| success: function(res) {
| // 经纬度
| var latitude = res.latitude
| var longitude = res.longitude
| wx.setStorageSync("latitude", latitude);
| wx.setStorageSync("longitude", longitude);
| },
| fail: function() {
| console.log("定位失败")
| }
| });
|
| var latitude = wx.getStorageSync("latitude");
| var longitude = wx.getStorageSync("longitude");
|
| // alert(wx.getStorageSync("longitude"));
| that.urls = "http://61.131.136.25:2082/xcxjingqingmap_lxdh/lxdhmap.html?data=" + data + "&latitude=" +
| latitude + "&longitude=" + longitude;
|
|
|
| // this.dataList = data;
| // console.log(this.urls);
| },
| }
| </script>
|
| <style>
| </style>
|
|