/**
 * @Description: 适应性培训
 * @Author: 空白格
 * @Date: 2022-08-12 17:34:57
 * @LastEditors: 空白格
 * @LastEditTime: 2022-08-25 16:13:25
 * @FilePath: \veterans_client_web\src\api\AdaptiveTraining\index.js
 * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 */
import request from "@/utils/request";
/**
 * 获取适应性培训列表
 * @param {*} params
 * @returns
 */
export function getTrainingList(params) {
  return request({
    url: "/app/adaptTrainOnline/queryList",
    method: "get",
    headers: {
      noLoginFlag: true,
    },
    params,
  });
}

/**
 * 获取线上课程详情
 * @param {*} params
 * @returns
 */
export function getOnlineCourseDetails(params) {
  return request({
    url: "/app/adaptTrainOnline/" + params.id,
    method: "get",
    params,
  });
}

/**
 * 获取课程评论
 * @param {*} params
 * @returns
 */
export function getCommentList(params) {
  return request({
    url: "/app/coursecomment",
    method: "get",
    headers: {
      noLoginFlag: true,
    },
    params,
  });
}

/**
 * 添加课程评论
 * @param {*} data
 * @returns
 */
export function addComment(data) {
  return request({
    url: "/app/coursecomment",
    method: "post",
    data,
  });
}

/**
 * 视频播放时长记录
 * @param {*} data
 * @returns
 */
export function submitClassesDuration(data) {
  return request({
    url: "/app/record/duration/",
    method: "post",
    data,
  });
}

/**
 * 获取适应性培训统计
 * @param {*} params
 * @returns
 */
export function getTrainingTotal(params) {
  return request({
    url: "/app/adaptTrainOnline/queryStatus",
    method: "get",
    params,
  });
}

/**
 * 获取适应性培训线下列表
 * @param {*} params
 * @returns
 */
export function getOfflineTrainingList(params) {
  return request({
    url: "/app/adaptTrainOffline/queryList",
    method: "get",
    headers: {
      noLoginFlag: true,
    },
    params,
  });
}

/**
 * 获取适应性培训线下课程详情
 * @param {*} params
 * @returns
 */
export function getOfflineTrainingDetails(params) {
  return request({
    url: "/app/adaptTrainOffline/getDetail/" + params.id,
    method: "get",
    headers: {
      noLoginFlag: true,
    },
    params,
  });
}
