From ac594e4efb30ba28776d74b0fb08ab34d7c32023 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 30 十二月 2021 15:20:08 +0800
Subject: [PATCH] Merge branch 'Phase2'

---
 PAMapp/components/Consultant/ConsultantSwiper.vue |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue
index 66f2a72..45a2ba7 100644
--- a/PAMapp/components/Consultant/ConsultantSwiper.vue
+++ b/PAMapp/components/Consultant/ConsultantSwiper.vue
@@ -10,9 +10,15 @@
           :key="index"
         >
             <div class="consultantCardStyle" >
-              <UiAvatar :size="80" :fileName="agentInfo.img" class="mb-10"></UiAvatar>
+              <UiAvatar
+                class="mb-10"
+                :size="80"
+                :agentNo="agentInfo.agentNo"
+              >
+              </UiAvatar>
               <div class="name">{{agentInfo.name}}</div>
-              <div>
+              <div v-if="!hideReviews">
+                <!-- TODO:���遛��漲 -->
                 <i class="icon-star pam-icon icon--yellow"></i>
                 <span class="satisfaction">{{agentInfo.avgScore}}</span>
               </div>
@@ -28,12 +34,16 @@
 <script lang="ts">
 import { Vue, Component, Prop } from 'vue-property-decorator';
 import { SwiperOptions } from 'swiper';
-import { Consultants } from '~/assets/ts/api/consultant'
+import { Consultant } from '~/shared/models/consultant.model';
+import { hideReviews } from '~/shared/const/hide-reviews';
 
 @Component
 export default class UiSwiper extends Vue {
-    @Prop() agents!: Consultants[];
 
+    @Prop()
+    agents!: Consultant[];
+
+    hideReviews = hideReviews ;
     swiperOptions: SwiperOptions = {
       loop: false,
         slideToClickedSlide: false,
@@ -44,17 +54,18 @@
         breakpoints: {
           320: {
             slidesPerView: 3,
-            spaceBetween: 3
+            spaceBetween: -20
           },
           768: {
             slidesPerView: 6,
-            spaceBetween: 3
+            spaceBetween: -20
           }
         }
     }
 
+    //////////////////////////////////////////////////////////////////////
+
     clkItem(loopIndex: number, realIndex: number) {
-      console.log(loopIndex, realIndex, 'clkItem')
       const agentNo = this.agents[loopIndex].agentNo;
       this.$router.push(`/agentInfo/${agentNo}`);
     }
@@ -86,6 +97,10 @@
       font-weight: bold;
       color: #707A81;
     }
+
+    &.swiper-button-disabled {
+      pointer-events: auto;
+    }
   }
 
   .swiper-button-prev {

--
Gitblit v1.8.0