diff --git a/pages.json b/pages.json index c22aa3eb9c08cfded4f96d12429ef454da02c506..da70da560aa8c387527602a9f561b41671fcb84d 100644 --- a/pages.json +++ b/pages.json @@ -205,7 +205,7 @@ "navigationBarTitleText": "textarea | 多行输入框" } }, - // #ifdef APP-ANDROID + // #ifdef APP { "path": "pages/component/open-type/open-type", "group": "0,3,12", @@ -1864,7 +1864,7 @@ }, { "path" : "pages/API/dialog-page/dialog-privacytest", - "style" : + "style" : { "navigationBarTitleText" : "" } diff --git a/pages/API/dialog-page/dialog-privacytest.uvue b/pages/API/dialog-page/dialog-privacytest.uvue index 18dc793b315533938d00e0ab163450a98cac6e2e..b844fc39862bc2a84d7db906abf519a854612137 100644 --- a/pages/API/dialog-page/dialog-privacytest.uvue +++ b/pages/API/dialog-page/dialog-privacytest.uvue @@ -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 }) diff --git a/pages/component/open-type/open-type.uvue b/pages/component/open-type/open-type.uvue index 9ff2f4be9bbb78c7be2592ea6a0fd7afbb555352..2ee0d20ca84e9cab1ad4f5864a93444c0fce170f 100644 --- a/pages/component/open-type/open-type.uvue +++ b/pages/component/open-type/open-type.uvue @@ -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