import request from '@/config/request';

export const APIOptimize = {
  getCampList, // 获取训练营列表
  getTrainingCampDetail, //获取训练营-详情-简介+内容
  getTrainingCampDetailComment, //获取训练营-详情-评论
  comment, //评论课程
  getBanner //轮播图
};
export default APIOptimize;

// 获取训练营列表
function getCampList(params) {
  return request({
    url: `/api/HealthyCMS/GetTrainingCamp`,
    method: 'post',
    data: params
  });
}
// 获取训练营-详情-简介+内容
function getTrainingCampDetail(data) {
  return request({
    url: `/api/HealthyCMS/GetTrainingCampDetail`,
    method: 'post',
    params: data
  });
}
// 获取训练营-详情-评论
function getTrainingCampDetailComment(data) {
  return request({
    url: `/api/HealthyCMS/GetTrainingCampDetailComment`,
    method: 'post',
    params: data
  });
}

//评论课程
function comment(params) {
  return request({
    url: `/api/HealthyCMS/Comment`,
    method: 'post',
    data: params
  });
}
// 轮播图

function getBanner(data) {
  return request({
    url: `/api/HealthyCMS/GetBanner`,
    method: 'post',
    params: data
  });
}
