【功能修复】商城:商品列表,导出会报错的问题

This commit is contained in:
YunaiV 2025-03-15 22:51:34 +08:00
parent 5cfe0661d2
commit 6a6f52c4c4
2 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ export const deleteSpu = (id: number) => {
} }
// 导出商品 Spu Excel // 导出商品 Spu Excel
export const exportSpu = async (params) => { export const exportSpu = async (params: any) => {
return await request.download({ url: '/product/spu/export', params }) return await request.download({ url: '/product/spu/export', params })
} }

View File

@ -411,7 +411,7 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await ProductSpuApi.exportSpu(queryParams) const data = await ProductSpuApi.exportSpu(queryParams.value)
download.excel(data, '商品列表.xls') download.excel(data, '商品列表.xls')
} catch { } catch {
} finally { } finally {
@ -434,7 +434,7 @@ onActivated(() => {
onMounted(async () => { onMounted(async () => {
// categoryId // categoryId
if (route.query.categoryId) { if (route.query.categoryId) {
queryParams.value.categoryId = Number(route.query.categoryId) queryParams.value.categoryId = route.query.categoryId
} }
// //
await getTabsCount() await getTabsCount()