From 82ba3b46e14f25f6a7c3653661033ddac12703c6 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 01 八月 2023 09:17:18 +0800 Subject: [PATCH] Update: rename consultantType to consultationMethod --- PAMapp/pages/index.vue | 103 ++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 88 insertions(+), 15 deletions(-) diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue index 30aa5ed..43d3e60 100644 --- a/PAMapp/pages/index.vue +++ b/PAMapp/pages/index.vue @@ -59,6 +59,7 @@ <p>�批嚗{gender}}</p> <p>撟湧翩嚗{appointmentDetail.age | toAgeLabel }}</p> <p>�璆哨�{appointmentDetail.job}}</p> + <p>隢株岷�撘�{appointmentDetail.consultationMethod | toConsultationMethod }}</p> <p>��瘙�{ appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('��') : '--'}}</p> <p v-for="(item, index) in hopeContactTime" @@ -141,25 +142,39 @@ </div> </div> </PopUpFrame> + + <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 { Vue, Component, State, Action, Watch, namespace } 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 reviewsService from '~/shared/services/reviews.service'; - import UtilsService from '~/shared/services/utils.service'; - import myConsultantService from '~/shared/services/my-consultant.service'; - import { Appointment, AppointmentClosedInfo } from '~/shared/models/appointment.model'; - import { Consultant } from '~/shared/models/consultant.model'; - import { UserReviewParams } from '~/shared/models/reviews.model'; - import { StrictQueryParams } from '~/shared/models/strict-query.model'; - import { AgentInfo } from '~/shared/models/agent-info.model'; - import { ContactStatus } from '~/shared/models/enum/contact-status'; -import { SatisfactionType } from '~/shared/models/enum/satisfaction-type'; +import appointmentService from '~/shared/services/appointment.service'; +import utilService, {AccessFroms} from '~/shared/services/utils.service'; +import reviewsService from '~/shared/services/reviews.service'; +import myConsultantService from '~/shared/services/my-consultant.service'; +import {Appointment, AppointmentClosedInfo} from '~/shared/models/appointment.model'; +import {Consultant} from '~/shared/models/consultant.model'; +import {UserReviewParams} from '~/shared/models/reviews.model'; +import {StrictQueryParams} from '~/shared/models/strict-query.model'; +import {AgentInfo} from '~/shared/models/agent-info.model'; +import {ContactStatus} from '~/shared/models/enum/contact-status'; +import {SatisfactionType} from '~/shared/models/enum/satisfaction-type'; - const localStorage = namespace('localStorage'); +const localStorage = namespace('localStorage'); const roleStorage = namespace('localStorage'); @Component({ @@ -184,6 +199,9 @@ @Action storeConsultantList!: any; + + @Mutation + setAccessSource!: (accessSource: AccessFroms) => void; @localStorage.Mutation storageClearQuickFilter!: () => void; @@ -223,7 +241,7 @@ appointmentDate : '', appointmentMemoList: [], appointmentNoticeLogs: [], - communicateStatus : this.contactStatus.PICKED, + communicateStatus: this.contactStatus.PICKED, consultantReadTime: '', consultantViewTime: '', contactTime : '', @@ -241,6 +259,7 @@ phone : '', requirement : '', satisfactionScore : 0, + consultationMethod : '' }; agentInfo: Consultant = { @@ -258,9 +277,31 @@ 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; + } + ////////////////////////////////////////////////////////////////////// mounted() { + if (this.$route.query.from) { + const fromSource = this.$route.query.from as AccessFroms; + this.setAccessSource(fromSource); + utilService.insertAccessFrom(fromSource); + } if (this.isAdminLogin) { this.$router.push('/myAppointmentList/appointmentList'); } else { @@ -329,7 +370,7 @@ const appointmentInfo = values[1] as Appointment; this.consultantName = agentInfo.name; this.appointmentDetail = appointmentInfo; - this.appointmentDialogWidth = UtilsService.isMobileDevice() ? '80%' : ''; + this.appointmentDialogWidth = utilService.isMobileDevice() ? '80%' : ''; this.isShowAppointmentDialog = true; switch (reason) { case 'inviteReviewConsultant': @@ -411,6 +452,10 @@ this.$router.push(newRouteQuery); this.storageClearSatisfactionIdFromMsg(); this.storageClearNotContactAppointmentIdFromMsg(); + } + + closeVideo(): void { + this.isCloseVideo = true; } /////////////////////////////////////////////////////////////////////////////// @@ -527,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