Recently, WeChat Mini Program has proposed adjustments to the wx.login and wx.getUserInfo interfaces for the audit mini program, and proposed a new interface for developers to call The following figure is the official document details for the new interface Click to visit the official website for more details It is worth noting that the new interface wx.getUserProfile can only be called using catchtap or bindtap (ps: it can be used in wx.showmodel), and cannot be called directly in onload, onshow, etc., and the return parameters have changed. The following figure shows the data type returned by the new interface wx.getUserProfile // An highlighted block wx.showModal({ title: 'Warm Tips', content: 'Requesting your personal information', success(res) { if (res.confirm) { wx.getUserProfile({ desc: "Get your nickname, avatar, region and gender", success: res => { console.log(res) let wxUserInfo = res.userInfo; }, fail: res => { //Reject authorization that.showErrorModal('You rejected the request'); return; } })} else if (res.cancel) { //Reject authorization showErrorModal is a custom prompt that.showErrorModal('You rejected the request'); return; } } }) The new version of wx.login interface returns. The interface return of wx.getUserInfo remains unchanged for the time being. User information can no longer be directly obtained. wx.login wx.getUserInfo I spent some time working on this new interface. Maybe I am not very good at it (no, ヽ(≧□≦)ノ). Anyway, this matter has finally come to a head, right? I hope this can help more friends! <( ̄︶ ̄)> This is the end of this article about the specific use of the wx.getUserProfile interface of the mini program. For more relevant content about the wx.getUserProfile interface of the mini program, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL's conceptual understanding of various locks
>>: Analysis of Hyper-V installation CentOS 8 problem
Table of contents Question: 1. First attempt 2. R...
tomcat server configuration When everyone is lear...
summary: The following is a method for changing t...
Table of contents Preface 1. What is a lock? 2. L...
Table of contents Linux--File descriptor, file po...
If we introduce the nesting rules of basic HTML w...
Table of contents Written in front Several storag...
Table of contents 1. Introduction 2. Implementati...
Table of contents App.vue sub1.vue sub2.vue Summa...
1. Get the image #Specify the version that includ...
1. First, we create a .json file for interactive ...
This article uses an example to illustrate the us...
Table of contents Preface Front-end structure Bac...
1. parseFloat() function Make a simple calculator...
Recently, the business side reported that some us...