From 54e0b9707bb34259dfccbe0c792b50e12b267e13 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期二, 08 八月 2023 17:23:15 +0800 Subject: [PATCH] Merge branch '滲透' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into 滲透 --- PAMapp/pages/satisfactionList.vue | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/PAMapp/pages/satisfactionList.vue b/PAMapp/pages/satisfactionList.vue index dbf2330..57e9110 100644 --- a/PAMapp/pages/satisfactionList.vue +++ b/PAMapp/pages/satisfactionList.vue @@ -89,20 +89,29 @@ /////////////////////////////////////////////////////// - sent() { + async sent() { const reviewParams: UserReviewParams[] = this.mapUnReviewLogList - .filter(item => item.satisfaction > 0) - .map(item => { - return { - appointmentId: item.appointmentId, - score: item.satisfaction, - type: item.type - } - }) + .filter(item => item.satisfaction > 0) + .map(item => { + return { + appointmentId: item.appointmentId, + score: item.satisfaction, + type: item.type + }; + }); - reviewsService.allUserReviewsConsultants(reviewParams).then((res) => { - this.showConfirmPopup = true; - }); + try { + const response = await reviewsService.allUserReviewsConsultants(reviewParams); + if (response !== null) { + this.showConfirmPopup = true; + } else { + throw new Error('reviewsService.allUserReviewsConsultants returned null-like value.'); + } + } catch (error) { + console.error('An error occurred while sending reviews:', error); + // �隞亙甇方���隤斗����身�� + throw error; + } } closePopup() { -- Gitblit v1.8.0