Skip to content

Commit 6a6f52c

Browse files
committed
【功能修复】商城:商品列表,导出会报错的问题
1 parent 5cfe066 commit 6a6f52c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/api/mall/product/spu.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const deleteSpu = (id: number) => {
101101
}
102102

103103
// 导出商品 Spu Excel
104-
export const exportSpu = async (params) => {
104+
export const exportSpu = async (params: any) => {
105105
return await request.download({ url: '/product/spu/export', params })
106106
}
107107

src/views/mall/product/spu/index.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ const handleExport = async () => {
411411
await message.exportConfirm()
412412
// 发起导出
413413
exportLoading.value = true
414-
const data = await ProductSpuApi.exportSpu(queryParams)
414+
const data = await ProductSpuApi.exportSpu(queryParams.value)
415415
download.excel(data, '商品列表.xls')
416416
} catch {
417417
} finally {
@@ -434,7 +434,7 @@ onActivated(() => {
434434
onMounted(async () => {
435435
// 解析路由的 categoryId
436436
if (route.query.categoryId) {
437-
queryParams.value.categoryId = Number(route.query.categoryId)
437+
queryParams.value.categoryId = route.query.categoryId
438438
}
439439
// 获得商品信息
440440
await getTabsCount()

0 commit comments

Comments
 (0)