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
52bfc4da
authored
May 17, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 进一步完善商品列表,修复TODO
parent
50b18131
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
src/api/mall/product/spu.ts
+10
-12
src/views/mall/product/spu/index.vue
+0
-0
No files found.
src/api/mall/product/spu.ts
View file @
52bfc4da
...
...
@@ -33,7 +33,7 @@ export interface SpuType {
picUrl
?:
string
// 商品封面图
sliderPicUrls
?:
string
[]
// 商品轮播图
introduction
?:
string
// 商品简介
deliveryTemplateId
?:
number
// 运费模版
deliveryTemplateId
?:
number
|
null
// 运费模版
specType
?:
boolean
// 商品规格
subCommissionType
?:
boolean
// 分销类型
skus
:
SkuType
[]
// sku数组
...
...
@@ -48,39 +48,37 @@ export interface SpuType {
recommendGood
?:
boolean
// 是否优品
}
// TODO @puhui999:中英文之间有空格
// 获得spu列表 TODO @puhui999:这个是 getSpuPage 哈
// 获得 Spu 列表
export
const
getSpuPage
=
(
params
:
PageParam
)
=>
{
return
request
.
get
({
url
:
'/product/spu/page'
,
params
})
}
// 获得
spu列表
tabsCount
// 获得
Spu 列表
tabsCount
export
const
getTabsCount
=
()
=>
{
return
request
.
get
({
url
:
'/product/spu/
tabsC
ount'
})
return
request
.
get
({
url
:
'/product/spu/
get-c
ount'
})
}
// 创建商品
s
pu
// 创建商品
S
pu
export
const
createSpu
=
(
data
:
SpuType
)
=>
{
return
request
.
post
({
url
:
'/product/spu/create'
,
data
})
}
// 更新商品
s
pu
// 更新商品
S
pu
export
const
updateSpu
=
(
data
:
SpuType
)
=>
{
return
request
.
put
({
url
:
'/product/spu/update'
,
data
})
}
// 更新商品
s
pu status
// 更新商品
S
pu status
export
const
updateStatus
=
(
data
:
{
id
:
number
;
status
:
number
})
=>
{
return
request
.
put
({
url
:
'/product/spu/update
S
tatus'
,
data
})
return
request
.
put
({
url
:
'/product/spu/update
-s
tatus'
,
data
})
}
// 获得商品
s
pu
// 获得商品
S
pu
export
const
getSpu
=
(
id
:
number
)
=>
{
return
request
.
get
({
url
:
`/product/spu/get-detail?id=
${
id
}
`
})
}
// 删除商品Spu
// 删除商品
Spu
export
const
deleteSpu
=
(
id
:
number
)
=>
{
return
request
.
delete
({
url
:
`/product/spu/delete?id=
${
id
}
`
})
}
src/views/mall/product/spu/index.vue
View file @
52bfc4da
This diff is collapsed.
Click to expand it.
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