18 lines
613 B
TypeScript
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}`)
|
|
}
|