如题
如果通过此方式打开设置页开发者工具会报错误,真机没问题
wx.getSetting({
success(res) {
if (!res.authSetting['scope.userLocation']) {
wx.showModal({
title: '提示',
content: '请设置允许获取位置信息',
confirmText: "设置",
success(res) {
if (res.confirm) {
wx.openSetting()
}
}
})
}
}
})
{"errMsg":"openSetting:fail can only be invoked by user TAP gesture."}