首页明星技师不显示BUG
This commit is contained in:
parent
b88a40173c
commit
2da9540faa
|
@ -572,7 +572,7 @@
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
that.getIsVip()
|
that.getIsVip()
|
||||||
that.getHomeArtificerList();
|
// that.getHomeArtificerList();
|
||||||
that.getHomeNearbyList();
|
that.getHomeNearbyList();
|
||||||
}else{
|
}else{
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
|
@ -1020,7 +1020,6 @@
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
tmplIds: this.arr,
|
tmplIds: this.arr,
|
||||||
success(re) {
|
success(re) {
|
||||||
console.log(JSON.stringify(re), 111111111111)
|
|
||||||
var datas = JSON.stringify(re);
|
var datas = JSON.stringify(re);
|
||||||
if (datas.indexOf("accept") != -1) {
|
if (datas.indexOf("accept") != -1) {
|
||||||
console.log(re)
|
console.log(re)
|
||||||
|
@ -1044,7 +1043,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
goOrder(e) {
|
goOrder(e) {
|
||||||
console.log('授权', uni.getStorageSync('sendMsg'))
|
// console.log('授权', uni.getStorageSync('sendMsg'))
|
||||||
if (uni.getStorageSync('sendMsg')) {
|
if (uni.getStorageSync('sendMsg')) {
|
||||||
console.log('授权+1')
|
console.log('授权+1')
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
|
@ -1163,69 +1162,72 @@
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
getHomeNearbyList(){//附近技师
|
getHomeNearbyList(){//附近技师和明星技师
|
||||||
var data={
|
var data={
|
||||||
isStart: 1,
|
isStart: 1,
|
||||||
status: 1,
|
status: 1,
|
||||||
// city:this.cityname,
|
// city:this.cityname,
|
||||||
longitude:this.longitude,
|
longitude:this.longitude,
|
||||||
latitude:this.latitude,
|
latitude:this.latitude,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 3
|
limit: 3
|
||||||
}
|
}
|
||||||
this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
|
this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.nearbyTechnician=res.nearData.list;
|
this.starTechnician = res.startData.list;
|
||||||
// const myLatitude = this.latitude; // 当前位置纬度
|
this.nearbyTechnician=res.nearData.list;
|
||||||
// const myLongitude = this.longitude; // 当前位置经度
|
// const myLatitude = this.latitude; // 当前位置纬度
|
||||||
// const targetLatitude = 39.919; // 目标位置纬度
|
// const myLongitude = this.longitude; // 当前位置经度
|
||||||
// const targetLongitude = 116.486; // 目标位置经度
|
// const targetLatitude = 39.919; // 目标位置纬度
|
||||||
// const targetLatitude = ''; // 目标位置纬度
|
// const targetLongitude = 116.486; // 目标位置经度
|
||||||
// const targetLongitude =''; // 目标位置经度
|
// const targetLatitude = ''; // 目标位置纬度
|
||||||
for(var i=0;i<this.nearbyTechnician.length;i++){
|
// const targetLongitude =''; // 目标位置经度
|
||||||
const distance = this.calculateDistance(
|
for(var i=0;i<this.nearbyTechnician.length;i++){
|
||||||
this.latitude,
|
const distance = this.calculateDistance(
|
||||||
this.longitude,
|
this.latitude,
|
||||||
this.nearbyTechnician[i].latitude,
|
this.longitude,
|
||||||
this.nearbyTechnician[i].longitude
|
this.nearbyTechnician[i].latitude,
|
||||||
);
|
this.nearbyTechnician[i].longitude
|
||||||
this.nearbyTechnician[i].dingwei= distance.toFixed(1)
|
);
|
||||||
console.log(`距离为: ${distance.toFixed(1)} km`);
|
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.nearbyTechnician.sort((a, b) => a.dingwei - b.dingwei);
|
||||||
// this.getorderlist('')
|
// 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('')
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 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() {
|
getBannerList() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue