import fetch from '@/common/utils/fetch.js'

// 获取课程列表
export function _optionCourse(params) {
  return fetch('/parents/Mycourses/option_course', params)
}

// 获取课程筛选选项 parents/Mycourses/advanced_filter
export function _filter(params) {
  return fetch('/parents/Mycourses/advanced_filter', params)
}
// 课程详情 parents/Mycourses/course_details
export function _detail(params) {
  return fetch('/parents/Mycourses/course_details', params)
}
// 课程套餐详情 parents/Mycourses/course_gift
export function _gift(params) {
  return fetch('/parents/Mycourses/course_gift', params)
}
// 课程评价 parents/Mycourses/now_details_comment
export function _comments(params) {
  return fetch('/parents/Mycourses/now_details_comment', params)
}
// 添加购物车 parents/Commit/join_shop
export function _joinShop(params, showFail = true) {
  return fetch('/parents/Commit/join_shop', params, 'POST', showFail)
}
// 批量添加购物车
export function _joinShops(params) {
  return fetch('/parents/Commit/joinShopMulti', params)
}
// 购物车列表 /parents/Shopping/index
export function _shopList(params) {
  return fetch('/parents/Shopping/index', params)
}
// 删除购物车 /parents/Shopping/del_shopping
export function _delShop(params) {
  return fetch('/parents/Shopping/del_shopping', params)
}
// 生成订单 parents/Commit/order
export function _createOrder(params) {
  return fetch('/parents/Commit/order', params)
}
// 订单列表 parents/Ordercentre/index
export function _orderCenter(params) {
  return fetch('/parents/Ordercentre/index', params)
}
// 退课数据 get_dropcourse_byorder
export function _dropList(params) {
  return fetch('/parents/dropcourse/get_dropcourse_byorder', params)
}
// 订单支付
export function _payOrder(params) {
  return fetch('/parents/pay/payment', params)
}
// 取消订单 /parents/Ordercentre/del_order
export function _cancelOrder(params) {
  return fetch('/parents/Ordercentre/del_order', params)
}
// 进行退课 /parents/dropcourse/to_drop_course
export function _dropCourse(params) {
  return fetch('/parents/dropcourse/to_drop_course', params)
}
// 历史课程 /parents/Mycourses/course_history
export function _courseHistory(params) {
  return fetch('/parents/Mycourses/course_history', params)
}
// 我的课程 /parents/Mycourses/course_history
export function _nowCourse(params) {
  return fetch('/parents/Mycourses/now_course', params)
}
// 课程表 /parents/Mycourses/date_course
export function _dateCourse(params) {
  return fetch('/parents/Mycourses/date_course', params)
}
// 考勤记录 /parents/attendance/get_attendance
export function _attendance(params) {
  return fetch('/parents/attendance/get_attendance', params)
}
// 课堂详情 /parents/dailyclass/get_dailyclass_details
export function _dailiClass(params) {
  return fetch('/parents/dailyclass/get_dailyclass_details', params)
}
// 安全交接情况 /parents/sign/get_sign
export function _getSignIn(params) {
  return fetch('/parents/sign/get_sign', params)
}
// 进行安全交接 /parents/sign/to_sign
export function _toSignIn(params) {
  return fetch('/parents/sign/to_sign', params)
}
// 进行评价 /parents/Todayclass/comment
export function _tocomment(params) {
  return fetch('/parents/Todayclass/comment', params)
}
// 评价详情
export function _commentDetail(params) {
  return fetch('/parents/dailyclass/get_satisfaction', params)
}
// 获取请假类型
export function _leaveType(params) {
  return fetch('/teacher/leave/get_leave_type', params)
}
// 申请请假 parents/schedule/student_leave
export function _askLeave(params) {
  return fetch('/parents/schedule/student_leave', params)
}
