mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-06-17 18:03:13 +08:00
fix: url param
This commit is contained in:
@@ -205,11 +205,9 @@ function DetailPageClient() {
|
|||||||
<a
|
<a
|
||||||
href={`/play?source=${searchParams.get(
|
href={`/play?source=${searchParams.get(
|
||||||
'source'
|
'source'
|
||||||
)}&id=${searchParams.get('id')}${
|
)}&id=${searchParams.get(
|
||||||
fallbackTitle
|
'id'
|
||||||
? `&title=${encodeURIComponent(fallbackTitle)}`
|
)}&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'
|
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>
|
<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
|
<a
|
||||||
href={`/play?source=${searchParams.get(
|
href={`/play?source=${searchParams.get(
|
||||||
'source'
|
'source'
|
||||||
)}&id=${searchParams.get('id')}&index=1&position=0${
|
)}&id=${searchParams.get(
|
||||||
fallbackTitle
|
'id'
|
||||||
? `&title=${encodeURIComponent(fallbackTitle)}`
|
)}&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'
|
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>
|
<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
|
<a
|
||||||
href={`/play?source=${searchParams.get(
|
href={`/play?source=${searchParams.get(
|
||||||
'source'
|
'source'
|
||||||
)}&id=${searchParams.get('id')}&index=1&position=0${
|
)}&id=${searchParams.get(
|
||||||
fallbackTitle
|
'id'
|
||||||
? `&title=${encodeURIComponent(fallbackTitle)}`
|
)}&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'
|
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>
|
<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}
|
key={idx}
|
||||||
href={`/play?source=${searchParams.get(
|
href={`/play?source=${searchParams.get(
|
||||||
'source'
|
'source'
|
||||||
)}&id=${searchParams.get('id')}&index=${idx + 1}${
|
)}&id=${searchParams.get('id')}&index=${
|
||||||
fallbackTitle
|
idx + 1
|
||||||
? `&title=${encodeURIComponent(fallbackTitle)}`
|
}&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'
|
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}集
|
第{idx + 1}集
|
||||||
|
|||||||
@@ -717,7 +717,9 @@ function PlayPageClient() {
|
|||||||
|
|
||||||
// 处理返回按钮点击
|
// 处理返回按钮点击
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
window.location.href = `/detail?source=${currentSource}&id=${currentId}`;
|
window.location.href = `/detail?source=${currentSource}&id=${currentId}&title=${encodeURIComponent(
|
||||||
|
videoTitle
|
||||||
|
)}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理上一集
|
// 处理上一集
|
||||||
|
|||||||
Reference in New Issue
Block a user