1.修改定位失败

yj-dev
杨杰 2 years ago
parent a3c63db681
commit fbd1cac020
  1. 4
      pages/goods/refuel-details/refuel-details.vue
  2. 31
      pages/tabBar/home/home.vue

@ -215,7 +215,7 @@
this.counId = options.desId; this.counId = options.desId;
if (app.globalData.accountId) { if (app.globalData.accountId) {
this.isTyAgent = true; this.isTyAgent = true;
} }
// #ifdef H5 // #ifdef H5
if (app.globalData.accountType && app.globalData.accountType == '000000#/') { if (app.globalData.accountType && app.globalData.accountType == '000000#/') {
this.recentGasStation(); this.recentGasStation();
@ -265,7 +265,7 @@
longitude: app.globalData.longitude, longitude: app.globalData.longitude,
isTyAgent: this.isTyAgent isTyAgent: this.isTyAgent
} }
recentGasStation(params).then(res => { recentGasStation(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.storeList = res.return_data; this.storeList = res.return_data;

@ -187,20 +187,6 @@
} }
} }
}) })
uni.getStorage({
key: 'accountType',
success(e) {
if (e.data) {
app.globalData.accountType = e.data;
if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/refuel-details/refuel-details'
})
}
}
}
})
// #endif // #endif
}, },
onLoad(options) { onLoad(options) {
@ -384,6 +370,7 @@
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;
// that.findByLatAndLng(res.longitude, res.latitude); // that.findByLatAndLng(res.longitude, res.latitude);
// #ifdef H5 // #ifdef H5
that.getUserLocation(res.longitude, res.latitude); that.getUserLocation(res.longitude, res.latitude);
@ -519,7 +506,21 @@
that.getCmsAactibity(); that.getCmsAactibity();
that.getCmsContentcmshome(); that.getCmsContentcmshome();
that.getCmsContentcmsContent(); that.getCmsContentcmsContent();
} }
uni.getStorage({
key: 'accountType',
success(e) {
if (e.data) {
app.globalData.accountType = e.data;
if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/refuel-details/refuel-details'
})
}
}
}
})
}) })
.catch(err => { .catch(err => {

Loading…
Cancel
Save