feat: 新增音频播放器功能及MV预览组件

style: 优化页面布局及样式细节

refactor: 重构音频播放逻辑与进度条控制

docs: 更新README说明音频播放功能

test: 添加音频播放器交互测试用例
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-09-10 19:00:23 +08:00
parent 8a6bef2214
commit 3d380d82de
37 changed files with 1629 additions and 11 deletions

View File

@@ -30,6 +30,52 @@
width: 1200px;
margin: 0 auto;
}
.content .sidebar {
position: fixed;
top: 175px;
right: 100px;
z-index: 10;
flex-direction: column;
align-items: center;
}
.content .sidebar .pointer {
margin-bottom: 192px;
}
.content .sidebar .pointer .item {
width: 4px;
height: 50px;
margin-bottom: 2px;
background-color: #ffffff;
cursor: pointer;
position: relative;
}
.content .sidebar .pointer .item.active {
background-color: #f3974b;
}
.content .sidebar .pointer .item.active::after {
content: attr(data-index);
position: absolute;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
color: #f3974b;
font-size: 14px;
top: 0;
left: -21px;
}
.content .sidebar .arrow {
width: 12px;
display: flex;
flex-direction: column;
}
.content .sidebar .arrow .item {
width: 12px;
height: 7px;
cursor: pointer;
}
.content .sidebar .arrow .item:not(:last-of-type) {
margin-bottom: 34px;
}
.content .introduce {
width: 100%;
}
@@ -149,6 +195,7 @@
left: 30px;
bottom: 30px;
z-index: 1;
cursor: pointer;
}
.content .introduce .trait {
background-color: #ffffff;
@@ -259,6 +306,20 @@
height: 500px;
flex-direction: column;
padding-top: 29px;
position: relative;
}
.content .works .mv-box .item:not(:nth-last-child(-n + 3)) {
border-bottom: 1px solid #ebebeb;
}
.content .works .mv-box .item:not(:nth-child(3n)) {
border-right: 1px solid #ebebeb;
}
.content .works .mv-box .item .serial-icon {
position: absolute;
top: 40px;
left: 0;
width: 21px;
height: 37px;
}
.content .works .mv-box .item .serial {
height: 44px;
@@ -277,6 +338,7 @@
font-size: 20px;
color: #000000;
margin-left: 40px;
margin-right: 40px;
margin-bottom: 18px;
}
.content .works .mv-box .item .text {
@@ -288,6 +350,8 @@
color: #555555;
line-height: 24px;
margin-bottom: 10px;
white-space: pre-line;
padding: 0 40px;
}
.content .works .mv-box .item .time {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
@@ -295,9 +359,448 @@
font-style: normal;
font-size: 14px;
color: #555555;
padding: 0 40px;
margin-bottom: 18px;
}
.content .works .mv-box .item .media {
position: relative;
width: 340px;
height: 191px;
margin: 0 30px;
cursor: pointer;
}
.content .works .mv-box .item .media .img {
width: 100%;
height: 100%;
}
.content .works .mv-box .item .media .play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 27px;
height: 27px;
cursor: pointer;
filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}
.content .works .audio-box {
display: grid;
grid-template-columns: repeat(2, 1fr);
background-color: #ffffff;
border-radius: 20px;
margin-top: 60px;
}
.content .works .audio-box .item {
height: 314px;
padding-top: 29px;
position: relative;
}
.content .works .audio-box .item:not(:nth-last-child(-n + 2)) {
border-bottom: 1px solid #ebebeb;
}
.content .works .audio-box .item:not(:nth-child(2n)) {
border-right: 1px solid #ebebeb;
}
.content .works .audio-box .item .serial-icon {
position: absolute;
top: 40px;
left: 0;
width: 21px;
height: 37px;
}
.content .works .audio-box .item .serial {
height: 44px;
font-family: "AlibabaPuHuiTiB", "Alibaba PuHuiTi Bold", "Alibaba PuHuiTi Heavy", "Alibaba PuHuiTi", sans-serif;
font-weight: 700;
font-style: normal;
color: #000000;
font-size: 32px;
margin-left: 40px;
margin-bottom: 40px;
}
.content .works .audio-box .item .content .album {
width: 234px;
position: relative;
z-index: 1;
margin-left: 30px;
margin-right: 36px;
}
.content .works .audio-box .item .content .album .img {
width: 160px;
height: 160px;
filter: drop-shadow(5px 5px 2.5px rgba(0, 0, 0, 0.35));
}
.content .works .audio-box .item .content .album .icon {
width: 160px;
height: 160px;
position: absolute;
top: 0;
right: 0;
z-index: -1;
}
.content .works .audio-box .item .content .info {
flex-direction: column;
}
.content .works .audio-box .item .content .info .name {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
margin-bottom: 10px;
}
.content .works .audio-box .item .content .info .subtitle {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #555555;
margin-bottom: 8px;
}
.content .works .audio-box .item .content .info .time {
font-size: 14px;
color: #555555;
margin-bottom: 25px;
}
.content .works .audio-box .item .content .info .progress-bar {
width: 260px;
height: 10px;
margin-bottom: 17px;
}
.content .works .audio-box .item .content .info .progress-bar .bar {
height: 4px;
border-radius: 10px;
position: relative;
cursor: pointer;
}
.content .works .audio-box .item .content .info .progress-bar .bar.white {
width: 0;
border-radius: 10px 0 0 10px;
background-color: #5241b0;
}
.content .works .audio-box .item .content .info .progress-bar .bar.white::before {
content: "";
width: 10px;
height: 10px;
background-color: #f3974b;
border-radius: 50%;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: -5px;
cursor: pointer;
z-index: 1;
display: block;
}
.content .works .audio-box .item .content .info .progress-bar .bar.black {
background-color: #000000;
border-radius: 0 10px 10px 0;
}
.content .works .audio-box .item .content .info .operate .speed {
width: 16px;
height: 12px;
cursor: pointer;
}
.content .works .audio-box .item .content .info .operate .play {
width: 24px;
height: 24px;
cursor: pointer;
margin: 0 30px;
}
.content .works .bj2 {
width: 1200px;
height: 196px;
margin: 0 auto;
}
.content .custom {
background: #f9f9f9;
}
.content .custom .custom-box {
flex-direction: column;
position: relative;
padding-top: 106px;
z-index: 1;
}
.content .custom .title {
width: 160px;
height: 39px;
margin: 0 auto 32px;
}
.content .custom .subtitle {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
color: #555555;
text-align: center;
margin-bottom: 131px;
}
.content .custom .list {
flex-wrap: wrap;
justify-content: space-between;
}
.content .custom .list .item {
width: 560px;
height: 160px;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.10196078);
}
.content .custom .list .item:not(:nth-last-child(-n + 2)) {
margin-bottom: 140px;
}
.content .custom .list .item:last-of-type {
margin-bottom: 130px;
}
.content .custom .list .item .info {
width: 280px;
flex-direction: column;
padding-top: 18px;
padding-left: 20px;
margin-right: 20px;
height: 100%;
}
.content .custom .list .item .info .name {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 18px;
color: #000000;
margin-bottom: 8px;
}
.content .custom .list .item .info .lyric {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #555555;
margin-bottom: 18px;
}
.content .custom .list .item .info .progress-bar {
width: 260px;
height: 10px;
margin-bottom: 17px;
}
.content .custom .list .item .info .progress-bar .bar {
height: 4px;
border-radius: 10px;
position: relative;
cursor: pointer;
}
.content .custom .list .item .info .progress-bar .bar::after {
position: absolute;
}
.content .custom .list .item .info .progress-bar .bar.white {
width: 20%;
border-radius: 10px 0 0 10px;
}
.content .custom .list .item .info .progress-bar .bar.white::after {
content: "";
width: calc(100% + 5px);
height: 100%;
background-color: #5241b0;
display: block;
border-radius: 10px 0 0 10px;
}
.content .custom .list .item .info .progress-bar .bar.black::after {
content: "";
width: calc(100% + 5px);
height: 100%;
background-color: #000000;
display: block;
border-radius: 0 10px 10px 0;
left: -5px;
}
.content .custom .list .item .info .progress-bar .circle {
width: 10px;
height: 10px;
background-color: #f3974b;
border-radius: 50%;
position: relative;
cursor: pointer;
z-index: 1;
}
.content .custom .list .item .info .operate .speed {
width: 16px;
height: 12px;
cursor: pointer;
}
.content .custom .list .item .info .operate .play {
width: 24px;
height: 24px;
cursor: pointer;
margin: 0 30px;
}
.content .custom .list .item .info-img {
width: 240px;
height: 240px;
filter: drop-shadow(5px 5px 2.5px rgba(0, 0, 0, 0.35));
}
.content .custom .bottom {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
height: 384px;
z-index: -1;
width: 99vw;
overflow: hidden;
}
.content .custom .bottom .bj {
width: 640px;
height: 384px;
}
.content .student .student-box {
background: linear-gradient(180deg, #1e135e 0%, #5241b0 100%);
padding-top: 105px;
padding-bottom: 130px;
flex-direction: column;
align-items: center;
}
.content .student .student-box .title {
width: 160px;
height: 41px;
margin-bottom: 93px;
}
.content .student .student-box .list {
margin-bottom: 69px;
}
.content .student .student-box .list .img {
width: 240px;
height: 240px;
border-radius: 50%;
filter: drop-shadow(5px 5px 2.5px rgba(0, 0, 0, 0.35));
}
.content .student .student-box .list .img.pitch {
width: 320px;
height: 320px;
}
.content .student .student-box .name {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #ffffff;
text-align: center;
margin-bottom: 16px;
}
.content .student .student-box .info {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #ffffff;
text-align: center;
line-height: 24px;
margin-bottom: 62px;
}
.content .student .student-box .info .icon {
width: 12px;
height: 14px;
margin-right: 10px;
}
.content .student .student-box .progress-bar {
height: 10px;
width: 500px;
margin-bottom: 32px;
}
.content .student .student-box .progress-bar .bar {
height: 4px;
background-color: #ffffff;
border-radius: 10px;
}
.content .student .student-box .progress-bar .circle {
width: 10px;
height: 10px;
background-color: #f3974b;
border-radius: 50%;
}
.content .student .student-box .operate .cut {
width: 14px;
height: 12px;
cursor: pointer;
}
.content .student .student-box .operate .speed {
width: 16px;
height: 12px;
margin: 0 40px;
cursor: pointer;
}
.content .student .student-box .operate .play {
width: 24px;
height: 24px;
cursor: pointer;
}
.content .student .contact {
flex-direction: column;
align-items: center;
margin-top: -30px;
padding-top: 124px;
padding-bottom: 113px;
background: #fff;
}
.content .student .contact .title {
width: 144px;
height: 38px;
margin-bottom: 63px;
}
.content .student .contact .hint {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
color: #333333;
text-align: center;
margin-bottom: 20px;
}
.content .student .contact .arrows {
width: 14px;
height: 14px;
margin-top: 37px;
margin-bottom: 53px;
}
.content .student .contact .WeChat {
width: 160px;
height: 160px;
margin-bottom: 26px;
}
.content .student .contact .logo {
width: 82px;
height: 16px;
}
.content .footer {
flex-direction: column;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
color: #f2f2f2;
font-size: 13px;
height: 180px;
background: linear-gradient(180deg, #5241b0 0%, #1e135e 100%);
}
.content .footer .logo {
width: 226px;
height: 30px;
margin-bottom: 22px;
}
.content .preview {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #4c4c4c;
z-index: 1000;
}
.content .preview .close {
position: absolute;
top: 20px;
right: 20px;
cursor: pointer;
width: 20px;
height: 20px;
}
.content .preview .artplayer-app {
width: 800px;
height: 600px;
}