JewelryMall/admin/src/api/mold.ts
2026-02-14 19:29:15 +08:00

18 lines
613 B
TypeScript

import http from './request'
export function getMolds(params: { page?: number; pageSize?: number; keyword?: string }) {
return http.get('/admin/molds', { params })
}
export function createMold(data: { name: string; styleNo?: string; barcodeNo?: string; style?: string; images?: string[] }) {
return http.post('/admin/molds', data)
}
export function updateMold(id: number, data: { name: string; styleNo?: string; barcodeNo?: string; style?: string; images?: string[] }) {
return http.put(`/admin/molds/${id}`, data)
}
export function deleteMold(id: number) {
return http.delete(`/admin/molds/${id}`)
}