no message

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-09-11 17:28:56 +08:00
parent 8998d4e51b
commit 0b9358453f
7 changed files with 800 additions and 294 deletions

View File

@@ -5,6 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>朴见潮音</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
<link rel="icon" href="./static/img/favicon.ico" type="image/x-icon" />
<style>
/* 全局样式 */
* {
@@ -152,7 +154,7 @@
font-weight: bold;
color: #fff;
letter-spacing: 1px;
margin-bottom: 5px;
/* margin-bottom: 5px; */
text-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}
@@ -174,6 +176,13 @@
background-color: #0d0d0d;
z-index: 5;
}
@media screen and (max-width: 1024px) {
.logo-mask {
/* transition: width 1s ease; */
width: 64px;
}
}
</style>
</head>
<body>
@@ -181,7 +190,7 @@
<div class="header-content">
<div class="header-left">
<img class="header-title" src="/static/img/logo.png" />
<div class="header-slogan">探索音乐的无限可能</div>
<!-- <div class="header-slogan">探索音乐的无限可能</div> -->
</div>
<!-- <div class="header-right">
<i class="fas fa-music"></i>

View File

@@ -6,7 +6,9 @@
<title>朴见潮音官网</title>
<script src="./static/js/vue.global.js"></script>
<script src="./static/js/artplayer.js"></script>
<script src="./static/js/axios.min.js"></script>
<link rel="stylesheet" href="./static/css/index.css" />
<link rel="icon" href="./static/img/favicon.ico" type="image/x-icon" />
<style>
[v-cloak] {
display: none;
@@ -18,25 +20,19 @@
<!-- 原生audio标签隐藏 -->
<audio ref="audioPlayer" preload="none" loop></audio>
<div class="sidebar flexflex">
<div class="pointer">
<div class="item" :class="{'active': pointerState === 'introduce'}" :data-index="'01'" @click="changePointer('introduce')"></div>
<div class="item" :class="{'active': pointerState === 'works'}" :data-index="'02'" @click="changePointer('works')"></div>
<div class="item" :class="{'active': pointerState === 'custom'}" :data-index="'03'" @click="changePointer('custom')"></div>
<div class="item" :class="{'active': pointerState === 'student'}" :data-index="'04'" @click="changePointer('student')"></div>
</div>
<div class="arrow">
<!-- 向上按钮:不是介绍页时显示 -->
<img v-if="pointerState !== 'introduce'" class="item top orange" src="./static/img/arrow-orange.svg" @click="scrollToPrevious" />
<img v-else class="item top" src="./static/img/arrow-white.svg" />
<!-- 向下按钮:不是学生页时显示 -->
<img v-if="pointerState !== 'student'" class="item bottom orange" src="./static/img/arrow-orange.svg" @click="scrollToNext" />
<img v-else class="item bottom white" src="./static/img/arrow-white.svg" />
</div>
</div>
<div class="introduce" ref="introduceRef">
<div class="sidebar flexflex">
<div class="pointer">
<div class="item" v-for="(item,index) in bannerList" :class="{'active': pointerIndex === index}" :data-index="`0${ index + 1 }`" @click="changePointer(index)"></div>
</div>
<div class="arrow">
<img v-if="pointerIndex != 0" class="item top orange" src="./static/img/arrow-orange.svg" @click="scrollToPrevious" />
<img v-else class="item top" src="./static/img/arrow-white.svg" />
<img v-if="pointerIndex != bannerList.length - 1" class="item bottom orange" src="./static/img/arrow-orange.svg" @click="scrollToNext" />
<img v-else class="item bottom white" src="./static/img/arrow-white.svg" />
</div>
</div>
<div class="head flexacenter">
<div class="logo mar1200">
<img class="icon" src="./static/img/logo.png" />
@@ -53,24 +49,22 @@
</div>
<div class="award flexflex">
<img class="title" src="./static/img/award-winning-works.png" />
<img class="name" src="./static/img/gushi.png" />
<div class="explain">
<div>中国AIGC产业联盟AIGCxChina</div>
<div>温州市社科联</div>
<div>温州市新闻媒体中心</div>
<div>第一届AI音乐春晚 正选节目</div>
</div>
<img class="name" :src="bannerList[pointerIndex]?.title_pic" />
<div class="explain">{{ bannerList[pointerIndex]?.desc }}</div>
</div>
</div>
<div class="album">
<img class="bj bj1" src="./static/img/album-bj1.svg" />
<img class="bj bj2" src="./static/img/album-bj2.svg" />
<img class="img" src="./static/img/album-img.svg" />
<img class="bj bj3" src="./static/img/album-bj3.svg" />
<img class="bj bj4" src="./static/img/album-bj4.png" />
<img class="bj bj5" src="./static/img/album-bj5.svg" />
<img v-if="!audioHeadState" class="play" @click="manageAudio('./static/mp3/1.MP3','head')" src="./static/img/play-white-icon.svg" />
<img v-else class="play" @click="closeAll()" src="./static/img/pause-white-icon.svg" />
<div class="album-box" ref="albumBoxRef">
<div class="item" v-for="(item, index) in bannerList" :key="index">
<img class="img" :src="item.img" />
<img class="bj bj3" src="./static/img/album-bj3.svg" />
<img class="bj bj4" src="./static/img/album-bj4.png" />
<img class="bj bj5" src="./static/img/album-bj5.svg" />
<img v-if="!audioHeadState" class="play" @click="openPreview(item.playurl)" src="./static/img/play-white-icon.svg" />
</div>
</div>
</div>
</div>
<div class="trait flexflex mar1200">
@@ -95,14 +89,18 @@
<img class="line line-6" src="./static/img/works-line-6.svg" />
</div>
<div class="mv-box mar1200">
<div class="item flexflex" v-for="(item, index) in 6" :key="index">
<div class="item flexflex" v-for="(item, index) in awardMVList" :key="index">
<img class="serial-icon" src="./static/img/serial-icon.png" />
<div class="serial">{{ index + 1}}</div>
<div class="title">深港双城故事</div>
<div class="text">{{ text }}</div>
<div class="time">2024.12</div>
<div class="media" @click="openPreview(index)">
<img class="img" src="./static/img/mv-1.svg" />
<div class="serial">{{ (index + 1 + '').padStart(2, '0') }}</div>
<div class="title">{{ item.title }}</div>
<div class="text-box">
<div class="text">{{ item.desc }}</div>
<div class="time">{{ item.date }}</div>
</div>
<div class="media" @click="openPreview(item.playurl, item.img)">
<img class="img" :src="item.img" />
<img class="play" src="./static/img/play-white-icon.svg" />
</div>
</div>
@@ -123,7 +121,6 @@
<div class="time">2024.3</div>
<div class="progress-bar flexacenter">
<div class="bar white" :style="{ width: item.progress + '%' }"></div>
<div class="circle"></div>
<div class="bar black flex1"></div>
</div>
<div class="operate flexcenter">
@@ -150,7 +147,6 @@
<div class="lyric">走过的路汇成星河,脚下的路更辽阔</div>
<div class="progress-bar flexacenter">
<div class="bar white" :style="{ width: item.progress + '%' }"></div>
<div class="circle"></div>
<div class="bar black flex1"></div>
</div>
<div class="operate flexcenter">
@@ -186,7 +182,6 @@
<div class="progress-bar flexacenter">
<div class="bar white" :style="{ width: progress + '%' }"></div>
<div class="circle"></div>
<div class="bar black flex1"></div>
</div>
@@ -217,6 +212,46 @@
<img class="close" @click="closePreview()" src="./static/img/close.svg" />
<div class="artplayer-app"></div>
</div>
<div class="bottom-play">
<div class="bottom-box mar1200 flexacenter">
<div class="left flexacenter">
<img class="img" src="./static/img/custom-img.png" />
<div class="name">你好,我是林林林</div>
</div>
<div class="middle flex1 flexcenter">
<div class="operate flexcenter">
<img class="speed left" src="./static/img/speed-white-left.png" @click="fastForward('slow', url, 'works')" />
<img v-if="false" class="play" @click="closeAll()" src="./static/img/pause-white-icon.svg" />
<img v-else class="play" @click="manageAudio(url, 'works')" src="./static/img/play-white-icon.svg" />
<img class="speed right" src="./static/img/speed-white-right.png" @click="fastForward('fast', url, 'works')" />
</div>
<div class="progress-bar flexacenter">
<div class="bar white" :style="{ width: progress + '%' }"></div>
<div class="bar black flex1"></div>
</div>
</div>
<div class="right">
<div class="item">
<svg v-if="volume == 0" class="svg" xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 16 16"><path fill="#FCFCFC" d="M1 6.334a1 1 0 0 1 1-1h1.385a.667.667 0 0 0 .505-.231l2.938-3.41A.667.667 0 0 1 8 2.13v11.85c0 .604-.74.896-1.154.454l-2.958-3.165a.667.667 0 0 0-.487-.211H2a1 1 0 0 1-1-1zm3.9-.36a2 2 0 0 1-1.515.694H2.333v3.055h1.068a2 2 0 0 1 1.461.635l1.805 1.93V3.924zM9.764 6.04 11.724 8l-1.96 1.96a.333.333 0 0 0 0 .471l.472.471c.13.13.341.13.471 0l1.96-1.96 1.96 1.96c.13.13.34.13.47 0l.472-.471a.333.333 0 0 0 0-.471L13.61 8l1.96-1.96a.333.333 0 0 0 0-.47l-.471-.472a.333.333 0 0 0-.472 0l-1.96 1.96-1.959-1.96a.333.333 0 0 0-.471 0l-.472.471a.333.333 0 0 0 0 .471"></path></svg>
<svg v-else class="svg" xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 16 16">
<path fill="#fff" d="M1.334 6.334a1 1 0 0 1 1-1h1.385a.667.667 0 0 0 .505-.231l2.938-3.41a.667.667 0 0 1 1.172.436v11.85c0 .604-.74.896-1.154.454l-2.958-3.165a.667.667 0 0 0-.487-.211H2.334a1 1 0 0 1-1-1zm3.9-.36a2 2 0 0 1-1.515.694H2.667v3.055h1.068a2 2 0 0 1 1.461.635L7 12.288V3.924zM10.344 6.127a.364.364 0 0 1 .013-.483l.472-.472a.314.314 0 0 1 .462.009c1.374 1.601 1.374 4.038 0 5.64a.314.314 0 0 1-.462.008l-.472-.471a.364.364 0 0 1-.013-.484 3.028 3.028 0 0 0 0-3.747"></path>
<path fill="#fff" d="M12.479 12.479a.348.348 0 0 1-.007-.478c2.013-2.248 2.013-5.753 0-8.001a.348.348 0 0 1 .007-.478l.471-.471c.13-.13.342-.13.466.005 2.525 2.764 2.525 7.126 0 9.89a.322.322 0 0 1-.466.004z"></path>
</svg>
<div class="sound-control flexflex">
<div class="value">{{ volume }}</div>
<div class="progress flexflex" @click="handleVolumeClick">
<div class="bar" :style="{ height: volume + '%' }" @mousedown="startDrag"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./static/js/index.js"></script>

View File

@@ -30,62 +30,9 @@
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;
}
.content .sidebar .arrow .item.orange {
cursor: pointer;
}
.content .sidebar .arrow .item.top.orange {
transform: rotate(180deg);
}
.content .sidebar .arrow .item:not(:last-of-type) {
margin-bottom: 34px;
}
.content .sidebar .arrow .item.bottom.white {
transform: rotate(180deg);
}
.content .introduce {
width: 100%;
position: relative;
}
.content .introduce::after {
content: "";
@@ -97,6 +44,60 @@
background: linear-gradient(180deg, #1e135e 0%, #5241b0 100%);
z-index: -1;
}
.content .introduce .sidebar {
position: absolute;
top: 175px;
right: 100px;
z-index: 10;
flex-direction: column;
align-items: center;
}
.content .introduce .sidebar .pointer {
margin-bottom: 192px;
}
.content .introduce .sidebar .pointer .item {
width: 4px;
height: 50px;
margin-bottom: 2px;
background-color: #ffffff;
cursor: pointer;
position: relative;
}
.content .introduce .sidebar .pointer .item.active {
background-color: #f3974b;
}
.content .introduce .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 .introduce .sidebar .arrow {
width: 12px;
display: flex;
flex-direction: column;
}
.content .introduce .sidebar .arrow .item {
width: 12px;
height: 7px;
}
.content .introduce .sidebar .arrow .item.orange {
cursor: pointer;
}
.content .introduce .sidebar .arrow .item.top.orange {
transform: rotate(180deg);
}
.content .introduce .sidebar .arrow .item:not(:last-of-type) {
margin-bottom: 34px;
}
.content .introduce .sidebar .arrow .item.bottom.white {
transform: rotate(180deg);
}
.content .introduce .head {
height: 116px;
border-bottom: 1px solid rgba(255, 255, 255, 0.101961);
@@ -149,14 +150,15 @@
font-size: 14px;
color: #ffffff;
line-height: 24px;
white-space: break-spaces;
}
.content .introduce .box .album {
width: 800px;
height: 448px;
margin-top: 60px;
margin-right: 50px;
position: relative;
z-index: 1;
margin-top: 60px;
margin-right: 50px;
}
.content .introduce .box .album .bj {
position: absolute;
@@ -174,17 +176,28 @@
height: 720px;
z-index: -1;
}
.content .introduce .box .album .bj.bj3 {
.content .introduce .box .album .album-box {
width: 800px;
height: 448px;
overflow: hidden;
}
.content .introduce .box .album .album-box .item {
width: 800px;
height: 448px;
position: relative;
z-index: 1;
}
.content .introduce .box .album .album-box .item .bj.bj3 {
width: 100%;
height: 100%;
z-index: 1;
}
.content .introduce .box .album .bj.bj4 {
.content .introduce .box .album .album-box .item .bj.bj4 {
width: 68px;
height: 68px;
z-index: 2;
}
.content .introduce .box .album .bj.bj5 {
.content .introduce .box .album .album-box .item .bj.bj5 {
width: 236px;
height: 340px;
z-index: 3;
@@ -192,11 +205,11 @@
left: 318px;
transform: translate(0);
}
.content .introduce .box .album .img {
.content .introduce .box .album .album-box .item .img {
width: 100%;
height: 100%;
}
.content .introduce .box .album .play {
.content .introduce .box .album .album-box .item .play {
width: 26px;
height: 26px;
position: absolute;
@@ -349,8 +362,11 @@
margin-right: 40px;
margin-bottom: 18px;
}
.content .works .mv-box .item .text-box {
margin-bottom: 16px;
height: 126px;
}
.content .works .mv-box .item .text {
height: 96px;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
@@ -368,7 +384,6 @@
font-size: 14px;
color: #555555;
padding: 0 40px;
margin-bottom: 18px;
}
.content .works .mv-box .item .media {
position: relative;
@@ -651,7 +666,7 @@
transform: translateX(-50%);
height: 384px;
z-index: -1;
width: 99vw;
width: 98vw;
overflow: hidden;
}
.content .custom .bottom .bj {
@@ -771,7 +786,7 @@
display: block;
}
.content .student .student-box .progress-bar .bar.black {
background-color: #000000;
background-color: #ffffff;
border-radius: 0 10px 10px 0;
}
.content .student .student-box .operate .cut {
@@ -849,7 +864,7 @@
width: 100%;
height: 100%;
background-color: #4c4c4c;
z-index: 1000;
z-index: 1001;
}
.content .preview .close {
position: absolute;
@@ -863,3 +878,157 @@
width: 800px;
height: 600px;
}
.content .bottom-play {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 76px;
background-color: #353535;
z-index: 1000;
}
.content .bottom-play .bottom-box {
height: 100%;
justify-content: space-between;
}
.content .bottom-play .bottom-box .left .img {
width: 56px;
height: 56px;
margin-right: 12px;
}
.content .bottom-play .bottom-box .left .name {
color: #fff;
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
max-width: 240px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.content .bottom-play .bottom-box .middle {
flex-direction: column;
}
.content .bottom-play .bottom-box .middle .operate {
margin-bottom: 10px;
}
.content .bottom-play .bottom-box .middle .operate .cut {
width: 14px;
height: 12px;
cursor: pointer;
}
.content .bottom-play .bottom-box .middle .operate .speed {
width: 16px;
height: 12px;
margin: 0 40px;
cursor: pointer;
}
.content .bottom-play .bottom-box .middle .operate .play {
width: 24px;
height: 24px;
cursor: pointer;
}
.content .bottom-play .bottom-box .middle .progress-bar {
height: 10px;
width: 500px;
margin: 0 auto;
}
.content .bottom-play .bottom-box .middle .progress-bar .bar {
height: 4px;
background-color: #ffffff;
border-radius: 10px;
position: relative;
cursor: pointer;
}
.content .bottom-play .bottom-box .middle .progress-bar .bar.white {
width: 0;
border-radius: 10px 0 0 10px;
background-color: #5241b0;
}
.content .bottom-play .bottom-box .middle .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 .bottom-play .bottom-box .middle .progress-bar .bar.black {
background-color: #f2f2f2;
border-radius: 0 10px 10px 0;
}
.content .bottom-play .bottom-box .right .item {
position: relative;
}
.content .bottom-play .bottom-box .right .item .svg {
display: block;
cursor: pointer;
}
.content .bottom-play .bottom-box .right .item:hover .sound-control {
display: flex;
}
.content .bottom-play .bottom-box .right .item .sound-control {
display: none;
justify-content: center;
left: 50%;
transform: translateX(-50%);
height: 151px;
padding-bottom: 2px;
position: absolute;
top: -158px;
width: 42px;
align-items: center;
background: #1f1f1f;
border-radius: 8px;
flex-direction: column;
justify-content: space-between;
padding: 12px;
cursor: auto;
}
.content .bottom-play .bottom-box .right .item .sound-control::after {
content: "";
width: 100%;
height: 7px;
position: absolute;
bottom: -7px;
}
.content .bottom-play .bottom-box .right .item .sound-control .value {
color: #fff;
font-size: 14px;
user-select: none;
}
.content .bottom-play .bottom-box .right .item .sound-control .progress {
width: 4px;
height: 100px;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.2);
flex-direction: column;
justify-content: flex-end;
cursor: pointer;
}
.content .bottom-play .bottom-box .right .item .sound-control .progress .bar {
width: 100%;
height: 50px;
background-color: #fff;
border-radius: 4px;
position: relative;
}
.content .bottom-play .bottom-box .right .item .sound-control .progress .bar::before {
content: "";
width: 10px;
height: 10px;
background-color: #f3974b;
border-radius: 50%;
position: absolute;
top: 0;
transform: translate(-50%, -50%);
left: 50%;
z-index: 1;
display: block;
}

View File

@@ -34,70 +34,9 @@
margin: 0 auto;
}
.sidebar {
position: fixed;
top: 175px;
right: 100px;
z-index: 10;
flex-direction: column;
align-items: center;
.pointer {
margin-bottom: 192px;
.item {
width: 4px;
height: 50px;
margin-bottom: 2px;
background-color: rgba(255, 255, 255, 1);
cursor: pointer;
position: relative;
&.active {
background-color: rgba(243, 151, 75, 1);
&::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;
}
}
}
}
.arrow {
width: 12px;
display: flex;
flex-direction: column;
.item {
width: 12px;
height: 7px;
&.orange {
cursor: pointer;
}
&.top.orange {
transform: rotate(180deg);
}
&:not(:last-of-type) {
margin-bottom: 34px;
}
&.bottom.white {
transform: rotate(180deg);
}
}
}
}
.introduce {
width: 100%;
position: relative;
&::after {
content: "";
position: absolute;
@@ -108,6 +47,69 @@
background: linear-gradient(180deg, rgba(30, 19, 94, 1) 0%, rgba(82, 65, 176, 1) 100%);
z-index: -1;
}
.sidebar {
position: absolute;
top: 175px;
right: 100px;
z-index: 10;
flex-direction: column;
align-items: center;
.pointer {
margin-bottom: 192px;
.item {
width: 4px;
height: 50px;
margin-bottom: 2px;
background-color: rgba(255, 255, 255, 1);
cursor: pointer;
position: relative;
&.active {
background-color: rgba(243, 151, 75, 1);
&::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;
}
}
}
}
.arrow {
width: 12px;
display: flex;
flex-direction: column;
.item {
width: 12px;
height: 7px;
&.orange {
cursor: pointer;
}
&.top.orange {
transform: rotate(180deg);
}
&:not(:last-of-type) {
margin-bottom: 34px;
}
&.bottom.white {
transform: rotate(180deg);
}
}
}
}
.head {
height: 116px;
border-bottom: 1px solid rgba(255, 255, 255, 0.101961);
@@ -164,6 +166,7 @@
font-size: 14px;
color: #ffffff;
line-height: 24px;
white-space: break-spaces;
}
}
}
@@ -171,11 +174,10 @@
.album {
width: 800px;
height: 448px;
margin-top: 60px;
margin-right: 50px;
position: relative;
z-index: 1;
margin-top: 60px;
margin-right: 50px;
.bj {
position: absolute;
top: 50%;
@@ -192,42 +194,58 @@
height: 720px;
z-index: -1;
}
}
&.bj3 {
width: 100%;
height: 100%;
.album-box {
width: 800px;
height: 448px;
overflow: hidden;
.item {
width: 800px;
height: 448px;
position: relative;
z-index: 1;
.bj {
&.bj3 {
width: 100%;
height: 100%;
z-index: 1;
}
&.bj4 {
width: 68px;
height: 68px;
z-index: 2;
}
&.bj5 {
width: 236px;
height: 340px;
z-index: 3;
top: 0;
left: 318px;
transform: translate(0);
}
}
.img {
width: 100%;
height: 100%;
}
.play {
width: 26px;
height: 26px;
position: absolute;
left: 30px;
bottom: 30px;
z-index: 1;
cursor: pointer;
}
}
&.bj4 {
width: 68px;
height: 68px;
z-index: 2;
}
&.bj5 {
width: 236px;
height: 340px;
z-index: 3;
top: 0;
left: 318px;
transform: translate(0);
}
}
.img {
width: 100%;
height: 100%;
}
.play {
width: 26px;
height: 26px;
position: absolute;
left: 30px;
bottom: 30px;
z-index: 1;
cursor: pointer;
}
}
}
@@ -397,8 +415,13 @@
margin-bottom: 18px;
}
.text-box {
margin-bottom: 16px;
height: 126px;
}
.text {
height: 96px;
// height: 96px;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
@@ -417,7 +440,7 @@
font-size: 14px;
color: #555555;
padding: 0 40px;
margin-bottom: 18px;
// margin-bottom: 18px;
}
.media {
@@ -750,7 +773,7 @@
transform: translateX(-50%);
height: 384px;
z-index: -1;
width: 99vw;
width: 98vw;
overflow: hidden;
.bj {
@@ -887,7 +910,7 @@
}
&.black {
background-color: rgba(0, 0, 0, 1);
background-color: rgb(255, 255, 255);
border-radius: 0 10px 10px 0;
}
}
@@ -984,7 +1007,8 @@
width: 100%;
height: 100%;
background-color: #4c4c4c;
z-index: 1000;
z-index: 1001;
.close {
position: absolute;
top: 20px;
@@ -998,4 +1022,182 @@
height: 600px;
}
}
.bottom-play {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 76px;
background-color: #353535;
z-index: 1000;
.bottom-box {
height: 100%;
justify-content: space-between;
.left {
.img {
width: 56px;
height: 56px;
margin-right: 12px;
}
.name {
color: #fff;
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
max-width: 240px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.middle {
flex-direction: column;
.operate {
margin-bottom: 10px;
.cut {
width: 14px;
height: 12px;
cursor: pointer;
}
.speed {
width: 16px;
height: 12px;
margin: 0 40px;
cursor: pointer;
}
.play {
width: 24px;
height: 24px;
cursor: pointer;
}
}
.progress-bar {
height: 10px;
width: 500px;
margin: 0 auto;
.bar {
height: 4px;
background-color: rgba(255, 255, 255, 1);
border-radius: 10px;
position: relative;
cursor: pointer;
&.white {
width: 0;
border-radius: 10px 0 0 10px;
background-color: #5241b0;
&::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;
}
}
&.black {
background-color: #f2f2f2;
border-radius: 0 10px 10px 0;
}
}
}
}
.right {
.item {
position: relative;
.svg {
display: block;
cursor: pointer;
}
&:hover {
.sound-control {
display: flex;
}
}
.sound-control {
display: none;
justify-content: center;
left: 50%;
transform: translateX(-50%);
height: 151px;
padding-bottom: 2px;
position: absolute;
top: -158px;
width: 42px;
align-items: center;
background: #1f1f1f;
border-radius: 8px;
flex-direction: column;
justify-content: space-between;
padding: 12px;
cursor: auto;
&::after {
content: "";
width: 100%;
height: 7px;
position: absolute;
bottom: -7px;
}
.value {
color: #fff;
font-size: 14px;
user-select: none;
}
.progress {
width: 4px;
height: 100px;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.2);
flex-direction: column;
justify-content: flex-end;
cursor: pointer;
.bar {
width: 100%;
height: 50px;
background-color: #fff;
border-radius: 4px;
position: relative;
&::before {
content: "";
width: 10px;
height: 10px;
background-color: #f3974b;
border-radius: 50%;
position: absolute;
top: 0;
transform: translate(-50%, -50%);
left: 50%;
z-index: 1;
display: block;
}
}
}
}
}
}
}
}
}

