import request from '@/utils/request'

export function updateLearnTime(data) {
  return request({
    url: '/elearn/learn/updateLearnTime',
    method: 'put',
    data: data
  })
}

// 查询在线学习记录列表
export function listLearn(query) {
  return request({
    url: '/elearn/learn/list',
    method: 'get',
    params: query
  })
}

// 查询在线学习记录详细
export function getLearn(id) {
  return request({
    url: '/elearn/learn/' + id,
    method: 'get'
  })
}

// 新增在线学习记录
export function addLearn(data) {
  return request({
    url: '/elearn/learn',
    method: 'post',
    data: data
  })
}

// 修改在线学习记录
export function updateLearn(data) {
  return request({
    url: '/elearn/learn',
    method: 'put',
    data: data
  })
}

// 删除在线学习记录
export function delLearn(id) {
  return request({
    url: '/elearn/learn/' + id,
    method: 'delete'
  })
}

// 导出在线学习记录
export function exportLearn(query) {
  return request({
    url: '/elearn/learn/export',
    method: 'get',
    params: query
  })
}
