From 7beab504af506482701a78de5cce39fc68567c6a Mon Sep 17 00:00:00 2001 From: moux1024 <403053463@qq.com> Date: Tue, 14 Oct 2025 19:13:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=85=BC=E5=AE=B9encode?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E4=B8=8B=E8=BD=BDurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/tools.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/tools.ts b/utils/tools.ts index c9940d2..b75fac8 100644 --- a/utils/tools.ts +++ b/utils/tools.ts @@ -80,15 +80,14 @@ export function createScreenAdapter(): void { export const downloadVideo = async (url: string) => { try { - const modifyUrl = decodeURIComponent(url); - const response = await fetch(modifyUrl); + const response = await fetch(url); const blob = await response.blob(); const blobUrl = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = blobUrl; let filename = 'video.mp4'; try { - const parsed = new URL(modifyUrl); + const parsed = new URL(decodeURIComponent(url)); filename = parsed.pathname.split('/').pop() || 'video.mp4'; if (filename.includes('?')) filename = filename.split('?')[0]; if (filename.includes('#')) filename = filename.split('#')[0];