import request from '@/utils/request'
import requestFile from '@/utils/requestfile'
import qs from 'qs'

/**
 * page
 * size
 * 查询在线培训课程分类
 * @returns Promise
 */
export function getOnlineTrainingCategory(params) {
  return request({
    url: 'api/onlineTrainingCategory',
    method: 'GET',
    params
  })
}

/**
 * name
 * description
 * id
 * pid
 * 新增在线培训课程分类
 */
export function postOnlineTrainingCategory(data) {
  return request({
    url: 'api/onlineTrainingCategory',
    method: 'post',
    data
  })
}

/**
 * description
 * name
 * id
 * pid
 * 修改在线培训课程分类
 */
export function putOnlineTrainingCategory(data) {
  return request({
    url: 'api/onlineTrainingCategory',
    method: 'PUT',
    data
  })
}

/**
 * ids []
 * 删除在线培训课程分类
 */
export function deleteOnlineTrainingCategory(data) {
  return request({
    url: 'api/onlineTrainingCategory',
    method: 'DELETE',
    data
  })
}
