- handleAgreePrivacyAuthorization
[图片] 隐私政策官方文档不是说可以在用户同意后的handleAgreePrivacyAuthorization事件里调用wx.getUserProfile()吗? 实际上不生效?
2023-10-12 - button的open-type="getUserInfo|agreePrivacyAuthoria
<button open-type="getUserInfo|agreePrivacyAuthorization" bindgetuserinfo="getUserProfile" bindagreeprivacyauthorization="handleAgreePrivacyAuthorization"> 这个组件的耦合用法,在基础库3.0.0下,bindgetuserinfo事件不触发,其他版本基础库都正常
2023-10-12 - bindagreeprivacyauthorization调用getUserProfile无效?
[图片] 官方文档是这样写的,在bindagreeprivacyauthorization事件里面调用 wx.getUserProfile 但是在真机上却提示 getUserProfile:fail can only be invoked by user TAP gesture. <view wx:if="{{showPrivacy}}"> <view>隐私弹窗内容....</view> <button bindtap="handleOpenPrivacyContract">查看隐私协议</button> <button id="agree-btn" open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button> </view> handleAgreePrivacyAuthorization() { wx.getUserProfile({ desc: '用于完善信息', success: (res) => { }, fail: (e)=>{ console.log(e) } }) }
2023-09-09