Commit 0bc2d31b54f34d1346a03ef72bf99a131194dc74

Authored by wangfan
1 parent 491c9d48

C端调整

... ... @@ -38,6 +38,7 @@ Component({
latitude: '',
longitude: '',
});
wx.hideLoading()
return;
}
if(failCount>2){//定位失败
... ... @@ -54,6 +55,7 @@ Component({
latitude:'',
longitude:'',
});
wx.hideLoading()
},
})
return;
... ... @@ -67,6 +69,7 @@ Component({
latitude: '',
longitude: '',
});
wx.hideLoading()
return;
}
this.selectComponent('#showModal').options({
... ... @@ -99,7 +102,6 @@ Component({
fail(res)
},
complete: (res) => {
wx.hideLoading()
console.log('wx.getLocation', res)
}
});
... ...
... ... @@ -43,6 +43,7 @@ Page({
hasGetSellersEnd:false,
hasSetActivity:false,
},
hasClickMoveToLocation:false,//点击回到我的位置
hasSellerConcat:hasSellerConcat,
transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
//qqmapsdk:null,
... ... @@ -224,8 +225,12 @@ Page({
});
this.mapCtx.getRegion({
success:(res)=>{
console.log('regionchange.getRegion',res)
if((res.southwest.latitude!=this.mapData.region.southwest.latitude) || this.data.hasSuggestion) {
console.log('regionchange.getRegion',res.southwest.latitude,this.mapData.region.southwest.latitude,res)
if((res.southwest.latitude!=this.mapData.region.southwest.latitude)
|| this.data.hasSuggestion
|| this.hasClickMoveToLocation
) {
this.hasClickMoveToLocation=false
this.mapData.region = res
this.timeoutGetMarkers();
}
... ... @@ -485,13 +490,8 @@ Page({
wx.showTabBar();
},
moveToLocation(){
if(this.user.latitude==def_latitude){
this.selectComponent('#getpos').getPos(true);
return;
}
this.hasClickMoveToLocation=true
let map=this.data.map;
console.log(this.user.latitude,this.mapData.latitude,def_latitude);
if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
map.latitude=this.user.latitude
map.longitude=this.user.longitude
map.scale=mapScale;
... ... @@ -502,6 +502,13 @@ Page({
map:map,
hasSuggestion:false,
})
if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){
this.selectComponent('#getpos').getPos(true);
return;
}
//console.log(this.user.latitude,this.mapData.latitude,def_latitude);
//if(this.user.latitude==this.mapData.latitude && this.user.longitude==this.mapData.longitude) return;
//if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return;
this.mapCtx.moveToLocation({
success:(res)=>{
console.log('moveToLocation',res)
... ...