From 50343891f4193c9ed87f811ecfd3b4271a5f4ae2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=91=E4=B8=8A=E8=B4=B5=E7=8C=AA?= <290425385@qq.com>
Date: Sat, 14 Mar 2026 02:10:15 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=83=E5=8D=81=E4=BA=8C=E5=AE=B6=E6=88=BF?=
=?UTF-8?q?=E5=AE=A2-=E8=A7=82=E7=9C=8B=E5=B9=B3=E5=8F=B0v163=20=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=AF=BC=E8=88=AA=E6=8B=A6=E5=9C=B0=E5=9D=80=EF=BC=8C?=
=?UTF-8?q?=E6=96=B9=E4=BE=BF=E5=88=86=E4=BA=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/QishierPlayer.vue | 136 ++++++++++++++++--------------------
1 file changed, 62 insertions(+), 74 deletions(-)
diff --git a/src/views/QishierPlayer.vue b/src/views/QishierPlayer.vue
index 4add313..fe07352 100644
--- a/src/views/QishierPlayer.vue
+++ b/src/views/QishierPlayer.vue
@@ -6,18 +6,14 @@
-
-
- 当前播放|
- 发布时间:{{ formatDate(currentEpisode.releasedAt) }}
- 时长:{{ formatDuration(currentEpisode.timeLength) }}
+ 当前播放
+ 发布时间:{{ formatDate(currentEpisode.releasedAt) }}
+ 时长:{{ formatDuration(currentEpisode.timeLength) }}
{{ currentEpisode.title }}
-
-
@@ -103,22 +99,6 @@
@ended-next="handleEndedNext"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ errorMsg }}
@@ -138,9 +118,12 @@
:episodes="displayEpisodeList"
:current-episode-id="currentEpisode?.id || ''"
:years="years"
+ :months="months"
:selected-year="selectedYear"
+ :selected-month="selectedMonth"
@select="playEpisode"
@updateYear="handleYearChange"
+ @updateMonth="handleMonthChange"
/>
@@ -220,6 +203,24 @@ function openGitRepo() {
window.open('https://git.a-hxin.cn/ahxin/72QishierPlayer.git', '_blank')
}
+function getEpisodeIdFromUrl() {
+ const path = window.location.pathname
+ const match = path.match(/^\/episode\/([^/]+)$/)
+ if (match?.[1]) {
+ return decodeURIComponent(match[1])
+ }
+
+ const queryId = new URLSearchParams(window.location.search).get('episode')
+ return queryId || ''
+}
+
+function updateUrlByEpisodeId(id: string) {
+ const nextUrl = `/episode/${encodeURIComponent(id)}`
+ if (window.location.pathname !== nextUrl) {
+ window.history.replaceState({}, '', nextUrl)
+ }
+}
+
function handlePlayerError(message: string) {
errorMsg.value = message
}
@@ -228,6 +229,10 @@ function handleYearChange(year: string) {
selectedYear.value = year
}
+function handleMonthChange(month: string) {
+ selectedMonth.value = month
+}
+
function getEpisodeYear(item: EpisodeData) {
return String(new Date(item.releasedAt).getFullYear())
}
@@ -274,6 +279,19 @@ async function fetchAllEpisodes() {
rebuildMonthsByYear()
+ const urlEpisodeId = getEpisodeIdFromUrl()
+ const urlEpisode = allEpisodeList.value.find(item => item.id === urlEpisodeId)
+
+ if (urlEpisode) {
+ selectedYear.value = getEpisodeYear(urlEpisode)
+ rebuildMonthsByYear()
+ selectedMonth.value = getEpisodeMonth(urlEpisode)
+ currentEpisode.value = urlEpisode
+ saveCurrentEpisodeId(urlEpisode.id)
+ updateUrlByEpisodeId(urlEpisode.id)
+ return
+ }
+
const savedEpisodeId = getCurrentEpisodeId()
const savedEpisode = allEpisodeList.value.find(item => item.id === savedEpisodeId)
@@ -282,6 +300,7 @@ async function fetchAllEpisodes() {
rebuildMonthsByYear()
selectedMonth.value = getEpisodeMonth(savedEpisode)
currentEpisode.value = savedEpisode
+ updateUrlByEpisodeId(savedEpisode.id)
return
}
@@ -291,6 +310,8 @@ async function fetchAllEpisodes() {
rebuildMonthsByYear()
selectedMonth.value = getEpisodeMonth(firstEpisode)
currentEpisode.value = firstEpisode
+ saveCurrentEpisodeId(firstEpisode.id)
+ updateUrlByEpisodeId(firstEpisode.id)
}
} catch (error: any) {
console.error('fetchAllEpisodes error:', error)
@@ -315,6 +336,7 @@ async function playEpisode(item: EpisodeData) {
selectedMonth.value = getEpisodeMonth(item)
errorMsg.value = ''
saveCurrentEpisodeId(item.id)
+ updateUrlByEpisodeId(item.id)
}
async function playPrevEpisode() {
@@ -368,41 +390,32 @@ onMounted(() => {
.qishier-page {
min-height: 100vh;
background:
- radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 28%),
- radial-gradient(circle at top right, rgba(13, 110, 253, 0.1), transparent 24%),
- linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
+ radial-gradient(circle at top left, rgba(99, 102, 241, 0.10), transparent 28%),
+ radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 24%),
+ linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
}
.top-card,
.control-card,
.content-card {
- border-radius: 20px;
- background: rgba(255, 255, 255, 0.92);
- backdrop-filter: blur(8px);
+ border-radius: 18px;
+ background: rgba(255, 255, 255, 0.96);
+ backdrop-filter: blur(10px);
}
.page-main-info {
min-width: 0;
}
-.page-tag {
- display: inline-block;
- padding: 5px 10px;
- border-radius: 999px;
- font-size: 12px;
- font-weight: 600;
- color: #8a5a00;
- background: rgba(255, 193, 7, 0.18);
-}
-
.page-title {
font-weight: 800;
- color: #212529;
+ color: #1f2937;
letter-spacing: -0.02em;
+ line-height: 1.35;
}
.page-subtitle {
- color: #6c757d;
+ color: #6b7280;
font-size: 14px;
}
@@ -418,20 +431,14 @@ onMounted(() => {
width: 120px;
}
-.episode-info-card {
- padding: 16px 18px;
- border-radius: 18px;
- background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
- border: 1px solid rgba(0, 0, 0, 0.05);
-}
-
.episode-badges {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
-.info-badge {
+.info-badge,
+.meta-pill {
display: inline-flex;
align-items: center;
padding: 5px 10px;
@@ -441,42 +448,23 @@ onMounted(() => {
}
.info-badge.playing {
- background: rgba(255, 193, 7, 0.18);
- color: #9a6a00;
+ background: rgba(59, 130, 246, 0.12);
+ color: #2563eb;
}
-.info-badge.year {
- background: rgba(13, 110, 253, 0.1);
- color: #0d6efd;
-}
-
-.episode-title {
- color: #212529;
- font-weight: 800;
- line-height: 1.45;
+.meta-pill {
+ background: rgba(15, 23, 42, 0.06);
+ color: #475569;
}
.episode-meta {
- color: #6c757d;
+ color: #6b7280;
font-size: 14px;
}
-.episode-actions {
- flex-shrink: 0;
-}
-
@media (max-width: 991px) {
.header-actions {
width: 100%;
}
-
- .episode-info-card {
- padding: 14px;
- }
-
- .episode-actions {
- width: 100%;
- }
}
-近期最新的集数 这个新出的集数颜色那里 改成不是黄色 我想要好看点的颜色 还有 页面太空白了 别整那么空了,看着难受 clearfix