feat: sketchDetail接口
This commit is contained in:
24
src/views/SellerDashboard/MyListings/EditDetail/api.ts
Normal file
24
src/views/SellerDashboard/MyListings/EditDetail/api.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Https } from "@/tool/https"
|
||||
|
||||
interface SketchIDs {
|
||||
designItemIds: Array
|
||||
}
|
||||
export const fetchSketchDetail = (data: SketchIDs) => {
|
||||
let params = "?"
|
||||
data.forEach((id, index) => {
|
||||
if (index === data.length - 1) {
|
||||
params += `designItemIds=${id}`
|
||||
} else {
|
||||
params += `designItemIds=${id}&`
|
||||
}
|
||||
})
|
||||
return Https.axiosGet(`/api/seller/sketchDetail${params}`)
|
||||
}
|
||||
|
||||
export const uploadFile = (file) => {
|
||||
const formData = new FormData()
|
||||
formData.append("file", file)
|
||||
return Https.axiosPost("/seller/file/ upload", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data", Accept: "*/*" }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user