// client/src/api/washes.js import client from './client'; export const list = (params) => client.get('/washes', { params }); export const get = (id) => client.get(`/washes/${id}`); export const create = (data) => client.post('/washes', data); export const remove = (id) => client.delete(`/washes/${id}`); export const batchDelete = (ids, challenge) => client.post('/washes/batch-delete', { ids, challenge }); export const types = () => client.get('/washes/types'); // 对比照 export const listPhotos = (id) => client.get(`/washes/${id}/photos`); export const uploadPhoto = (id, formData) => client.post(`/washes/${id}/photos`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }); export const deletePhoto = (id, photoId) => client.delete(`/washes/${id}/photos/${photoId}`); export const comparePhotos = (id, type1 = 'before', type2 = 'after') => client.get(`/washes/${id}/photos/compare`, { params: { type1, type2 } });