收藏
回答

agreePrivacyAuthorization为什么调用不起来?感觉调用的稀里糊涂的,望指导

开发者工具返回如下:"pages/home/login_confirm/login_confirm" does not have a method "handleAgreePrivacyAuthorization" to handle event "agreeprivacyauthorization".


页面调用:<view class="ysbut">

<button @click="handleOpenPrivacyContract" class="ysbuts" >查看隐私协议</button>

<button class="agree-btn" id="agree-btn" open-type="agreePrivacyAuthorization"

@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>

</view>

现在onload调用 wx.getPrivacySetting,判断是否同意过,如果没有同意,

然后弹出提示框,如果点击同意,则调用

handleAgreePrivacyAuthorization() {

// 用户同意隐私协议事件回调

// 用户点击了同意,之后所有已声明过的隐私接口和组件都可以调用了

},

但是一直报错提示:"pages/home/login_confirm/login_confirm" does not have a method "handleAgreePrivacyAuthorization" to handle event "agreeprivacyauthorization".

基础库3.0.0,麻烦老师们指导一下,感谢

最后一次编辑于  2023-08-31
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容