import request from '@/utils/request'

// 查询课堂视频列表
export function listUserCourseVideo(query) {
  return request({
    url: '/course/userCourseVideo/list',
    method: 'get',
    params: query
  })
}

// 查询课堂视频详细
export function getUserCourseVideo(videoId) {
  return request({
    url: '/course/userCourseVideo/' + videoId,
    method: 'get'
  })
}
export function updatePacketMoney(data) {
  return request({
    url: '/course/userCourseVideo/updateMoney',
    method: 'put',
    data: data
  })
}
export function getSort(courseId) {
  return request({
    url: '/course/userCourseVideo/getSort/' + courseId,
    method: 'get'
  })
}

// 新增课堂视频
export function addUserCourseVideo(data) {
  return request({
    url: '/course/userCourseVideo',
    method: 'post',
    data: data
  })
}

// 修改课堂视频
export function updateUserCourseVideo(data) {
  return request({
    url: '/course/userCourseVideo',
    method: 'put',
    data: data
  })
}

// 删除课堂视频
export function delUserCourseVideo(videoId) {
  return request({
    url: '/course/userCourseVideo/' + videoId,
    method: 'delete'
  })
}

// 导出课堂视频
export function exportUserCourseVideo(query) {
  return request({
    url: '/course/userCourseVideo/export',
    method: 'get',
    params: query
  })
}


export function getVideoListByCourseId(query) {
  return request({
    url: '/course/userCourseVideo/getVideoListByCourseId',
    method: 'get',
    params: query
  })
}


