文档:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html
授权范围列表:
![](https://img.haomeiwen.com/i16448088/b6042b511c68fb55.png)
授权范围列表
一、 如果只是展示用户头像昵称
以使用开放能力<open-data>组件
文档:https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
![](https://img.haomeiwen.com/i16448088/e840f1a0c9c8ebfa.png)
open-data组件
open-data组件效果图:
![](https://img.haomeiwen.com/i16448088/6361badcd0dcd2f8.png)
open-data组件效果图
二、获取用户信息
1、用户未授权
使用button组件open-type属性在用户点击时让用户授权
网友评论