import request from "@/utils/request";

// 查询素材库列表
export function getLibraryList(params) {
  return request({
    url: "/business/library/list",
    method: "get",
    params,
  });
}
// 素材详情
export function getLibraryDetail(materialId) {
  return request({
    url: `/business/library/${materialId}`,
    method: "get",
  });
}
// 新增素材
export function libraryAdd(data) {
  return request({
    url: "/business/library",
    method: "post",
    data,
  });
}
// 编辑素材
export function libraryUpdate(data) {
  return request({
    url: "/business/library",
    method: "put",
    data,
  });
}
// 删除素材
export function libraryDelete(materialIds) {
  return request({
    url: `/business/library/${materialIds}`,
    method: "delete",
  });
}
