From b4d6944076f1df6eedaae35c4c2a7072fe988e8a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 30 四月 2024 15:34:02 +0800 Subject: [PATCH] update: package-lock.json --- PAMapp/pages/notification/index.vue | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/PAMapp/pages/notification/index.vue b/PAMapp/pages/notification/index.vue index c6c9ac9..f3de575 100644 --- a/PAMapp/pages/notification/index.vue +++ b/PAMapp/pages/notification/index.vue @@ -57,10 +57,21 @@ //////////////////////////////////////////////////////////// - mounted() { - this.isUserLogin = authService.isUserLogin(); - reviewsService.readAllMyNotification().then(res => res); + async mounted() { + this.isUserLogin = authService.isUserLogin(); + + try { + const response = await reviewsService.readAllMyNotification(); + if (response !== null) { + } else { + throw new Error('reviewsService.readAllMyNotification returned null-like value.'); + } + } catch (error) { + console.error('An error occurred while reading all notifications:', error); + throw error; } + } + } </script> -- Gitblit v1.8.0