机型:步步高 X9 微信最新版本号,要获取用户位置经纬度,但是授权弹框不弹出来,事件也直接无效,好奇怪的 submitEvent(){ let that = this; let params = { carId:that.carID, longitude:"", latitude:"", mileage:that.mileage, img:JSON.stringify(that.imageList), description:that.errInfo, mile_image: that.numImgUrl } // 获取用户位置 wx.getLocation({ type: 'wgs84', success: function (res) { params.latitude = res.latitude; params.longitude = res.longitude; // 参数校验 let validate = { carId:params.carId, longitude:params.longitude, latitude:params.latitude, mileage:that.mileage, } if(validateParams(validate) !== true){ let msg = {"carId":"请重新扫码!","longitude":"获取地理位置有误","latitude":"获取地理位置有误","mileage":"请输入里程数"}; showToast(msg[validateParams(validate)]) return false } if(!that.numImgUrl){ showToast("里程数照片不能为空"); return false } if(!that.errInfo && that.imageList.length){ showToast("故障描述不能为空"); return false } if(that.errInfo && !that.imageList.length){ showToast("请上传故障照片"); return false } } }); },
授权位置uni.getLocation 部分安卓机不弹授权框?步步高x9 授权位置uni.getLocation 不弹授权框,获取不到地理位置
2020-04-08