From c047a3336ff1efc7d21edee6f0c8811264eebae7 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期六, 22 一月 2022 15:25:32 +0800 Subject: [PATCH] update: TODO#134222/134105 通知小鈴鐺/取得待評分的滿意度清單, 串接api --- PAMapp/pages/notification/index.vue | 43 +++++++++++++++++++++++++++---------------- 1 files changed, 27 insertions(+), 16 deletions(-) diff --git a/PAMapp/pages/notification/index.vue b/PAMapp/pages/notification/index.vue index d9f0140..1dcdba1 100644 --- a/PAMapp/pages/notification/index.vue +++ b/PAMapp/pages/notification/index.vue @@ -3,7 +3,11 @@ <div class="text--right mb-10" @click="showNotificationHint = true"> <i class="satisfaction-icon icon-edit"></i> </div> - <div class="satisfaction-banner my-10 cursor--pointer" @click="$router.push('/satisfactionList')"> + <div + v-if="isUserLogin && unReviewLogList.length" + class="satisfaction-banner my-10 cursor--pointer" + @click="$router.push('/satisfactionList')" + > <p class="satisfaction-text text--center">隢‵撖急遛��漲隤踵</p> </div> <el-row @@ -14,7 +18,7 @@ align="middle" class="notification-card" > - <el-col class="unRead" :span="3"></el-col> + <el-col class="unRead" :span="3" v-if="!item.readDate"></el-col> <el-col :span="18"> <p class="text">{{item.content}}</p> </el-col> @@ -22,13 +26,13 @@ <div> <UiDateFormat class="date" - :date="item.date" + :date="item.createdDate" onlyShowSection="DAY" /> </div> <div> <UiDateFormat class="time" - :date="item.date" + :date="item.createdDate" onlyShowSection="TIME" /> </div> @@ -54,22 +58,29 @@ </template> <script lang="ts"> -import { Component, Vue } from "nuxt-property-decorator"; +import { Component, State, Vue } from "nuxt-property-decorator"; +import { AppointmentLog } from "~/shared/models/appointment.model"; +import { NotificationList } from "~/shared/models/reviews.model"; +import authService from "~/shared/services/auth.service"; @Component export default class Notification extends Vue { - showNotificationHint = false; - notificationList = [ - { - content: '蝟餌絞�������10/19(鈭�)22:30�10/21(�)20:00�脰�頂蝯望�', - date: '2022-01-05T04:18:05.249Z' - }, - { - content: '蝟餌絞�������10/19(鈭�)22:30�10/21(�)20:00�脰�頂蝯望�', - date: '2022-01-05T04:18:05.249Z' - } - ] + @State + unReviewLogList!: AppointmentLog[]; + + @State + notificationList!: NotificationList[]; + + showNotificationHint = false; + isUserLogin = false; + + //////////////////////////////////////////////////////////// + + mounted() { + this.isUserLogin = authService.isUserLogin(); + } + } </script> -- Gitblit v1.8.0