import request from '@/utils/request'

// 查询课程章节列表
export function listCourseChapter(query) {
  return request({
    url: '/hezhi/courseChapter/list',
    method: 'get',
    params: query
  })
}

// 查询课程章节详细
export function getCourseChapter(chapterId) {
  return request({
    url: '/hezhi/courseChapter/' + chapterId,
    method: 'get'
  })
}

// 新增课程章节
export function addCourseChapter(data) {
  return request({
    url: '/hezhi/courseChapter',
    method: 'post',
    data: data
  })
}

// 修改课程章节
export function updateCourseChapter(data) {
  return request({
    url: '/hezhi/courseChapter',
    method: 'put',
    data: data
  })
}

// 删除课程章节
export function delCourseChapter(chapterId) {
  return request({
    url: '/hezhi/courseChapter/' + chapterId,
    method: 'delete'
  })
}
