From 71da826b697414dd1b9f7b5bad07c6f6785691dd Mon Sep 17 00:00:00 2001 From: mtvpls Date: Wed, 7 Jan 2026 13:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E5=88=B6=E9=93=BE=E6=8E=A5=E8=A1=A5?= =?UTF-8?q?=E5=85=85baseurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/play/page.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 0edf162..e76d870 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -6316,8 +6316,14 @@ function PlayPageClient() { ? `${window.location.origin}/api/proxy-m3u8?url=${encodeURIComponent(urlToUse)}&source=${encodeURIComponent(currentSource)}${tokenParam}` : urlToUse; + // 如果链接是相对路径,补充完整的 base URL + let finalUrl = proxyUrl; + if (proxyUrl && !proxyUrl.startsWith('http://') && !proxyUrl.startsWith('https://')) { + finalUrl = `${window.location.origin}${proxyUrl.startsWith('/') ? '' : '/'}${proxyUrl}`; + } + // 复制到剪贴板 - navigator.clipboard.writeText(proxyUrl).then(() => { + navigator.clipboard.writeText(finalUrl).then(() => { setToast({ message: '视频链接已复制到剪贴板', type: 'success',