import request from "@/utils/request";

export const subject_list = (data = {}) => {
  return request({
    url: "/txwx/jcxxgl_zyflgl_xk/index",
    data,
  });
};

// 直播课程
export const zbkc_list = (data = {}) => {
  return request({
    url: "/txwx/zbkc/index",
    data,
  });
};
// 课程章节
export const chapter_list = (data = {}) => {
  return request({
    url: "/txwx/zbkc_ks/index",
    data,
  });
};
// 课程章节详情
export const chapter_detail = (data = {}) => {
  return request({
    url: "/txwx/zbkc_ks/detail",
    data,
  });
};


// 数据字典
export const option_list = (data = {}) => {
  return request({
    url: "/common/sjzd/option",
    data,
  });
};

// 用户信息
export const user_info = (data = {}) => {
  return request({
    url: "/user/main/user_info",
    data,
  });
};
// 文件上传
export const upload_file = (
  file,
  firstpage = "",
  lastpage = "",
  convert = ""
) =>
  REQUEST.upload({
    url: "/upload/main/file",
    data: {
      filedata: file,
      firstpage: firstpage,
      lastpage: lastpage,
      convert: convert,
    },
  });

export const thumb_add = (data = {}) => {
  return request({
    url: "/txwx/dz/add",
    data,
  });
};
export const thumb_del = (data = {}) => {
  return request({
    url: "/txwx/dz/delete",
    data,
  });
};
//# 我的积分
export const jf_list = (data = {}) => {
  return request({
    url: "/txwx/jffl_jfjl/index",
    data,
  });
};

export const grade_list = (data = {}) => {
  return request({
    url: "/txwx/jcxxgl_zyflgl_nj/index",
    data,
  });
};