|
|
@@ -0,0 +1,26 @@ |
|
|
|
import request from '@/request'; |
|
|
|
import { MaterialVO, MaterialPageQueryVO, MaterialCreateReqBatchVO, PageData } from '@/models'; |
|
|
|
|
|
|
|
const BASE_URL = '/admin-api/material'; |
|
|
|
|
|
|
|
export default { |
|
|
|
//更新素材 |
|
|
|
updateMaterial: (material: MaterialVO) => { |
|
|
|
return request.post(`${BASE_URL}/update`, material); |
|
|
|
}, |
|
|
|
|
|
|
|
//获得素材分页数据 |
|
|
|
getMaterialPageData: (query: MaterialPageQueryVO) => { |
|
|
|
return request.post<PageData<MaterialVO>>(`${BASE_URL}/page`, query); |
|
|
|
}, |
|
|
|
|
|
|
|
//批量删除素材 |
|
|
|
deleteMaterialBatch: (ids: string[]) => { |
|
|
|
return request.post(`${BASE_URL}/deleteBatch`, ids); |
|
|
|
}, |
|
|
|
|
|
|
|
//创建素材 |
|
|
|
createMaterialBatch: (material: MaterialCreateReqBatchVO) => { |
|
|
|
return request.post(`${BASE_URL}/createBatch`, material); |
|
|
|
}, |
|
|
|
} |