测试代码:
permission: function () {
wx.getSetting({
success: function (res) {
console.log(res.authSetting['scope.userInfo']);
console.log(res.authSetting['scope.userLocation']);
console.log(res.authSetting['scope.address']);
console.log(res.authSetting['scope.invoiceTitle']);
console.log(res.authSetting['scope.werun']);
console.log(res.authSetting['scope.record']);
console.log(res.authSetting['scope.writePhotosAlbum']);
console.log(res.authSetting['scope.camera']);
}
})
}
控制台显示的信息:
用wx.openSetting打开授权设置页面后也只有获取用户信息的选项
求助
解决了吗,我的定位信息就出现过一次,后来再也出不来了,scope 也只有一个userInfo了
你要之前申请过授权的项目才会显示,直接调用是不会把所有都列出来的
我有一个项目没法申请授权userLocation,才测试的。用wx.authorize申请userLocation,控制台输出authorize:fail invalid scope