增加天翼网盘在线播放
This commit is contained in:
@@ -168,7 +168,9 @@ export default function PansouSearch({
|
||||
? '/api/netdisk/mobile/instant-play'
|
||||
: cloudType === 'baidu'
|
||||
? '/api/netdisk/baidu/instant-play'
|
||||
: '/api/netdisk/quark/instant-play';
|
||||
: cloudType === 'tianyi'
|
||||
? '/api/netdisk/tianyi/instant-play'
|
||||
: '/api/netdisk/quark/instant-play';
|
||||
const response = await fetch(instantPlayApi, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -187,7 +189,7 @@ export default function PansouSearch({
|
||||
}
|
||||
|
||||
router.push(
|
||||
`/play?source=${encodeURIComponent(data.source || (cloudType === 'mobile' ? 'netdisk-mobile' : cloudType === 'baidu' ? 'netdisk-baidu' : 'netdisk-quark'))}&id=${encodeURIComponent(data.id)}&title=${encodeURIComponent(data.title || keyword)}`
|
||||
`/play?source=${encodeURIComponent(data.source || (cloudType === 'mobile' ? 'netdisk-mobile' : cloudType === 'baidu' ? 'netdisk-baidu' : cloudType === 'tianyi' ? 'netdisk-tianyi' : 'netdisk-quark'))}&id=${encodeURIComponent(data.id)}&title=${encodeURIComponent(data.title || keyword)}`
|
||||
);
|
||||
} catch (err: any) {
|
||||
setToast({
|
||||
@@ -345,7 +347,7 @@ export default function PansouSearch({
|
||||
|
||||
{/* 操作按钮 */}
|
||||
<div className='flex items-center gap-1 flex-shrink-0'>
|
||||
{(cloudType === 'quark' || cloudType === 'mobile' || cloudType === 'baidu') && (
|
||||
{(cloudType === 'quark' || cloudType === 'mobile' || cloudType === 'baidu' || cloudType === 'tianyi') && (
|
||||
<>
|
||||
<button
|
||||
onClick={() => handleNetdiskInstantPlay(cloudType, link)}
|
||||
|
||||
@@ -49,9 +49,9 @@ export default function Toast({ message, type = 'info', duration = 3000, onClose
|
||||
isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 -translate-y-4'
|
||||
}`}
|
||||
>
|
||||
<div className={`${colors[type]} text-white px-6 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-[300px]`}>
|
||||
<div className={`${colors[type]} text-white px-6 py-3 rounded-lg shadow-lg flex items-start gap-3 min-w-[300px] max-w-[min(90vw,560px)]`}>
|
||||
<div className="flex-shrink-0">{icons[type]}</div>
|
||||
<div className="flex-1 text-sm font-medium">{message}</div>
|
||||
<div className="flex-1 text-sm font-medium whitespace-pre-wrap break-words">{message}</div>
|
||||
<button
|
||||
onClick={handleClose}
|
||||
className="flex-shrink-0 hover:bg-white/20 rounded p-1 transition-colors"
|
||||
|
||||
Reference in New Issue
Block a user