From 23a51718522d4b01e9f13532573a85ff27298c08 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期一, 31 七月 2023 17:26:31 +0800 Subject: [PATCH] Merge branch '2023_CR2' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into 2023_CR2 --- PAMapp/pages/index.vue | 75 +++++++++++++++++++++++++++++++++---- 1 files changed, 66 insertions(+), 9 deletions(-) diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue index 3b30c4d..9adeb1c 100644 --- a/PAMapp/pages/index.vue +++ b/PAMapp/pages/index.vue @@ -59,7 +59,7 @@ <p>�批嚗{gender}}</p> <p>撟湧翩嚗{appointmentDetail.age | toAgeLabel }}</p> <p>�璆哨�{appointmentDetail.job}}</p> - <p>隢株岷�撘�{appointmentDetail.consultantMode }}</p> + <p>隢株岷�撘�{appointmentDetail.consultationMethod | toConsulType }}</p> <p>��瘙�{ appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('��') : '--'}}</p> <p v-for="(item, index) in hopeContactTime" @@ -142,17 +142,25 @@ </div> </div> </PopUpFrame> - <iframe width=��780�� - height=��440�� - style="position: fixed; bottom: 30px; right: 30px; z-index: 9999;" - allowfullscreen - src="https://www.youtube.com/embed/655JnwbuRGA?autoplay=1&mute=1" - ></iframe> + + <div class="video-container" + v-if="isShowFilmPlayer" + style="position: fixed; bottom: 30px; right: 30px; z-index: 9999; display: flex; justify-content: flex-end;" + > + <iframe + width=��780�� + height=��440�� + allowfullscreen + :src="filmVideoSrc" + ></iframe> + <div class="close-btn" @click="closeVideo()">X</div> + </div> + </div> </template> <script lang="ts"> -import {Action, Component, Mutation, namespace, State, Vue, Watch} from 'nuxt-property-decorator'; +import {Action, Component, Getter, Mutation, namespace, State, Vue, Watch} from 'nuxt-property-decorator'; import appointmentService from '~/shared/services/appointment.service'; import utilService, {AccessFroms} from '~/shared/services/utils.service'; @@ -251,7 +259,7 @@ phone : '', requirement : '', satisfactionScore : 0, - consultantMode : '' + consultationMethod : '' }; agentInfo: Consultant = { @@ -268,6 +276,23 @@ seniority : '', appointments : [] }; + + isCloseVideo = false; + + @Getter + fromAccess!: AccessFroms; + + get filmVideoSrc() { + if (!this.fromAccess) return ''; + return this.fromAccess === AccessFroms.FILM_1 + ? 'https://www.youtube.com/embed/zVBLW9hWD0g?autoplay=1&mute=1' + : 'https://www.youtube.com/embed/655JnwbuRGA?autoplay=1&mute=1'; + } + + + get isShowFilmPlayer() { + return !!this.fromAccess && !this.isCloseVideo; + } ////////////////////////////////////////////////////////////////////// @@ -429,6 +454,10 @@ this.storageClearNotContactAppointmentIdFromMsg(); } + closeVideo(): void { + this.isCloseVideo = true; + } + /////////////////////////////////////////////////////////////////////////////// get gender(): string { @@ -543,4 +572,32 @@ max-width: 335px; } } + + /* 蝣箔�� .video-container ��撠�/蝯����摰祝摨� */ + .video-container { + position: relative; + width: 600px; /* �����蔣��偕撖貉矽� */ + } + + /* �����見撘� */ + .close-btn { + position: absolute; + top: -10px; + right: -10px; + cursor: pointer; + font-size: 20px; + color: #fff; + background-color: #000; + width: 30px; + height: 30px; + text-align: center; + line-height: 30px; + border-radius: 50%; + opacity: 0.7; + } + + .close-btn:hover { + opacity: 1; + } + </style> -- Gitblit v1.8.0