// 素材库
import request from '@/utils/request'


// 素材列表
export const materialList = (data: any) => {
    return request({
        url: `api/materials`,
        method: 'get',
        params: data

    })
}

export const addMaterial = (data: any) => {
    return request({
        url: `api/material`,
        method: 'post',
        data
    })
}

export const updataMaterial = (data: any, id) => {
    return request({
        url: `api/material/${id}`,
        method: 'put',
        data
    })
}

export const deletaMaterial = (id) => {
    return request({
        url: `api/material/${id}`,
        method: 'delete',
    })
}
