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