//选择位置
showMap: function() {
var that = this;
uni.chooseLocation({
success: function(res) {
uni.hideLoading();
var coordinate = app.globalData.getGcjLocation(res.latitude, res.longitude,false);
if (!coordinate) {
that.api.sendErr('[getGcjLocation 百度地图定位获取异常]')
}
that.Lat = coordinate.lat;
that.lon = coordinate.lon;
that.address = res.address + res.name;
},
fail(e) {
const errStr = e ? '[showMap 选择地图位置] ' + JSON.stringify(e) : ''
that.api.sendErr(errStr)
uni.hideLoading();
}
});
},
// fail报错
{"errMsg":"chooseLocation:fail system auth deny","errNo":10200}
2 个回复
r***@163.com (作者)
还有这个报错
{"errMsg":"chooseLocation:fail cancel","errNo":10502}
DCloud_UNI_Anne
单独测试一下抖音小程序(不使用 uni-app 时),是否存在此问题?
r***@163.com (作者)
此bug仍存在,客户很多此类投诉。
怀疑是一个关联系统设置的bug。
当用户未向抖音提供位置授权时,chooseLocation方法就可能会存在这个报错。导致我们会重复提醒用户去授权,但“授权列表”页面无“地理位置”选项。
2023-04-06 14:24