From 873bb61290fadf81f3ebbe0bab04bb1b0cc82013 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期二, 04 一月 2022 17:24:31 +0800 Subject: [PATCH] Update:保戶個人帳號設定 增加成功提醒popup --- PAMapp/components/QuickFilter/QuickFilterConsultantList.vue | 69 +++++++++++++++++++++++++++------- 1 files changed, 55 insertions(+), 14 deletions(-) diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue index 390cba9..71555ba 100644 --- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue +++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue @@ -14,10 +14,12 @@ > <div class="fill" + @touchstart="moveStart" + @touchend="moveEnd" > <UiAvatar :size="200" - :fileName="item.img" + :agentNo="item.agentNo" class="mx-auto" @click.native="showAgentDetail(item.agentNo)" ></UiAvatar> @@ -29,7 +31,8 @@ <div class="smTxt_bold mb-10 text--prudential_grey">����風</div> <div class="mb-10">{{item.seniority}}</div> </el-col> - <el-col :span="12"> + <el-col :span="12" v-if="!hideReviews"> + <!-- TODO:���遛��漲 --> <div class="smTxt_bold mb-10 text--prudential_grey">摰X皛踵�漲</div> <div> <i class="icon-star pam-icon icon--yellow "></i> @@ -64,8 +67,12 @@ > <div class="text--center mdTxt"> <p class="mb-50">{{popUpTxt}}</p> - <p class="text--primary cursor--pointer" - @click="isVisiblePopUp = false">������</p> + <div class="text--center"> + <el-button + type="primary" + @click="isVisiblePopUp = false" + >������</el-button> + </div> </div> </PopUpFrame> @@ -73,15 +80,56 @@ </template> <script lang="ts"> +import { Consultant } from '~/shared/models/consultant.model'; import { ElCarousel } from 'element-ui/types/carousel'; +import { hideReviews } from '~/shared/const/hide-reviews'; import { Vue, Component, Prop } from 'vue-property-decorator'; -import { Consultants } from '~/assets/ts/api/consultant'; @Component export default class QuickFilterConsultantList extends Vue { - @Prop() consultantList!: Consultants[]; + @Prop() + consultantList!: Consultant[]; + isVisiblePopUp = false; popUpTxt = '����憿批��'; + startPosition = 0; + endPosition = 0; + startYPosition = 0; + endYPosition = 0; + hideReviews = hideReviews ; + + ////////////////////////////////////////////////////////////////// + + moveStart(event: TouchEvent) { + this.startPosition = event.changedTouches[0].clientX; + this.startYPosition = event.changedTouches[0].clientY; + } + + moveEnd(event: TouchEvent) { + this.endPosition = event.changedTouches[0].clientX; + this.endYPosition = event.changedTouches[0].clientY; + if (Math.abs(this.endYPosition - this.startYPosition) < 50) { + if (this.endPosition < this.startPosition) { + this.nextCard(); + return; + } + + if (this.endPosition > this.startPosition) { + this.prevCard(); + } + } + } + + ////////////////////////////////////////////////////////////////// + + openPopUp(txt: string) { + this.popUpTxt = txt; + this.isVisiblePopUp = true; + } + + showAgentDetail(agentNo: string): void { + this.$router.push(`/agentInfo/${agentNo}`); + } nextCard() { (this.$refs.carouselRef as ElCarousel).next(); @@ -91,13 +139,6 @@ (this.$refs.carouselRef as ElCarousel).prev(); } - openPopUp(txt: string) { - this.popUpTxt = txt; - this.isVisiblePopUp = true; - } - showAgentDetail(agentNo: string): void { - this.$router.push(`/agentInfo/${agentNo}`); - } } </script> @@ -184,4 +225,4 @@ } } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0