|
...
|
...
|
@@ -12,7 +12,11 @@ Component({ |
|
|
|
hasAllowaAuthDeny:{//是否允许用户拒绝
|
|
|
|
type:Boolean,
|
|
|
|
value:true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
hasAllowLoading:{//包间查找中
|
|
|
|
type:Boolean,
|
|
|
|
value:true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -38,7 +42,7 @@ Component({ |
|
|
|
latitude: '',
|
|
|
|
longitude: '',
|
|
|
|
});
|
|
|
|
wx.hideLoading()
|
|
|
|
if(this.data.hasAllowLoading) wx.hideLoading()
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(failCount>2){//定位失败
|
|
...
|
...
|
@@ -55,7 +59,7 @@ Component({ |
|
|
|
latitude:'',
|
|
|
|
longitude:'',
|
|
|
|
});
|
|
|
|
wx.hideLoading()
|
|
|
|
if(this.data.hasAllowLoading) wx.hideLoading()
|
|
|
|
},
|
|
|
|
})
|
|
|
|
return;
|
|
...
|
...
|
@@ -69,7 +73,7 @@ Component({ |
|
|
|
latitude: '',
|
|
|
|
longitude: '',
|
|
|
|
});
|
|
|
|
wx.hideLoading()
|
|
|
|
if(this.data.hasAllowLoading) wx.hideLoading()
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.selectComponent('#showModal').options({
|
|
...
|
...
|
@@ -88,9 +92,11 @@ Component({ |
|
|
|
_getPos(){
|
|
|
|
return new Promise((success, fail) => {
|
|
|
|
let rex={latitude:'',longitude:''};
|
|
|
|
wx.showLoading({
|
|
|
|
title: '包间查找中',
|
|
|
|
})
|
|
|
|
if(this.data.hasAllowLoading){
|
|
|
|
wx.showLoading({
|
|
|
|
title: '包间查找中',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
let hasSuccess=false;
|
|
|
|
wx.getLocation({
|
|
|
|
type: 'gcj02',
|
|
...
|
...
|
@@ -110,7 +116,7 @@ Component({ |
|
|
|
setTimeout(()=>{
|
|
|
|
if(!hasSuccess){
|
|
|
|
success(rex)
|
|
|
|
wx.hideLoading()
|
|
|
|
if(this.data.hasAllowLoading) wx.hideLoading()
|
|
|
|
}
|
|
|
|
},2000)
|
|
|
|
})
|
...
|
...
|
|