import request from '@/utils/request'

// 查询课堂分类列表
export function listUserCourseCategory(query) {
  return request({
    url: '/course/userCourseCategory/list',
    method: 'get',
    params: query
  })
}

// 查询课堂分类详细
export function getUserCourseCategory(cateId) {
  return request({
    url: '/course/userCourseCategory/' + cateId,
    method: 'get'
  })
}

// 新增课堂分类
export function addUserCourseCategory(data) {
  return request({
    url: '/course/userCourseCategory',
    method: 'post',
    data: data
  })
}

// 修改课堂分类
export function updateUserCourseCategory(data) {
  return request({
    url: '/course/userCourseCategory',
    method: 'put',
    data: data
  })
}

// 删除课堂分类
export function delUserCourseCategory(cateId) {
  return request({
    url: '/course/userCourseCategory/' + cateId,
    method: 'delete'
  })
}

// 导出课堂分类
export function exportUserCourseCategory(query) {
  return request({
    url: '/course/userCourseCategory/export',
    method: 'get',
    params: query
  })
}

// 查询分类父列表
export function getAllCourseCategoryList() {
  return request({
    url: '/course/userCourseCategory/getAllList',
    method: 'get'
  })
}


export function getCatePidList() {
  return request({
    url: '/course/userCourseCategory/getCatePidList',
    method: 'get'
  })
}

export function getCateListByPid(pid) {
  return request({
    url: '/course/userCourseCategory/getCateListByPid/' + pid,
    method: 'get'
  })
}