|
|
|
@ -370,39 +370,35 @@ |
|
|
|
|
success: function(res) { |
|
|
|
|
app.globalData.latitude = res.latitude; |
|
|
|
|
app.globalData.longitude = res.longitude; |
|
|
|
|
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
that.findByLatAndLng(res.longitude, res.latitude); |
|
|
|
|
// that.getUserLocation(res.longitude, res.latitude); |
|
|
|
|
//#endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
uni.request({ |
|
|
|
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + |
|
|
|
|
',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', |
|
|
|
|
data: {}, |
|
|
|
|
success: function(res) { |
|
|
|
|
// that.city = res.data.result.address_component.city.replace(/市/g, |
|
|
|
|
// ''); |
|
|
|
|
that.city = res.data.result.address_component.province; |
|
|
|
|
app.globalData.cityName = res.data.result.address_component |
|
|
|
|
.province; |
|
|
|
|
app.globalData.cityId = res.data.result.ad_info.adcode; |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.data.result.ad_info.adcode) { |
|
|
|
|
that.getCouponListArea(); |
|
|
|
|
that.getCouponListgold(); |
|
|
|
|
that.getCmsContent(); |
|
|
|
|
that.getCmsAactibity(); |
|
|
|
|
that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
fail(err) { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
//#endif |
|
|
|
|
// uni.request({ |
|
|
|
|
// url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + |
|
|
|
|
// ',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', |
|
|
|
|
// data: {}, |
|
|
|
|
// success: function(res) { |
|
|
|
|
// // that.city = res.data.result.address_component.city.replace(/市/g, |
|
|
|
|
// // ''); |
|
|
|
|
// that.city = res.data.result.address_component.province; |
|
|
|
|
// app.globalData.cityName = res.data.result.address_component |
|
|
|
|
// .province; |
|
|
|
|
// app.globalData.cityId = res.data.result.ad_info.adcode; |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// if (res.data.result.ad_info.adcode) { |
|
|
|
|
// that.getCouponListArea(); |
|
|
|
|
// that.getCouponListgold(); |
|
|
|
|
// that.getCmsContent(); |
|
|
|
|
// that.getCmsAactibity(); |
|
|
|
|
// that.getCmsContentcmshome(); |
|
|
|
|
// that.getCmsContentcmsContent(); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// }, |
|
|
|
|
// fail(err) { |
|
|
|
|
// uni.hideLoading() |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
}, |
|
|
|
|
fail: (err) => { |
|
|
|
|
if (err.errCode == 2) { |
|
|
|
@ -428,16 +424,15 @@ |
|
|
|
|
app.globalData.cityName = res.return_data.result.addressComponent |
|
|
|
|
.province; |
|
|
|
|
app.globalData.cityId = res.return_data.result.addressComponent.adcode; |
|
|
|
|
// app.globalData.cityId = '500100'; |
|
|
|
|
if (res.return_data.result.addressComponent.adcode) { |
|
|
|
|
app.globalData.cityId = '500103'; |
|
|
|
|
// if (res.return_data.result.addressComponent.adcode) { |
|
|
|
|
that.getCouponListArea(); |
|
|
|
|
that.getCouponListgold(); |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
that.getCmsContent(); |
|
|
|
|
that.getCmsAactibity(); |
|
|
|
|
that.getCmsContentcmshome(); |
|
|
|
|
that.getCmsContentcmsContent(); |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
uni.getStorage({ |
|
|
|
|
key: 'accountType', |
|
|
|
|
success(e) { |
|
|
|
|