import request from '@/utils/request'

// 查询学习资源列表
export function listEl_course(query) {
  return request({
    url: '/exam/el_course/list',
    method: 'get',
    params: query
  })
}
// 新查询学习资源列表
export function courseList(query) {
  return request({
    url: '/exam/el_course/course/list',
    method: 'get',
    params: query
  })
}


// 查询学习记录列表
export function getLearnList(data) {
  return request({
    url: '/exam/el_course/learn/list',
    method: 'post',
    data: data
  })
}

// 查询学习资源/记录-详情
export function getLearnInfo(id) {
  return request({
    url: '/exam/el_course/learn/'+id,
    method: 'get',
  })
}

// 完成学习
export function learnFinish(data) {
  return request({
    url: '/exam/el_course/learn/finish',
    method: 'post',
    data: data
  })
}

//开始学习
export function learnStart(data) {
  return request({
    url: '/exam/el_course/learn/start',
    method: 'post',
    data: data
  })
}

//获取个人信息
export function profile(query) {
  return request({
    url: '/system/user/profile',
    method: 'get',
    params: query
  })
}

//开始课后考核
export function assessStart(id) {
  return request({
    url: '/exam/el_chapter/assessStart/'+id,
    method: 'post',
  })
}

//课后考科提交
export function assessFinish(id) {
  return request({
    url: '/exam/el_chapter/assessFinish/'+id,
    method: 'post',
  })
}

//课后考核-考核回顾
export function assessDetail(id) {
  return request({
    url: '/exam/el_chapter/assessDetail/'+id,
    method: 'post',
  })
}

