59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
import request from '@/utils/request'
|
|
|
|
// 商品主表列表
|
|
export function apiGoodsLists(params: any) {
|
|
return request.get({ url: '/goods/lists', params })
|
|
}
|
|
|
|
// 添加商品主表
|
|
export function apiGoodsAdd(params: any) {
|
|
return request.post({ url: '/goods/add', params })
|
|
}
|
|
|
|
// 编辑商品主表
|
|
export function apiGoodsEdit(params: any) {
|
|
return request.post({ url: '/goods/edit', params })
|
|
}
|
|
|
|
// 删除商品主表
|
|
export function apiGoodsDelete(params: any) {
|
|
return request.post({ url: '/goods/delete', params })
|
|
}
|
|
|
|
// 商品主表详情
|
|
export function apiGoodsDetail(params: any) {
|
|
return request.get({ url: '/goods/detail', params })
|
|
}
|
|
|
|
// 商品分类列表
|
|
export function checkCategory() {
|
|
return request.post({ url: '/goodsCategory/checkCategory' })
|
|
}
|
|
|
|
// 商品上传图片
|
|
export function uploadImage(params: any) {
|
|
return request.post({ url: '/upload/image', params })
|
|
}
|
|
|
|
export type SkuNameValue = {
|
|
value: string
|
|
image: string
|
|
}
|
|
export type SkuNameList = {
|
|
name: string
|
|
value: SkuNameValue[]
|
|
has_image?: number
|
|
}
|
|
export type SkuItemList = {
|
|
id?: number | string
|
|
ids?: number[]
|
|
image?: string
|
|
sku_value_arr: string[]
|
|
price: string
|
|
line_price: string
|
|
market_price: string
|
|
stock: number
|
|
weight: number
|
|
volume: string
|
|
code: string
|
|
} |