用户是否授权
2019-04-11 本文已影响0人
web小哥MrYang
wx.getSetting({
success: function (res) {
console.log(res)
if (res.authSetting['scope.userInfo']) {
} else {
// 用户没有授权
// 改变 isHide 的值,显示授权页面
that.setData({
isHide: true
});
}
}
});
wx.getSetting({
success: function (res) {
console.log(res)
if (res.authSetting['scope.userInfo']) {
} else {
// 用户没有授权
// 改变 isHide 的值,显示授权页面
that.setData({
isHide: true
});
}
}
});