最简单的,微信做好的功能,使用同意按钮。
1、我是将登录和授权合到一起了open-type="getPhoneNumber|agreePrivacyAuthorization"
<button id="agree-btn" type='primary' open-type="getPhoneNumber|agreePrivacyAuthorization" bindgetphonenumber="decryptPhoneNumber" bindagreeprivacyauthorization="bindagreeprivacyauthorization">
登录
</button>
2、可通过 bindagreeprivacyauthorization 监听用户同意隐私协议事件。
bindagreeprivacyauthorization(e){
console.log("隐私协议",e)
},