current position:Home>Wechat applet authorization login problem

Wechat applet authorization login problem

2022-02-02 22:22:55 CSDN Q & A

demand :
Click the login button
1. The authorized user information will pop up wx.getUserProfile
2. After the user agrees and authorizes , Pop up the authorized mobile phone number

<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>

3. Login succeeded after consent Display page information

solve :
My question is How to click only one login button Just realize the above process
I think some small programs are like this
But the authorized phone number Must use button Button
Then the authorized user information and the authorized mobile phone number are separated

I want to know what the general practice is ?
By the way Is there something authorized by one click ? Is more than 1.2 One step direct authorization is enough ?

Thank you !!




Refer to the answer 1:

I just did this during the summer vacation , At present, I understand that there is no way , Two steps are needed. .




Refer to the answer 2:



Refer to the answer 3:

Nested function , When the second step is written to the first step, it will execute itself




Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022222531930.html

Random recommended