Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6a6f52c4
authored
Mar 15, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修复】商城:商品列表,导出会报错的问题
parent
5cfe0661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/api/mall/product/spu.ts
+1
-1
src/views/mall/product/spu/index.vue
+2
-2
No files found.
src/api/mall/product/spu.ts
View file @
6a6f52c4
...
@@ -101,7 +101,7 @@ export const deleteSpu = (id: number) => {
...
@@ -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
})
}
}
...
...
src/views/mall/product/spu/index.vue
View file @
6a6f52c4
...
@@ -411,7 +411,7 @@ const handleExport = async () => {
...
@@ -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(() => {
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment