按照文档设置后,依旧无法获取到定位,请问是怎么回事
requestLocationPermission(type){
// this.hasGps=true
console.log(123);
var that=this
uni.getLocation({
success: function (res) {
console.log('获取到了定位',res);
that.hasGps=true
},
fail(e) {
uni.showModal({
content:'获取定位失败了'+JSON.stringify(e)
})
console.log('获取定位失败了',e);
// that.onOff=false
// that.hasGps=false
// if(this.isAndroid=='ios'){ //IOS
// plus.runtime.openURL("app-settings://");
// } else{ //安卓
// that.checkGps(e.errCode)
// }
}
});
},
