onLoad中请求api wx.onNeedPrivacyAuthorization(resolve => { console.log(2); this.resolvePrivacyAuthorization = resolve }) 隐私弹出框点击同意后触发下面这个事件,然后就报错this.resolvePrivacyAuthorization is not a function handleAgreePrivacyAuthorization() { let that = this; that.resolvePrivacyAuthorization({ buttonId: 'agree-btn', event: 'agree' }) // 用户同意隐私协议事件回调 console.log('用户同意隐私协议事件回调'); },
this.resolvePrivacyAuthorization is not a functionwx.onNeedPrivacyAuthorization(resolve => { console.log(2); this.resolvePrivacyAuthorization = resolve }) handleAgreePrivacyAuthorization() { let that = this; that.resolvePrivacyAuthorization({ buttonId: 'agree-btn', event: 'agree' }) // 用户同意隐私协议事件回调 console.log('用户同意隐私协议事件回调'); },
2023-09-12