From c0946457d311eb1ced63f7dcbcf4bc3f0e33c55a Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 19 一月 2022 16:43:01 +0800
Subject: [PATCH] fixed: BackActionBar - 預約單結案後顯示的 lable 應為'結案明細'

---
 PAMapp/components/Consultant/ConsultantSwiper.vue |   39 +++++++++++++++++++++++++++------------
 1 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue
index 44d95ed..45a2ba7 100644
--- a/PAMapp/components/Consultant/ConsultantSwiper.vue
+++ b/PAMapp/components/Consultant/ConsultantSwiper.vue
@@ -5,14 +5,20 @@
       class="swiperStyle"
       @click-slide="clkItem"
     >
-        <swiper-slide
+        <swiper-slide class="fix-chrome-click--issue"
           v-for="(agentInfo, index) in agents"
           :key="index"
         >
             <div class="consultantCardStyle" >
-              <el-avatar class="mb-10" :size="80" :src="agentInfo.img"></el-avatar>
+              <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,14 +34,18 @@
 <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: true,
+      loop: false,
         slideToClickedSlide: false,
         navigation: {
           nextEl: '.swiper-button-next',
@@ -44,20 +54,20 @@
         breakpoints: {
           320: {
             slidesPerView: 3,
-            slidesPerGroup: 3,
-            spaceBetween: 3
+            spaceBetween: -20
           },
           768: {
             slidesPerView: 6,
-            slidesPerGroup: 6,
-            spaceBetween: 3
+            spaceBetween: -20
           }
         }
     }
 
+    //////////////////////////////////////////////////////////////////////
+
     clkItem(loopIndex: number, realIndex: number) {
-      this.$router.push('/agentInfo');
-      console.log(loopIndex, realIndex, 'clkItem')
+      const agentNo = this.agents[loopIndex].agentNo;
+      this.$router.push(`/agentInfo/${agentNo}`);
     }
 
 }
@@ -77,6 +87,7 @@
   }
 
   .swiper-button-next,.swiper-button-prev {
+    @extend .fix-chrome-click--issue;
     background-color: $PRIMARY_WHITE;
     top: 0px;
     height: 100%;
@@ -86,6 +97,10 @@
       font-weight: bold;
       color: #707A81;
     }
+
+    &.swiper-button-disabled {
+      pointer-events: auto;
+    }
   }
 
   .swiper-button-prev {

--
Gitblit v1.8.0