Merge branch '5月27日-一键加油分支' into dev

yj-dev
杨杰 3 years ago
commit 8afe8aa7a5
  1. 2
      manifest.json
  2. 54
      pages/tabBar/home/home.vue

@ -87,7 +87,7 @@
},
"devServer" : {
"port" : "",
"https" : false
"https" : true
},
"domain" : "https://hsgcs.dctpay.com",
"template" : ""

@ -371,9 +371,9 @@
app.globalData.latitude = res.latitude;
app.globalData.longitude = res.longitude;
// that.findByLatAndLng(res.longitude, res.latitude);
// #ifdef H5
that.getUserLocation(res.longitude, res.latitude);
that.findByLatAndLng(res.longitude, res.latitude);
// that.getUserLocation(res.longitude, res.latitude);
//#endif
// #ifdef MP
uni.request({
@ -415,26 +415,6 @@
}
})
},
//H5
getCoordinates() {
let that = this;
//
let data = {
key: "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" //密钥,需要在腾讯位置服务官网(https://lbs.qq.com/申请自己的密钥
};
let url = "https://apis.map.qq.com/ws/location/v1/ip"; //IP
data.output = "jsonp";
//IP
this.$jsonp(url, data)
.then(res => {
app.globalData.latitude = res.result.location.lat;
app.globalData.longitude = res.result.location.lng;
that.getUserLocation(res.result.location.lng, res.result.location.lat);
})
.catch(error => {
console.log(error);
});
},
//
findByLatAndLng(item, item1) {
let that = this;
@ -449,13 +429,29 @@
.province;
app.globalData.cityId = res.return_data.result.addressComponent.adcode;
// app.globalData.cityId = '500100';
that.getCouponListArea();
that.getCouponListgold();
uni.hideLoading();
that.getCmsContent();
that.getCmsAactibity();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
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) {
if (e.data) {
app.globalData.accountType = e.data;
if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/refuel-details/refuel-details'
})
}
}
}
})
}
});
},

Loading…
Cancel
Save