提交 1b7e2882 编写于 作者: M mahaifeng

[privacy]添加隐私政策示例

上级 d49c73f7
......@@ -205,7 +205,7 @@
"navigationBarTitleText": "textarea | 多行输入框"
}
},
// #ifdef APP-ANDROID
// #ifdef APP
{
"path": "pages/component/open-type/open-type",
"group": "0,3,12",
......
......@@ -16,11 +16,14 @@
export default {
data() {
return {
number: 0
}
},
unmounted() {
uni.offPrivacyAuthorizationChange(this.number)
},
onLoad() {
uni.onPrivacyAuthorizationChange((callback) => {
this.number = uni.onPrivacyAuthorizationChange((callback) => {
uni.showToast({
title: 'isPrivacyAgree:' + !callback.needAuthorization
})
......
......@@ -15,10 +15,15 @@
return {
isAgreeRes: false,
log: "",
number: 0
}
},
unmounted() {
console.log('unmounted', this.number)
uni.offPrivacyAuthorizationChange(this.number)
},
onLoad() {
uni.onPrivacyAuthorizationChange((callback) => {
this.number = uni.onPrivacyAuthorizationChange((callback) => {
this.isAgreeRes = !callback.needAuthorization
uni.showToast({
title: 'isPrivacyAgree:' + this.isAgreeRes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册