From 595e50f98fedcd12caafaf36d088a206a7dd388f Mon Sep 17 00:00:00 2001 From: xream Date: Mon, 15 Jan 2024 07:34:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BD=93=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=94=9F=E6=88=90=E5=A4=B1=E8=B4=A5=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BF=9B=E8=A1=8C=E7=BC=96=E8=BE=91=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/files/index.ts | 2 +- src/router/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 611fa665b..e5a8293df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sub-store-front-end", - "version": "2.14.54", + "version": "2.14.55", "private": true, "scripts": { "dev": "vite --host", diff --git a/src/api/files/index.ts b/src/api/files/index.ts index 24208b50d..2a798f2f3 100644 --- a/src/api/files/index.ts +++ b/src/api/files/index.ts @@ -15,7 +15,7 @@ export function useFilesApi() { method: 'get', }); }, - getOneFile: (name: string): AxiosPromise => { + getFile: (name: string): AxiosPromise => { return request({ url: `/api/file/${encodeURIComponent(name)}`, method: 'get', diff --git a/src/router/index.ts b/src/router/index.ts index 997ba7a44..f6c284d22 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -196,7 +196,7 @@ router.beforeResolve(async to => { } else if (to.params.editType === 'collections') { await useSubsApi().getOne('collection', name); }else if (to.params.editType === 'files') { - await useFilesApi().getOneFile(name); + await useFilesApi().getWholeFile(name); } } catch { router.replace('/404');