From 8dcec4bbf11bb54e340e393515ea29be46817242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=9D=B0?= Date: Thu, 24 Apr 2025 10:43:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor(utils):=20=E4=BC=98=E5=8C=96=20wge?= =?UTF-8?q?t=E5=91=BD=E4=BB=A4=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -移除未使用的变量和注释 - 调整 base URL 生成方式 - 优化 wget 命令的生成逻辑 --- src/utils/clipboard.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/utils/clipboard.ts b/src/utils/clipboard.ts index 426cc06..7c03a94 100644 --- a/src/utils/clipboard.ts +++ b/src/utils/clipboard.ts @@ -80,20 +80,9 @@ export const copyRetrieveCode = async (code: string): Promise => { }) } -const baseUrl = window.location.origin + '/#/'; - -/*export const copyWgetCommand = (retrieveCode: string, fileName: any) => { - //wget https://share.lanol.cn/share/select?code=17634 - const command = `wget ${baseUrl}share/select?code=${retrieveCode} -O "${fileName}"`; - navigator.clipboard.writeText(command).then(() => { - alertStore.showAlert('wget命令已复制到剪贴板', 'success'); - }).catch(() => { - alertStore.showAlert('复制wget命令失败', 'error'); - }); -};*/ +const baseUrl = window.location.origin + '/'; export const copyWgetCommand = (retrieveCode: string, fileName: string) => { - // const command = `wget ${window.location.origin}/download/${retrieveCode} -O ${filename}`; const command = `wget ${baseUrl}share/select?code=${retrieveCode} -O "${fileName}"`; if (navigator.clipboard && navigator.clipboard.writeText) { From ffdd9df15075649afb15f46feb83e71640db2827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=9D=B0?= Date: Thu, 24 Apr 2025 13:21:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor(SendFileView):=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84=E5=92=8C=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7-=20=E4=BD=BF=E7=94=A8=E6=8D=A2=E8=A1=8C=E7=AC=A6?= =?UTF-8?q?=E5=92=8C=E7=BC=A9=E8=BF=9B=E8=A7=84=E8=8C=83=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=20-=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E6=A0=BC=E5=92=8C=E6=8D=A2=E8=A1=8C=20-=20?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91=20-=20=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/SendFileView.vue | 539 ++++++++++++++++++++++++------------- 1 file changed, 359 insertions(+), 180 deletions(-) diff --git a/src/views/SendFileView.vue b/src/views/SendFileView.vue index 7800375..cacc5c8 100644 --- a/src/views/SendFileView.vue +++ b/src/views/SendFileView.vue @@ -1,32 +1,49 @@