diff --git a/pages/index/index.vue b/pages/index/index.vue index c270d7fffb2086f8f4c38b8aad6431db90508306..28fdc873a652a74525b0512e92a30b3ae96ba910 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -89,10 +89,17 @@ }, testonMemoryWarning() { uni.onMemoryWarning(this.onMemoryWarning) + uni.showToast({ + icon:'none', + title:'已监听,注意控制台输出' + }) }, testoffMemoryWarning(){ - // uni.offMemoryWarning(this.onMemoryWarning) - uni.offMemoryWarning() + uni.offMemoryWarning(this.onMemoryWarning) + uni.showToast({ + icon:'none', + title:'监听已移除' + }) }, testScreenShotListen() { var that = this; diff --git a/uni_modules/uni-memorywarning/utssdk/app-android/index.uts b/uni_modules/uni-memorywarning/utssdk/app-android/index.uts index a74c48d65dc6f63b66735d5ee7703bf3619183e4..6e1d2400ed3cd947dc36e4d329844d56a836c54b 100644 --- a/uni_modules/uni-memorywarning/utssdk/app-android/index.uts +++ b/uni_modules/uni-memorywarning/utssdk/app-android/index.uts @@ -4,7 +4,6 @@ let listeners: UTSCallback[] = [] const onAppTrimMemoryListener = (res: number) => { listeners.forEach(listener => { - console.log("listener " + listener); listener(res) }) }