|
@@ -312,12 +312,20 @@
|
|
|
}else{//没选择城市
|
|
|
console.log('没选择城市',that.city);
|
|
|
uni.setStorageSync('HomeCity','')
|
|
|
+
|
|
|
queryFromLocation({
|
|
|
coordType:'gcj02ll',
|
|
|
lat: that.query.latitude,
|
|
|
lng: that.query.longitude
|
|
|
}).then(res=>{
|
|
|
console.log('解析结果',res);
|
|
|
+ if(res.content.status&&res.content.status == 302){
|
|
|
+ that.query.regionCode = '520100'
|
|
|
+ that.city = '贵阳'
|
|
|
+ uni.setStorageSync('regionCode','520100')
|
|
|
+ uni.setStorageSync('city','贵阳')
|
|
|
+ resolve()
|
|
|
+ }
|
|
|
if(res.state == 'Success'){
|
|
|
that.query.regionCode = res.content.geoAddressComponent.adcode.substr(0,4) +'00'
|
|
|
uni.setStorageSync('regionCode',that.query.regionCode)
|