BIN
static/img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

2
static/js/axios.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -56,61 +56,28 @@ const search = createApp({
const customRef = ref(null);
const studentRef = ref(null);
let pointerState = ref("introduce");
let pointerIndex = ref(0);
const elements = ref([
{
isVisible: false,
ref: introduceRef,
title: "介绍",
state: "introduce",
},
{
isVisible: false,
ref: worksRef,
title: "作品",
state: "works",
},
{
isVisible: false,
ref: customRef,
title: "定制",
state: "custom",
},
{
isVisible: false,
ref: studentRef,
title: "学生",
state: "student",
},
]);
const albumBoxRef = ref(null);
// 点击侧边栏
const changePointer = (state) => {
const element = document.querySelector(`.${state}`);
if (!element) return;
element.scrollIntoView({
behavior: "smooth",
});
const changePointer = (index) => {
albumBoxRef.value.scrollTo({ top: 448 * index, behavior: "smooth" });
pointerIndex.value = index;
};
// 向上滚动到上一页
const scrollToPrevious = () => {
const currentIndex = ["introduce", "works", "custom", "student"].indexOf(pointerState.value);
if (currentIndex > 0) {
const prevState = ["introduce", "works", "custom", "student"][currentIndex - 1];
changePointer(prevState);
}
let index = pointerIndex.value - 1;
if (index < 0) return;
changePointer(index);
};
// 向下滚动到下一页
const scrollToNext = () => {
const currentIndex = ["introduce", "works", "custom", "student"].indexOf(pointerState.value);
if (currentIndex < 3) {
const nextState = ["introduce", "works", "custom", "student"][currentIndex + 1];
changePointer(nextState);
}
let index = pointerIndex.value + 1;
if (index > bannerList.value.length) return;
changePointer(index);
};
// 获取当前在可视窗口中的元素ref
@@ -119,55 +86,46 @@ const search = createApp({
return visibleElement ? visibleElement.ref : null;
});
const observer = ref(null);
let bannerList = ref([]);
let awardMVList = ref([]);
// 初始化观察器
const initObserver = () => {
observer.value = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
// 找到对应的元素状态并更新
const targetEl = elements.value.find((el) => el.ref === entry.target);
if (targetEl) {
targetEl.isVisible = entry.isIntersecting;
if (entry.isIntersecting) pointerState.value = targetEl.state;
}
});
},
{
root: null, // 视口作为根元素
rootMargin: "0px",
threshold: 0.3, // 可见比例达到10%时触发
}
);
// 开启监听 - 对所有预定义的元素执行observe
elements.value.forEach((element) => {
if (element.ref && element.ref) observer.value.observe(element.ref);
const init = () => {
ajaxget("https://pujianchaoyin.com/index/api").then((res) => {
if (res.code != 200) return;
const data = res.data;
console.log("data", data);
bannerList.value = data.banner;
awardMVList.value = data.awardMVList;
nextTick(() => {});
});
};
console.log(observer.value);
let bannerSwiperTimer = null;
const bannerSwiper = () => {
bannerSwiperTimer = setTimeout(() => {
}, 1000);
};
onMounted(() => {
setTimeout(() => initObserver(), 1000);
init();
// 添加进度更新事件监听器
if (audioPlayer.value) {
console.log("volume", audioPlayer.value.volume);
audioPlayer.value.addEventListener("timeupdate", getProgress);
audioPlayer.value.addEventListener("loadedmetadata", getProgress);
}
studentList.value.forEach((item, index) => {
item["order"] = index;
item["order"] = index;
// item["random"] = generateRandomString();
});
});
});
// 组件卸载时清理事件监听器
onUnmounted(() => {
observer.value?.disconnect();
audioPlayer?.value?.removeEventListener("timeupdate", getProgress);
audioPlayer?.value?.removeEventListener("loadedmetadata", getProgress);
});
@@ -195,14 +153,15 @@ const search = createApp({
let art = null;
// 开启播放 MV
const openPreview = () => {
const openPreview = (url, poster = "") => {
previewState.value = true;
nextTick(() => {
art = new Artplayer({
container: ".artplayer-app",
url: "https://o.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-JoqdX_qqsgFptxhcq_cQnrlc6Z1CwMUBq_D-81qNDQyOQ~~",
url,
autoplay: true,
poster: "https://o.x-php.com/thumb/UHkZOgUVDvP9z7rPV2rT1kE22Zf1QEiLggt9OPnf5hC7a-QU5l8VTqiP5awMLv2DMEUiOUl03dK1PW0Yzf8ZPfpa7ZTTgV-PZGNjZQ~~",
poster,
fullscreen: true,
});
art.play();
});
@@ -360,10 +319,7 @@ const search = createApp({
const cutStudent = (order) => {
// 找到目标元素和第一个元素
const [target, first] = [
studentList.value.find(item => item.order == order),
studentList.value.find(item => item.order == 0)
];
const [target, first] = [studentList.value.find((item) => item.order == order), studentList.value.find((item) => item.order == 0)];
// 交换order值
if (target && first && target !== first) {
[target.order, first.order] = [first.order, target.order];
@@ -383,6 +339,139 @@ const search = createApp({
return result;
};
return { cutStudent, studentList, studentIndex, scrollToPrevious, scrollToNext, changePointer, pointerState, visibleRef, studentRef, customRef, worksRef, introduceRef, customList, closeAll, manageAudio, progress, pauseAudio, playAudio, audioList, closePreview, openPreview, previewState, audioHeadState, pauseHead, playHead, audioPlayer, text, trait, fastForward };
// 响应式数据:音量值、是否静音
const volume = ref(84);
const isMuted = ref(false);
// 切换静音状态的方法
const toggleMute = () => {
isMuted.value = !isMuted.value;
if (audioPlayer.value) {
audioPlayer.value.muted = isMuted.value;
}
};
// 计算并设置音量百分比
const setVolumePercentage = (percentage) => {
// 确保百分比在0-100之间
const volumePercent = Math.max(0, Math.min(100, percentage));
volume.value = Math.abs(~~volumePercent);
// 设置音频元素的音量范围是0-1
if (audioPlayer.value) audioPlayer.value.volume = volumePercent / 100;
};
// 处理音量进度条点击
const handleVolumeClick = (event) => {
// 获取进度条元素
const progressBar = event.currentTarget;
const rect = progressBar.getBoundingClientRect();
// 计算点击位置相对于进度条的比例
// 因为是垂直进度条所以用clientY
const clickPosition = rect.bottom - event.clientY;
const percentage = (clickPosition / rect.height) * 100;
setVolumePercentage(percentage);
};
// 处理音量进度条拖拽
let isDragging = false;
const startDrag = (event) => {
isDragging = true;
handleVolumeDrag(event);
// 添加事件监听器
document.addEventListener("mousemove", handleVolumeDrag);
document.addEventListener("mouseup", stopDrag);
};
const handleVolumeDrag = (event) => {
if (!isDragging) return;
// 获取音量进度条元素
const progressBar = document.querySelector(".sound-control .progress");
if (!progressBar) return;
const rect = progressBar.getBoundingClientRect();
// 计算拖拽位置相对于进度条的比例
let dragPosition = rect.bottom - event.clientY;
// 限制在进度条范围内
dragPosition = Math.max(0, Math.min(dragPosition, rect.height));
const percentage = (dragPosition / rect.height) * 100;
setVolumePercentage(percentage);
};
const stopDrag = () => {
isDragging = false;
document.removeEventListener("mousemove", handleVolumeDrag);
document.removeEventListener("mouseup", stopDrag);
};
onMounted(() => {
// 绑定音量控制相关事件
const progressBar = document.querySelector(".sound-control .progress");
if (progressBar) {
progressBar.addEventListener("click", handleVolumeClick);
// 找到进度条内的滑块元素bar并绑定拖拽事件
const volumeBar = progressBar.querySelector(".bar");
if (volumeBar) volumeBar.addEventListener("mousedown", startDrag);
}
});
onUnmounted(() => {
// 清理音量控制相关事件
const progressBar = document.querySelector(".sound-control .progress");
if (progressBar) {
progressBar.removeEventListener("click", handleVolumeClick);
const volumeBar = progressBar.querySelector(".bar");
if (volumeBar) volumeBar.removeEventListener("mousedown", startDrag);
}
// 确保移除所有拖拽相关事件
document.removeEventListener("mousemove", handleVolumeDrag);
document.removeEventListener("mouseup", stopDrag);
});
const ajaxget = (url, data) => {
if (!data) data = {};
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "3338bf6a2e53dda872da3664a2560b25";
url = url.indexOf("https://") == -1 ? projectBaseURL2 + url : url;
// url += objectToQueryString(data);
return new Promise((resolve, reject) => {
axios
.get(url, {
emulateJSON: true,
withCredentials: true,
})
.then((res) => {
var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data;
if (data.code == 401) {
openShowWindow();
reject();
}
if (data.code == 201) creationAlertBox("error", data.message || data.msg);
resolve(data);
})
.catch((error) => {
// console.log("resolve", resolve)
if (error.response?.status == 401) openShowWindow();
resolve("");
});
});
};
return { awardMVList, bannerList, albumBoxRef, volume, handleVolumeClick, handleVolumeDrag, startDrag, stopDrag, toggleMute, isMuted, volume, cutStudent, studentList, studentIndex, scrollToPrevious, scrollToNext, changePointer, pointerIndex, visibleRef, studentRef, customRef, worksRef, introduceRef, customList, closeAll, manageAudio, progress, pauseAudio, playAudio, audioList, closePreview, openPreview, previewState, audioHeadState, pauseHead, playHead, audioPlayer, text, trait, fastForward };
},
}).mount("#appIndex");