From a3716f72066d25d745f4d5103ff23a553c3e102b Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期四, 17 二月 2022 11:41:19 +0800 Subject: [PATCH] Merge branch 'sit' into uat --- PAMapp/components/Consultant/ConsultantSwiper.vue | 43 ++++++++++++++++++++++++++++++++----------- 1 files changed, 32 insertions(+), 11 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue index 66f2a72..ae61981 100644 --- a/PAMapp/components/Consultant/ConsultantSwiper.vue +++ b/PAMapp/components/Consultant/ConsultantSwiper.vue @@ -10,17 +10,26 @@ :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" style="display: flex; align-items: center; justify-content: center; margin-top: 4px"> <i class="icon-star pam-icon icon--yellow"></i> <span class="satisfaction">{{agentInfo.avgScore}}</span> </div> </div> </swiper-slide> - <div class="swiper-button-prev" slot="button-prev"></div> - <div class="swiper-button-next" slot="button-next"></div> + <div class="swiper-button-prev" slot="button-prev"> + <i class="icon-left"></i> + </div> + <div class="swiper-button-next" slot="button-next"> + <i class="icon-right"></i> + </div> </swiper> </div> </template> @@ -28,12 +37,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 +57,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}`); } @@ -82,9 +96,16 @@ height: 100%; &:after { + display: none; + } + + .icon-right,.icon-left { font-size: 20px; - font-weight: bold; - color: #707A81; + color: $CORAL; + } + + &.swiper-button-disabled { + pointer-events: auto; } } -- Gitblit v1.8.0