|
@@ -88,17 +88,33 @@ export default class Index extends Component {
|
88
|
88
|
this.qqmapsdk.reverseGeocoder({
|
89
|
89
|
location,
|
90
|
90
|
success: (res) => {
|
|
91
|
+ debugger
|
91
|
92
|
let city = res.result.address_component.city
|
|
93
|
+
|
92
|
94
|
let curCity = cityList.filter(item => {
|
93
|
95
|
return item.name == city
|
94
|
96
|
})
|
|
97
|
+ Taro.showModal({
|
|
98
|
+ title: 'fail',
|
|
99
|
+ content: JSON.stringify(curCity[0] + "---")
|
|
100
|
+ })
|
95
|
101
|
this.updateCity(curCity[0] || cityList[0])
|
96
|
102
|
},
|
97
|
103
|
fail: (error) => {
|
|
104
|
+ Taro.showModal({
|
|
105
|
+ title: 'fail',
|
|
106
|
+ content: JSON.stringify(err)
|
|
107
|
+ })
|
|
108
|
+ console.error(err)
|
98
|
109
|
this.updateCity(cityList[0])
|
99
|
110
|
},
|
100
|
111
|
})
|
101
|
112
|
}).catch(err => {
|
|
113
|
+ Taro.showModal({
|
|
114
|
+ title: 'catch',
|
|
115
|
+ content: JSON.stringify(err)
|
|
116
|
+ })
|
|
117
|
+ console.error(err)
|
102
|
118
|
this.updateCity(cityList[0])
|
103
|
119
|
})
|
104
|
120
|
}
|