The problem
- The user enters the applet – popup authorization – and is given two options (reject/authorize)
- Take address acquisition as an example. If the user agrees to successfully obtain his geographical location, after the user chooses to refuse, the user needs to re-authorize the page in the Settings to use the page normally. Otherwise, the receiving address cannot be added normally, which seriously affects the user experience
The solution
- After the user rejects the authorization, you can listen to the callback of uni. getUserinfo-fail and use uni.showModal to indicate that the user cannot continue with subsequent operations after rejecting authorization
- Listen uni.showModal confirm setup management code is as follows:
- Uni. opensetting properties
- Scope:
- Set the authorization management page
After selecting, you can get the user’s information again!!