onLoad: function () { // 查看是否授权 wx.getSetting({ success: function (res) { if (res.authSetting['scope.userInfo']) { wx.getUserInfo({ success: function (res) { console.log('用户已经授权过') //用户已经授权过 } }) } else { wx.navigateTo({ url: '../authorization/authorization' }) console.log('用户没有授权') //用户没有授权 } } }) }
暮色呼如