From 4c1f82d7063db41d91b91c1ad58f2cfc081e0521 Mon Sep 17 00:00:00 2001 From: moux1024 <403053463@qq.com> Date: Tue, 14 Oct 2025 18:43:10 +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, 3 insertions(+), 2 deletions(-) diff --git a/utils/tools.ts b/utils/tools.ts index a3cd219..a51de10 100644 --- a/utils/tools.ts +++ b/utils/tools.ts @@ -80,12 +80,13 @@ export function createScreenAdapter(): void { export const downloadVideo = async (url: string) => { try { - const response = await fetch(decodeURIComponent(url)); + const modifyUrl = decodeURIComponent(url); + const response = await fetch(modifyUrl); const blob = await response.blob(); const blobUrl = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = blobUrl; - a.download = url.split('/').pop() || 'video.mp4'; + a.download = modifyUrl.split('/').pop() || 'video.mp4'; document.body.appendChild(a); a.click(); document.body.removeChild(a);