import request from '@/utils/request';

/**
 * 资源 - 曲目列表
 */
export const materialQueryPage = (params: any) => {
  return request.post('/edu-app/material/queryPage', {
    data: params
  });
};

/**
 * 资源 - 收藏/取消收藏
 */
export const favorite = (params: any) => {
  return request.post('/edu-app/material/favorite', {
    data: params
  });
};

/**
 * 资源 - 删除
 */
export const materialRemove = (params: any) => {
  return request.post('/edu-app/material/remove', {
    requestType: 'form',
    data: params
  });
};

/** 音乐教材-新增 */
export const api_lessonCoursewareSave = (params: any): Promise<any> => {
  return request.post('/edu-app/lessonCourseware/save', {
    data: params
  });
};

/** 音乐教材-修改 */
export const api_lessonCoursewareUpdate = (params: any): Promise<any> => {
  return request.post('/edu-app/lessonCourseware/update', {
    data: params
  });
};

/** 资源-新增 */
export const materialSave = (params: any[]): Promise<any> => {
  return request.post('/edu-app/material/save', {
    data: params
  });
};

/** 资源-修改 */
export const materialUpdate = (params: any): Promise<any> => {
  return request.post('/edu-app/material/update', {
    data: params
  });
};
/** 资源-批量修改 */
export const materialUpdateAll = (params: any): Promise<any> => {
  return request.post('/edu-app/material/updateAll', {
    data: params
  });
};

/** 资源-批量删除 */
export const materialRemoveAll = (params: any): Promise<any> => {
  return request.post('/edu-app/material/removeAll', {
    data: params
  });
};

/** 资源-批量删除-曲谱 */
export const materialRemoveMusic = (params: any): Promise<any> => {
  return request.post('/edu-app/material/removeMusic', {
    data: params
  });
};

/** 素材标签分页 */
export const api_materialTagPage = (params: any): Promise<any> => {
  return request.post('/edu-app/materialTag/page', {
    data: params
  });
};
