1. 首页
  2. 数据库
  3. 其它
  4. 微信小程序判断用户是否需要再次授权获取个人信息

微信小程序判断用户是否需要再次授权获取个人信息

上传者: 2020-12-23 02:38:44上传 PDF文件 26.74KB 热度 20次
一、index.js设置如下 //获取用户的授权信息,放到本地缓存中 wx.getSetting({ success: (res) => { if(res.authSetting['scope.userInfo']) { wx.setStorage({ key: 'can_getuserinfo', data: 1, }) } else { wx.setStorage({ key: 'can_getuserinfo', data: 0, }) }
下载地址
用户评论