|
@@ -1,11 +1,5 @@
|
|
|
<template>
|
|
|
- <div
|
|
|
- class="enjoyPlayer"
|
|
|
- v-click-outside="handleListOutside"
|
|
|
- :style="{
|
|
|
- transform: `scale(${scaleStyle})`
|
|
|
- }"
|
|
|
- >
|
|
|
+ <div class="enjoyPlayer" v-click-outside="handleListOutside">
|
|
|
<div v-if="!isBase" v-show="isShowEnjoyPlayerList" class="enjoyPlayerList">
|
|
|
<div class="titNameCon">
|
|
|
<div class="titName">
|
|
@@ -52,7 +46,6 @@
|
|
|
@error="handleError()"
|
|
|
></audio>
|
|
|
<div class="playerCon">
|
|
|
- <img class="tipImg" src="./imgs/tip.png" alt="" />
|
|
|
<div class="operateBtn" :class="{ paused: paused }" @click="toggle"></div>
|
|
|
<div class="operateMidCon">
|
|
|
<div class="titleCon">
|
|
@@ -85,7 +78,6 @@ import message from "@/utils/message"
|
|
|
import type { PPTEnjoyElement } from "@/types/slides"
|
|
|
import { useSlidesStore, useMainStore } from "@/store"
|
|
|
import draggable from "vuedraggable"
|
|
|
-import queryParams from "@/queryParams"
|
|
|
|
|
|
const slidesStore = useSlidesStore()
|
|
|
const mainStore = useMainStore()
|
|
@@ -102,8 +94,6 @@ const props = withDefaults(
|
|
|
isBase: false
|
|
|
}
|
|
|
)
|
|
|
-// 学生端 不是isBase预览下面的缩放比例
|
|
|
-const scaleStyle = queryParams.fromType === "CLASS" && !props.isBase && props.isScreening ? 1.5 : 1
|
|
|
|
|
|
function handleListOutside() {
|
|
|
if (!props.isBase && isShowEnjoyPlayerList.value) {
|
|
@@ -306,7 +296,7 @@ const handleError = () => message.error("音频加载失败")
|
|
|
const thumbMove = (e: MouseEvent | TouchEvent) => {
|
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
|
- let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale / scaleStyle
|
|
|
+ let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale
|
|
|
percentage = Math.max(percentage, 0)
|
|
|
percentage = Math.min(percentage, 1)
|
|
|
const time = percentage * duration.value
|
|
@@ -319,7 +309,7 @@ const thumbUp = (e: MouseEvent | TouchEvent) => {
|
|
|
if (!audioRef.value || !playBarWrap.value) return
|
|
|
|
|
|
const clientX = "clientX" in e ? e.clientX : e.changedTouches[0].clientX
|
|
|
- let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale / scaleStyle
|
|
|
+ let percentage = (clientX - getBoundingClientRectViewLeft(playBarWrap.value)) / playBarWrap.value.clientWidth / props.scale
|
|
|
percentage = Math.max(percentage, 0)
|
|
|
percentage = Math.min(percentage, 1)
|
|
|
const time = percentage * duration.value
|
|
@@ -347,33 +337,24 @@ const handleMousedownPlayBar = () => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.enjoyPlayer {
|
|
|
- transform-origin: center bottom;
|
|
|
.playerCon {
|
|
|
background: linear-gradient(180deg, #ffffff 0%, #dfdfdf 100%);
|
|
|
box-shadow:
|
|
|
- 0px 3px 16px 0px rgba(0, 0, 0, 0.08),
|
|
|
- inset 0px -6px 6px 0px rgba(0, 0, 0, 0.08);
|
|
|
- border-radius: 112px;
|
|
|
- outline: 2px solid rgba(0, 0, 0, 0.03);
|
|
|
- padding: 16px 24px;
|
|
|
- width: 706px;
|
|
|
+ 0px 4px 22px 0px rgba(0, 0, 0, 0.08),
|
|
|
+ inset 0px -8px 8px 0px rgba(0, 0, 0, 0.08);
|
|
|
+ border-radius: 157px;
|
|
|
+ padding: 14px 24px 14px 20px;
|
|
|
+ width: 940px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
- .tipImg {
|
|
|
- position: absolute;
|
|
|
- width: 44px;
|
|
|
- height: 12px;
|
|
|
- right: 36px;
|
|
|
- top: 7px;
|
|
|
- }
|
|
|
.operateBtn {
|
|
|
flex-shrink: 0;
|
|
|
background: url("./imgs/pause.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- width: 70px;
|
|
|
- height: 70px;
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
cursor: pointer;
|
|
|
&.paused {
|
|
|
background: url("./imgs/play.png") no-repeat;
|
|
@@ -388,11 +369,11 @@ const handleMousedownPlayBar = () => {
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
.title {
|
|
|
- width: 200px;
|
|
|
+ width: 288px;
|
|
|
font-weight: 600;
|
|
|
- font-size: 22px;
|
|
|
+ font-size: 30px;
|
|
|
color: #131415;
|
|
|
- line-height: 30px;
|
|
|
+ line-height: 42px;
|
|
|
white-space: nowrap;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
@@ -400,52 +381,52 @@ const handleMousedownPlayBar = () => {
|
|
|
.timesCon {
|
|
|
flex-shrink: 0;
|
|
|
font-weight: 400;
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 25px;
|
|
|
color: #999999;
|
|
|
- line-height: 25px;
|
|
|
+ line-height: 36px;
|
|
|
}
|
|
|
}
|
|
|
.bar-wrap {
|
|
|
position: relative;
|
|
|
cursor: pointer;
|
|
|
width: 100%;
|
|
|
- margin-top: 12px;
|
|
|
+ margin-top: 14px;
|
|
|
.bar {
|
|
|
position: relative;
|
|
|
- height: 10px;
|
|
|
+ height: 20px;
|
|
|
width: 100%;
|
|
|
background: #dcdcdc;
|
|
|
- box-shadow: inset 0px 2px 3px 0px #a9a9a9;
|
|
|
- border-radius: 5px;
|
|
|
- outline: 2px solid rgba(255, 255, 255, 0.5);
|
|
|
+ box-shadow: inset 0px 3px 4px 0px #a9a9a9;
|
|
|
+ border-radius: 7px;
|
|
|
+ border: 3px solid rgba(255, 255, 255, 0.5);
|
|
|
.loaded {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
|
background: rgba(255, 255, 255, 0.4);
|
|
|
- height: 10px;
|
|
|
+ height: 14px;
|
|
|
//transition: all 0.5s ease; //这个和ppt动画效果冲突,见禅道12278
|
|
|
will-change: width;
|
|
|
- border-radius: 6px;
|
|
|
+ border-radius: 7px;
|
|
|
}
|
|
|
.played {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
|
- height: 10px;
|
|
|
+ height: 14px;
|
|
|
will-change: width;
|
|
|
background: linear-gradient(270deg, #97d1fd 0%, #0d93ff 100%);
|
|
|
- border-radius: 6px;
|
|
|
+ border-radius: 7px;
|
|
|
|
|
|
.thumb {
|
|
|
position: absolute;
|
|
|
- top: -12px;
|
|
|
- right: -20px;
|
|
|
+ top: -16px;
|
|
|
+ right: -27px;
|
|
|
cursor: pointer;
|
|
|
- width: 38px;
|
|
|
- height: 38px;
|
|
|
+ width: 53px;
|
|
|
+ height: 53px;
|
|
|
background: url("./imgs/td.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
@@ -460,48 +441,47 @@ const handleMousedownPlayBar = () => {
|
|
|
.preBtn {
|
|
|
background: url("./imgs/pre.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- width: 56px;
|
|
|
- height: 56px;
|
|
|
- margin-right: 20px;
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ margin-right: 24px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.nextBtn {
|
|
|
background: url("./imgs/next.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- width: 56px;
|
|
|
- height: 56px;
|
|
|
- margin-right: 20px;
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ margin-right: 24px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.listBtn {
|
|
|
background: url("./imgs/list.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- width: 56px;
|
|
|
- height: 56px;
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.enjoyPlayerList {
|
|
|
width: 100%;
|
|
|
- height: 524px;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
- bottom: 51px;
|
|
|
- box-shadow: 0px 3px 22px 0px rgba(0, 0, 0, 0.12);
|
|
|
- border-radius: 20px 20px 0px 0px;
|
|
|
- background-color: rgb(255, 255, 255);
|
|
|
- padding: 20px 0 61px 10px;
|
|
|
+ bottom: 64px;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0px 4px 31px 0px rgba(0, 0, 0, 0.12);
|
|
|
+ border-radius: 28px 28px 0px 0px;
|
|
|
+ padding: 30px 0 66px 15px;
|
|
|
.titNameCon {
|
|
|
- padding-left: 10px;
|
|
|
+ padding-left: 15px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
height: 38px;
|
|
|
.titName {
|
|
|
font-weight: 600;
|
|
|
- font-size: 22px;
|
|
|
+ font-size: 30px;
|
|
|
color: #131415;
|
|
|
- line-height: 30px;
|
|
|
+ line-height: 42px;
|
|
|
position: relative;
|
|
|
&::after {
|
|
|
position: absolute;
|
|
@@ -509,7 +489,7 @@ const handleMousedownPlayBar = () => {
|
|
|
bottom: 0;
|
|
|
content: "";
|
|
|
width: 100%;
|
|
|
- height: 12px;
|
|
|
+ height: 17px;
|
|
|
background: linear-gradient(90deg, #77bbff 0%, rgba(163, 231, 255, 0.22) 100%);
|
|
|
}
|
|
|
.tit {
|
|
@@ -519,18 +499,19 @@ const handleMousedownPlayBar = () => {
|
|
|
}
|
|
|
}
|
|
|
.enjoyPlayerListCon {
|
|
|
- margin-top: 20px;
|
|
|
+ margin-top: 26px;
|
|
|
overflow-y: auto;
|
|
|
- height: calc(100% - 58px);
|
|
|
- padding-right: 10px;
|
|
|
+ max-height: 316px;
|
|
|
+ min-height: 140px;
|
|
|
+ padding-right: 15px;
|
|
|
.playerItem {
|
|
|
- padding: 18px 5px 18px 10px;
|
|
|
+ padding: 22px 5px 22px 15px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
&.active {
|
|
|
background: #e6f3ff;
|
|
|
- border-radius: 10px;
|
|
|
+ border-radius: 13px;
|
|
|
.itemLeft {
|
|
|
color: #198cfe;
|
|
|
font-weight: 600;
|
|
@@ -538,9 +519,9 @@ const handleMousedownPlayBar = () => {
|
|
|
}
|
|
|
.itemLeft {
|
|
|
font-weight: 400;
|
|
|
- font-size: 20px;
|
|
|
+ font-size: 28px;
|
|
|
color: #131415;
|
|
|
- line-height: 28px;
|
|
|
+ line-height: 40px;
|
|
|
white-space: nowrap;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
@@ -550,19 +531,19 @@ const handleMousedownPlayBar = () => {
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
.itemListBtn {
|
|
|
- width: 34px;
|
|
|
- height: 34px;
|
|
|
- margin-right: 10px;
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
+ margin-right: 16px;
|
|
|
background: url("./imgs/td2.png") no-repeat;
|
|
|
- background-size: 24px 24px;
|
|
|
+ background-size: 34px 34px;
|
|
|
background-position: center;
|
|
|
cursor: grab;
|
|
|
}
|
|
|
.itemCloseBtn {
|
|
|
- width: 34px;
|
|
|
- height: 34px;
|
|
|
+ width: 44px;
|
|
|
+ height: 44px;
|
|
|
background: url("./imgs/del.png") no-repeat;
|
|
|
- background-size: 24px 24px;
|
|
|
+ background-size: 34px 34px;
|
|
|
background-position: center;
|
|
|
cursor: pointer;
|
|
|
}
|