wx.getSetting({
success: ((res) => {
console.log(res.authSetting);
if (res.authSetting['scope.userInfo']) {
console.log("res.authSetting['scope.userInfo']) ")
this.server.createRoom({
maxMemberNum: 2,
//startPercent: 100,
needUserInfo: "true",
authSetting['scope.userInfo']为true,开启needUserInfo: "true"后就失败,返回:“invalid req”。
文档里只写needUserInfo需要“获得过授权信息”,res.authSetting['scope.userInfo'] 不是已授权得意思吗?如果不是用什么api可以获得授权呢
目前通过 wx.getSetting 获取到的 scope.userInfo 都将直接返回 true,也就是说当前无法通过任何方式获取用户的授权状态。