Commit 52bfc4da by puhui999

fix: 进一步完善商品列表,修复TODO

parent 50b18131
...@@ -33,7 +33,7 @@ export interface SpuType { ...@@ -33,7 +33,7 @@ export interface SpuType {
picUrl?: string // 商品封面图 picUrl?: string // 商品封面图
sliderPicUrls?: string[] // 商品轮播图 sliderPicUrls?: string[] // 商品轮播图
introduction?: string // 商品简介 introduction?: string // 商品简介
deliveryTemplateId?: number // 运费模版 deliveryTemplateId?: number | null // 运费模版
specType?: boolean // 商品规格 specType?: boolean // 商品规格
subCommissionType?: boolean // 分销类型 subCommissionType?: boolean // 分销类型
skus: SkuType[] // sku数组 skus: SkuType[] // sku数组
...@@ -48,39 +48,37 @@ export interface SpuType { ...@@ -48,39 +48,37 @@ export interface SpuType {
recommendGood?: boolean // 是否优品 recommendGood?: boolean // 是否优品
} }
// TODO @puhui999:中英文之间有空格 // 获得 Spu 列表
// 获得spu列表 TODO @puhui999:这个是 getSpuPage 哈
export const getSpuPage = (params: PageParam) => { export const getSpuPage = (params: PageParam) => {
return request.get({ url: '/product/spu/page', params }) return request.get({ url: '/product/spu/page', params })
} }
// 获得spu列表tabsCount // 获得 Spu 列表 tabsCount
export const getTabsCount = () => { export const getTabsCount = () => {
return request.get({ url: '/product/spu/tabsCount' }) return request.get({ url: '/product/spu/get-count' })
} }
// 创建商品spu // 创建商品 Spu
export const createSpu = (data: SpuType) => { export const createSpu = (data: SpuType) => {
return request.post({ url: '/product/spu/create', data }) return request.post({ url: '/product/spu/create', data })
} }
// 更新商品spu // 更新商品 Spu
export const updateSpu = (data: SpuType) => { export const updateSpu = (data: SpuType) => {
return request.put({ url: '/product/spu/update', data }) return request.put({ url: '/product/spu/update', data })
} }
// 更新商品spu status // 更新商品 Spu status
export const updateStatus = (data: { id: number; status: number }) => { export const updateStatus = (data: { id: number; status: number }) => {
return request.put({ url: '/product/spu/updateStatus', data }) return request.put({ url: '/product/spu/update-status', data })
} }
// 获得商品 spu // 获得商品 Spu
export const getSpu = (id: number) => { export const getSpu = (id: number) => {
return request.get({ url: `/product/spu/get-detail?id=${id}` }) return request.get({ url: `/product/spu/get-detail?id=${id}` })
} }
// 删除商品Spu // 删除商品 Spu
export const deleteSpu = (id: number) => { export const deleteSpu = (id: number) => {
return request.delete({ url: `/product/spu/delete?id=${id}` }) return request.delete({ url: `/product/spu/delete?id=${id}` })
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment