首页附近技师定位距离打开
This commit is contained in:
parent
6ca920531e
commit
ad75e5f948
|
@ -767,15 +767,13 @@
|
|||
if (res.code == 0) {
|
||||
this.starTechnician = res.startData.list;
|
||||
this.nearbyTechnician=res.nearData.list;
|
||||
const myLatitude = this.latitude; // 当前位置纬度
|
||||
const myLongitude = this.longitude; // 当前位置经度
|
||||
// const myLatitude = this.latitude; // 当前位置纬度
|
||||
// const myLongitude = this.longitude; // 当前位置经度
|
||||
// const targetLatitude = 39.919; // 目标位置纬度
|
||||
// const targetLongitude = 116.486; // 目标位置经度
|
||||
const targetLatitude = ''; // 目标位置纬度
|
||||
const targetLongitude =''; // 目标位置经度
|
||||
// const targetLatitude = ''; // 目标位置纬度
|
||||
// const targetLongitude =''; // 目标位置经度
|
||||
for(var i=0;i<this.nearbyTechnician.length;i++){
|
||||
// targetLongitude=this.nearbyTechnician[i].longitude;
|
||||
// targetLatitude=this.nearbyTechnician[i].latitude
|
||||
const distance = this.calculateDistance(
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
|
@ -785,12 +783,6 @@
|
|||
this.nearbyTechnician[i].dingwei= distance.toFixed(1)
|
||||
console.log(`距离为: ${distance.toFixed(1)} km`);
|
||||
}
|
||||
// const distance = this.calculateDistance(
|
||||
// myLatitude,
|
||||
// myLongitude,
|
||||
// targetLatitude,
|
||||
// targetLongitude
|
||||
// );
|
||||
console.log("starTechnician===>",this.nearbyTechnician)
|
||||
// this.classifyId = res.data[0].id;
|
||||
// this.getorderlist('')
|
||||
|
|
Loading…
Reference in New Issue