|
@@ -436,7 +436,12 @@
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
stationId: this.stationId
|
|
stationId: this.stationId
|
|
- };
|
|
|
|
|
|
+ };
|
|
|
|
+ var distance=null;
|
|
|
|
+ if(bl&&this.stationDetail&&this.stationDetail.station){
|
|
|
|
+ distance=this.stationDetail.station.distance
|
|
|
|
+ //防止重新获取定位
|
|
|
|
+ }
|
|
api.getChargingStationDetail(data).then(function(res) {
|
|
api.getChargingStationDetail(data).then(function(res) {
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
|
|
|
@@ -444,7 +449,10 @@
|
|
|
|
|
|
let data = res.data;
|
|
let data = res.data;
|
|
|
|
|
|
- _self.stationDetail = data;
|
|
|
|
|
|
+ _self.stationDetail = data;
|
|
|
|
+ if(distance){
|
|
|
|
+ _self.stationDetail.station.distance=distance
|
|
|
|
+ }
|
|
var totalNum=0;
|
|
var totalNum=0;
|
|
if(_self.openlist==null){
|
|
if(_self.openlist==null){
|
|
_self.openlist=new Map();
|
|
_self.openlist=new Map();
|
|
@@ -461,9 +469,12 @@
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ _self.list[0].name = "充电桩(" + totalNum + ")"
|
|
}
|
|
}
|
|
|
|
|
|
- _self.list[0].name = "充电桩(" + totalNum + ")"
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
if (_self.stationDetail.station.distance == null&&!bl) {
|
|
if (_self.stationDetail.station.distance == null&&!bl) {
|
|
@@ -553,9 +564,9 @@
|
|
})*/
|
|
})*/
|
|
//this.message=JSON.stringify(res)
|
|
//this.message=JSON.stringify(res)
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
- uni.showToast({
|
|
|
|
- title: error //'getPoint'+JSON.stringify()
|
|
|
|
- })
|
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: error //'getPoint'+JSON.stringify()
|
|
|
|
+ // })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
calculateDistance(startLngLat, endLngLat) {
|
|
calculateDistance(startLngLat, endLngLat) {
|