|
@@ -296,7 +296,7 @@
|
|
if(that.query.regionCode){//选择了城市
|
|
if(that.query.regionCode){//选择了城市
|
|
console.log('选择了城市',that.city);
|
|
console.log('选择了城市',that.city);
|
|
that.city = uni.getStorageSync('HomeCity') || uni.getStorageSync('city')
|
|
that.city = uni.getStorageSync('HomeCity') || uni.getStorageSync('city')
|
|
- getDistrict({boundary:1,keyword:that.city,sub_admin:1}).then(r=>{
|
|
|
|
|
|
+ getDistrict({boundary:1,keyword:that.city,sub_admin:1,extensions_code:1}).then(r=>{
|
|
console.log('区域',r);
|
|
console.log('区域',r);
|
|
let data = []
|
|
let data = []
|
|
r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
|
|
r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
|
|
@@ -320,7 +320,7 @@
|
|
that.query.regionCode = res.content.geoAddressComponent.adcode.substr(0,4) +'00'
|
|
that.query.regionCode = res.content.geoAddressComponent.adcode.substr(0,4) +'00'
|
|
that.city = res.content.geoAddressComponent.city
|
|
that.city = res.content.geoAddressComponent.city
|
|
uni.setStorageSync('city',res.content.geoAddressComponent.city)
|
|
uni.setStorageSync('city',res.content.geoAddressComponent.city)
|
|
- getDistrict({boundary:1,keyword:that.city,sub_admin:1}).then(r=>{
|
|
|
|
|
|
+ getDistrict({boundary:1,keyword:that.city,sub_admin:1,extensions_code:1}).then(r=>{
|
|
console.log('区域',r);
|
|
console.log('区域',r);
|
|
let data = []
|
|
let data = []
|
|
r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
|
|
r.content.districts&&r.content.districts[0].districts.map((item,index)=>{
|