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

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

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

@ -371,9 +371,9 @@
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);
// #ifdef H5 // #ifdef H5
that.getUserLocation(res.longitude, res.latitude); that.findByLatAndLng(res.longitude, res.latitude);
// that.getUserLocation(res.longitude, res.latitude);
//#endif //#endif
// #ifdef MP // #ifdef MP
uni.request({ 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) { findByLatAndLng(item, item1) {
let that = this; let that = this;
@ -449,13 +429,29 @@
.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 = '500100';
that.getCouponListArea(); if (res.return_data.result.addressComponent.adcode) {
that.getCouponListgold(); that.getCouponListArea();
uni.hideLoading(); that.getCouponListgold();
that.getCmsContent(); uni.hideLoading();
that.getCmsAactibity(); that.getCmsContent();
that.getCmsContentcmshome(); that.getCmsAactibity();
that.getCmsContentcmsContent(); 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