首页明星技师不显示BUG

This commit is contained in:
曹磊 2024-09-20 15:43:31 +08:00
parent b88a40173c
commit 2da9540faa
1 changed files with 62 additions and 60 deletions

View File

@ -572,7 +572,7 @@
}
// #endif
that.getIsVip()
that.getHomeArtificerList();
// that.getHomeArtificerList();
that.getHomeNearbyList();
}else{
// uni.navigateTo({
@ -1020,7 +1020,6 @@
wx.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
console.log(JSON.stringify(re), 111111111111)
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
@ -1044,7 +1043,7 @@
},
goOrder(e) {
console.log('授权', uni.getStorageSync('sendMsg'))
// console.log('', uni.getStorageSync('sendMsg'))
if (uni.getStorageSync('sendMsg')) {
console.log('授权+1')
wx.requestSubscribeMessage({
@ -1163,69 +1162,72 @@
}
return status;
},
getHomeNearbyList(){//
getHomeNearbyList(){//
var data={
isStart: 1,
status: 1,
// city:this.cityname,
longitude:this.longitude,
latitude:this.latitude,
page: 1,
limit: 3
}
isStart: 1,
status: 1,
// city:this.cityname,
longitude:this.longitude,
latitude:this.latitude,
page: 1,
limit: 3
}
this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
if (res.code == 0) {
this.nearbyTechnician=res.nearData.list;
// const myLatitude = this.latitude; //
// const myLongitude = this.longitude; //
// const targetLatitude = 39.919; //
// const targetLongitude = 116.486; //
// const targetLatitude = ''; //
// const targetLongitude =''; //
for(var i=0;i<this.nearbyTechnician.length;i++){
const distance = this.calculateDistance(
this.latitude,
this.longitude,
this.nearbyTechnician[i].latitude,
this.nearbyTechnician[i].longitude
);
this.nearbyTechnician[i].dingwei= distance.toFixed(1)
console.log(`距离为: ${distance.toFixed(1)} km`);
}
this.nearbyTechnician.sort((a, b) => a.dingwei - b.dingwei);
// this.classifyId = res.data[0].id;
// this.getorderlist('')
}
});
},
getHomeArtificerList(){//
var data={
isStart: 1,
status: 1,
// city:this.cityname,
longitude:this.longitude,
latitude:this.latitude,
page: 1,
limit: 3
}
this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
if (res.code == 0) {
this.starTechnician = res.startData.list;
// for(var i=0;i<this.starTechnician.length;i++){
// const distance = this.calculateDistance(
// this.latitude,
// this.longitude,
// this.starTechnician[i].latitude,
// this.starTechnician[i].longitude
// );
// this.starTechnician[i].dingwei= distance.toFixed(1)
// console.log(`: ${distance.toFixed(1)} km`);
// }
// this.classifyId = res.data[0].id;
// this.getorderlist('')
this.starTechnician = res.startData.list;
this.nearbyTechnician=res.nearData.list;
// const myLatitude = this.latitude; //
// const myLongitude = this.longitude; //
// const targetLatitude = 39.919; //
// const targetLongitude = 116.486; //
// const targetLatitude = ''; //
// const targetLongitude =''; //
for(var i=0;i<this.nearbyTechnician.length;i++){
const distance = this.calculateDistance(
this.latitude,
this.longitude,
this.nearbyTechnician[i].latitude,
this.nearbyTechnician[i].longitude
);
this.nearbyTechnician[i].dingwei= distance.toFixed(1)
console.log(`距离为: ${distance.toFixed(1)} km`);
}
this.nearbyTechnician.sort((a, b) => a.dingwei - b.dingwei);
// this.classifyId = res.data[0].id;
// this.getorderlist('')
}
});
},
// getHomeArtificerList(){//
// var data={
// isStart: 1,
// status: 1,
// // city:this.cityname,
// longitude:this.longitude,
// latitude:this.latitude,
// page: 1,
// limit: 3
// }
// this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
// console.log(res);
// if (res.code == 0) {
// this.starTechnician = res.startData.list;
// // for(var i=0;i<this.starTechnician.length;i++){
// // const distance = this.calculateDistance(
// // this.latitude,
// // this.longitude,
// // this.starTechnician[i].latitude,
// // this.starTechnician[i].longitude
// // );
// // this.starTechnician[i].dingwei= distance.toFixed(1)
// // console.log(`: ${distance.toFixed(1)} km`);
// // }
// // this.classifyId = res.data[0].id;
// // this.getorderlist('')
// }
// });
// },
//
getBannerList() {