import request from '@/utils/request'

// 查询学习分类列表
export function listEl_category(query,type) {
  return request({
    url: '/exam/el_category/treeList/0/'+type,
    method: 'get',
    params: query
  })
}

// 查询学习分类列表
export function listEl_categoryList(query) {
  return request({
    url: '/exam/el_category/list',
    method: 'get',
    params: query
  })
}

// 查询学习分类详细
export function getEl_category(id) {
  return request({
    url: '/exam/el_category/' + id,
    method: 'get'
  })
}

// 新增学习分类
export function addEl_category(data) {
  return request({
    url: '/exam/el_category',
    method: 'post',
    data: data
  })
}

// 修改学习分类
export function updateEl_category(data) {
  return request({
    url: '/exam/el_category',
    method: 'put',
    data: data
  })
}

// 删除学习分类
export function delEl_category(id) {
  return request({
    url: '/exam/el_category/' + id,
    method: 'delete'
  })
}
