feat: 视频保存
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Https } from "@/tool/https"
|
||||
import type { SketchDetailResponse } from "./types"
|
||||
import type { ListingImageCategory, SketchDetailResponse } from "./types"
|
||||
|
||||
// 编辑时根据ID获取信息
|
||||
export const fetchListingDetailById = (id) => {
|
||||
@@ -21,23 +21,26 @@ export const fetchSketchDetail = (data: SketchIDs): Promise<SketchDetailResponse
|
||||
}
|
||||
|
||||
interface ImageObj {
|
||||
id: number // 图片id,有值会更新,没有会自动新增
|
||||
category: "cover" | "main_product" | "product" | "sketch" | "apparel" // 图片类型
|
||||
id?: number // 图片id,有值会更新,没有会自动新增
|
||||
category: ListingImageCategory // 图片类型
|
||||
imageUrl?: string | null
|
||||
isSelected?: number
|
||||
sortOrder?: number
|
||||
}
|
||||
interface DetailData {
|
||||
id: number | string // 商品Id
|
||||
title: string // 商品名
|
||||
description: string // 商品描述
|
||||
price: number // 价格
|
||||
price: number | string // 价格
|
||||
stock?: number // 库存
|
||||
viewCount?: number // 浏览量
|
||||
status: 0 | 1 | 2 // 0草稿 1发布 2删除
|
||||
images: ImageObj[]
|
||||
designFor: "male" | "female"
|
||||
productCategory: "outwear" | "trousers" | "blouse" | "dress" | "skirt" | "accessories"
|
||||
productCategory: string[] | null
|
||||
}
|
||||
// 保存/更新表单
|
||||
export const fetchUpdateListing = (data: DetailData) => {
|
||||
export const fetchUpdateListing = (data: DetailData[]) => {
|
||||
return Https.axiosPost("/seller/listing/batch", data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user