首页附近技师定位距离打开

This commit is contained in:
Mr.jiang 2024-06-25 22:50:23 +08:00
parent 6ca920531e
commit ad75e5f948
1 changed files with 4 additions and 12 deletions

View File

@ -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('')