fix: url param

This commit is contained in:
shinya
2025-06-22 21:33:17 +08:00
parent 54dad7a7b7
commit e188a41d23
2 changed files with 19 additions and 21 deletions

View File

@@ -205,11 +205,9 @@ function DetailPageClient() {
<a
href={`/play?source=${searchParams.get(
'source'
)}&id=${searchParams.get('id')}${
fallbackTitle
? `&title=${encodeURIComponent(fallbackTitle)}`
: ''
}`}
)}&id=${searchParams.get(
'id'
)}&title=${encodeURIComponent(detail.videoInfo.title)}`}
className='flex items-center justify-center gap-2 px-6 py-2 bg-green-500 hover:bg-green-600 rounded-lg transition-colors text-white'
>
<div className='w-0 h-0 border-t-[6px] border-t-transparent border-l-[10px] border-l-white border-b-[6px] border-b-transparent'></div>
@@ -219,11 +217,11 @@ function DetailPageClient() {
<a
href={`/play?source=${searchParams.get(
'source'
)}&id=${searchParams.get('id')}&index=1&position=0${
fallbackTitle
? `&title=${encodeURIComponent(fallbackTitle)}`
: ''
}`}
)}&id=${searchParams.get(
'id'
)}&index=1&position=0&title=${encodeURIComponent(
detail.videoInfo.title
)}`}
className='flex items-center justify-center gap-2 px-6 py-2 bg-gray-500 hover:bg-gray-600 rounded-lg transition-colors text-white'
>
<div className='w-0 h-0 border-t-[6px] border-t-transparent border-l-[10px] border-l-white border-b-[6px] border-b-transparent'></div>
@@ -236,11 +234,11 @@ function DetailPageClient() {
<a
href={`/play?source=${searchParams.get(
'source'
)}&id=${searchParams.get('id')}&index=1&position=0${
fallbackTitle
? `&title=${encodeURIComponent(fallbackTitle)}`
: ''
}`}
)}&id=${searchParams.get(
'id'
)}&index=1&position=0&title=${encodeURIComponent(
detail.videoInfo.title
)}`}
className='flex items-center justify-center gap-2 px-6 py-2 bg-green-500 hover:bg-green-600 rounded-lg transition-colors text-white'
>
<div className='w-0 h-0 border-t-[6px] border-t-transparent border-l-[10px] border-l-white border-b-[6px] border-b-transparent'></div>
@@ -313,11 +311,9 @@ function DetailPageClient() {
key={idx}
href={`/play?source=${searchParams.get(
'source'
)}&id=${searchParams.get('id')}&index=${idx + 1}${
fallbackTitle
? `&title=${encodeURIComponent(fallbackTitle)}`
: ''
}`}
)}&id=${searchParams.get('id')}&index=${
idx + 1
}&title=${encodeURIComponent(detail.videoInfo.title)}`}
className='bg-gray-500/80 hover:bg-green-500 text-white px-5 py-2 rounded-lg transition-colors text-base font-medium w-24 text-center'
>
{idx + 1}

View File

@@ -717,7 +717,9 @@ function PlayPageClient() {
// 处理返回按钮点击
const handleBack = () => {
window.location.href = `/detail?source=${currentSource}&id=${currentId}`;
window.location.href = `/detail?source=${currentSource}&id=${currentId}&title=${encodeURIComponent(
videoTitle
)}`;
};
// 处理上一集