|
@@ -11,6 +11,7 @@ Page({ |
|
@@ -11,6 +11,7 @@ Page({ |
11
|
latitude: '',
|
11
|
latitude: '',
|
12
|
longitude: '',
|
12
|
longitude: '',
|
13
|
time: '',
|
13
|
time: '',
|
|
|
14
|
+ my_address: '',
|
14
|
},
|
15
|
},
|
15
|
|
16
|
|
16
|
onLoad: function (options) {
|
17
|
onLoad: function (options) {
|
|
@@ -38,6 +39,24 @@ Page({ |
|
@@ -38,6 +39,24 @@ Page({ |
38
|
latitude: res.latitude,
|
39
|
latitude: res.latitude,
|
39
|
longitude: res.longitude
|
40
|
longitude: res.longitude
|
40
|
})
|
41
|
})
|
|
|
42
|
+
|
|
|
43
|
+ let url = '/index/second/getAddressInfo';
|
|
|
44
|
+ let head = {
|
|
|
45
|
+ 'XX-Token': wx.getStorageSync('token')
|
|
|
46
|
+ }
|
|
|
47
|
+ let d = {
|
|
|
48
|
+ lat: res.latitude,
|
|
|
49
|
+ lng: res.longitude
|
|
|
50
|
+ }
|
|
|
51
|
+ // console.log(d)
|
|
|
52
|
+ app.post(url, d, head).then((res) => {
|
|
|
53
|
+ console.log(res);
|
|
|
54
|
+ that.setData({
|
|
|
55
|
+ my_address: res.address
|
|
|
56
|
+ })
|
|
|
57
|
+ })
|
|
|
58
|
+
|
|
|
59
|
+
|
41
|
},
|
60
|
},
|
42
|
})
|
61
|
})
|
43
|
|
62
|
|