From b4d6944076f1df6eedaae35c4c2a7072fe988e8a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 30 四月 2024 15:34:02 +0800 Subject: [PATCH] update: package-lock.json --- PAMapp/pages/index.vue | 132 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 110 insertions(+), 22 deletions(-) diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue index 71f343c..ab9e195 100644 --- a/PAMapp/pages/index.vue +++ b/PAMapp/pages/index.vue @@ -2,6 +2,7 @@ <div> <Ui-Carousel></Ui-Carousel> <div class="page-container"> + <div> <h5 class="mdTxt">����憿批��</h5> <div class="mt-10 pam-reserveBtn--block"> @@ -15,6 +16,7 @@ </el-button> </div> </div> + <div class="pam-paragraph"> <el-row class="rowStyle"> <el-col :span="16"> @@ -29,6 +31,8 @@ <ConsultantList class="mt-10" :agents="consultantList.slice(0, 3)"></ConsultantList> </div> + + <div class='pam-paragraph'> <div class="pam-recommend"> <h5 class="mdTxt">��靽憿批��</h5> @@ -55,7 +59,8 @@ <p>�批嚗{gender}}</p> <p>撟湧翩嚗{appointmentDetail.age | toAgeLabel }}</p> <p>�璆哨�{appointmentDetail.job}}</p> - <p>��瘙�{appointmentDetail.requirement.split(',').join('��')}}</p> + <p>隢株岷�撘�{appointmentDetail.consultationMethod | toConsultationMethod }}</p> + <p>��瘙�{ appointmentDetail.requirement ? appointmentDetail.requirement.split(',').join('��') : '--'}}</p> <p v-for="(item, index) in hopeContactTime" :key="index" @@ -75,7 +80,7 @@ @click.native="reviewsBtn = true">蝯虫�遛��漲閰��</el-button> </div> - <div v-if="appointmentDetail.communicateStatus === 'reserved' && !isAppointment" class="text--center mt-10"> + <div v-if="appointmentDetail.communicateStatus === 'reserved'" class="text--center mt-10"> <el-button @click="isCancelPopup = true">������</el-button> <el-button @click="edit" type="primary">蝺刻摩</el-button> </div> @@ -137,24 +142,40 @@ </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 + id="ytplayer" type="text/html" width="360" height="270" + frameborder="0" + allowfullscreen + sandbox="allow-scripts allow-same-origin allow-popups allow-presentation fullscreen" + :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 { UserReviewsConsultantsParams } 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 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({ @@ -179,6 +200,9 @@ @Action storeConsultantList!: any; + + @Mutation + setAccessSource!: (accessSource: AccessFroms) => void; @localStorage.Mutation storageClearQuickFilter!: () => void; @@ -218,7 +242,7 @@ appointmentDate : '', appointmentMemoList: [], appointmentNoticeLogs: [], - communicateStatus : this.contactStatus.PICKED, + communicateStatus: this.contactStatus.PICKED, consultantReadTime: '', consultantViewTime: '', contactTime : '', @@ -236,6 +260,7 @@ phone : '', requirement : '', satisfactionScore : 0, + consultationMethod : '' }; agentInfo: Consultant = { @@ -253,9 +278,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&loop=1&playlist=zVBLW9hWD0g' + : 'https://www.youtube.com/embed/655JnwbuRGA?autoplay=1&mute=1&loop=1&playlist=655JnwbuRGA'; + } + + + 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 { @@ -324,7 +371,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': @@ -357,7 +404,9 @@ reAppointment(): void { appointmentService.cancelAppointment(this.appointmentDetail.id).then(() => { - const requirements = this.appointmentDetail.requirement.split(','); + const requirements = this.appointmentDetail && this.appointmentDetail.requirement + ? this.appointmentDetail.requirement.split(',') + : []; this.storeConsultantList(); this.storageStrickQueryItem({ requirements: requirements }); this.storageClearNotContactAppointmentIdFromMsg(); @@ -378,9 +427,10 @@ } userReviewsConsultants() { - const reviewParams: UserReviewsConsultantsParams = { + const reviewParams: UserReviewParams = { appointmentId: this.appointmentDetail.id, score: this.inputScore, + type: SatisfactionType.APPOINTMENT } this.appointmentDetail.satisfactionScore = this.inputScore; @@ -405,6 +455,10 @@ this.storageClearNotContactAppointmentIdFromMsg(); } + closeVideo(): void { + this.isCloseVideo = true; + } + /////////////////////////////////////////////////////////////////////////////// get gender(): string { @@ -425,10 +479,6 @@ return !this.appointmentDetail.satisfactionScore; }; return false; - } - - get isAppointment(): boolean { - return !!this.agentInfo['appointmentStatus']; } } @@ -488,6 +538,7 @@ align-items: center; } + @media (min-width: 576px) and (max-width: 767px) { .quickFilter.el-button--default { background-image: url('~/assets/images/quickFilter/banner_web.svg'); @@ -504,6 +555,15 @@ margin: 0 auto; } + .landing-container { + border: 2px solid blue; + border-radius: 10px; + padding: 10px; + display: flex; + flex-direction: column; + align-items: center; + } + .pam-reserveBtn--block { display: flex; justify-content: space-between; @@ -513,4 +573,32 @@ max-width: 335px; } } + + /* 蝣箔�� .video-container ��撠�/蝯����摰祝摨� */ + .video-container { + position: relative; + width: auto; /* �����蔣��偕撖貉矽� */ + } + + /* �����見撘� */ + .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