我司的小程序是用uni-app开发的,在声明同意隐私协议的按钮时,参考官方文章
<button
id="agree-btn"
open-type="agreePrivacyAuthorization"
bindagreeprivacyauthorization="handleAgreePrivacyAuthorization"
>
同意
</button>
methods: {
handleAgreePrivacyAuthorization() {
}
}
在uni-app中,bindagreeprivacyauthorization
要写成@agreeprivacyauthorization
,否则会报
Component "xxx" does not have a method "handleAgree" to handle event "agreeprivacyauthorization".