|
@@ -87,6 +87,9 @@
|
|
|
this.goodsId=opt.goodsId;
|
|
|
this.type=opt.type
|
|
|
uni.removeStorageSync('selectCity');
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
uni.authorize({
|
|
|
scope: 'scope.userLocation',
|
|
|
success() {
|
|
@@ -96,7 +99,7 @@
|
|
|
console.log(res)
|
|
|
that.location.lat = res.latitude
|
|
|
that.location.lng = res.longitude
|
|
|
- that.getqueryShopList() //获取全部门店列表
|
|
|
+ //that.getqueryShopList() //获取全部门店列表
|
|
|
that.getAdress();
|
|
|
//that.getqueryShopList() //获取全部门店列表
|
|
|
|
|
@@ -242,7 +245,13 @@
|
|
|
console.log("城市名称")
|
|
|
console.log(res.data.regeocode.addressComponent.city)
|
|
|
// console.log(res.data.pois[0].cityname)
|
|
|
- let cityname = res.data.regeocode.addressComponent.city;
|
|
|
+ //let cityname = res.data.regeocode.addressComponent.city;
|
|
|
+ if(res.data.regeocode.addressComponent.city.length!=0){
|
|
|
+ var cityname = res.data.regeocode.addressComponent.city;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ var cityname = res.data.regeocode.addressComponent.province;
|
|
|
+ }
|
|
|
var cityCode = res.data.regeocode.addressComponent.adcode
|
|
|
cityCode = cityCode.slice(0, -2)
|
|
|
cityCode = cityCode + '00'
|