保誠-保戶業務員媒合平台
Tomas
2023-08-05 863699eb004f0f8024371a16c43079651705810f
Fixed: [弱掃] p20.1 Bad use of null-like value
修改1個檔案
21 ■■■■ 已變更過的檔案
PAMapp/pages/satisfactionList.vue 21 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/satisfactionList.vue
@@ -89,7 +89,7 @@
  ///////////////////////////////////////////////////////
  sent() {
  async sent() {
    const reviewParams: UserReviewParams[] = this.mapUnReviewLogList
                .filter(item => item.satisfaction > 0)
                .map(item => {
@@ -97,12 +97,21 @@
                    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() {