From 6a6f52c4c4f1e96bfc41aa6e9a73f63c047f9c53 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 15 Mar 2025 22:51:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E5=AF=BC=E5=87=BA=E4=BC=9A=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/product/spu.ts | 2 +- src/views/mall/product/spu/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index d44c0f64..b906fa6e 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -101,7 +101,7 @@ export const deleteSpu = (id: number) => { } // 导出商品 Spu Excel -export const exportSpu = async (params) => { +export const exportSpu = async (params: any) => { return await request.download({ url: '/product/spu/export', params }) } diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue index 0451ef3a..e12403ce 100644 --- a/src/views/mall/product/spu/index.vue +++ b/src/views/mall/product/spu/index.vue @@ -411,7 +411,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await ProductSpuApi.exportSpu(queryParams) + const data = await ProductSpuApi.exportSpu(queryParams.value) download.excel(data, '商品列表.xls') } catch { } finally { @@ -434,7 +434,7 @@ onActivated(() => { onMounted(async () => { // 解析路由的 categoryId if (route.query.categoryId) { - queryParams.value.categoryId = Number(route.query.categoryId) + queryParams.value.categoryId = route.query.categoryId } // 获得商品信息 await getTabsCount()