How does WeChat Mini Programs bring up the authorized pop-up window?

1. Is this window provided by Wechat or made by the developers themselves?
2. If it is provided by Wechat, then how is it transferred?

clipboard.png


https://developers.weixin.qq.
View Mini Program development document
wx.getUserInfo API is


cookiecookie


button



button


,image


  1. create a button by adding the tag attribute open-type= "getUserInfo"
  2. using wx.createUserInfoButton . Click this button to get user permissions. Document address: https://developers.weixin.qq.com/minigame/dev/api/open-api/user-info/wx.createUserInfoButton.html
  3. uses wx.authorize to actively obtain user permissions, which can obtain more kinds of permissions. Specific documentation: https://developers.weixin.qq.com/minigame/dev/api/open-api/authorize/wx.authorize.html
Menu