import request from "@/utils/request";

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

// #region 我的报名

// 名师在线
export const tjkc_list = (data = {}) => {
    return request({
        url: "/txwx/mszy_kc/index",
        data,
    });
} 
// 名师章节
export const tjkc_chapter = (data = {}) => {
  return request({
    url: "/txwx/mszy_zj/index",
    data,
  });
}; 
// 家庭教育
export const jtjy_list = (data = {}) => {
  return request({
    url: "/txwx/jtjy_kc/index",
    data,
  });
}; 
// 家庭章节
export const jtjy_chapter = (data = {}) => {
  return request({
    url: "/txwx/jtjy_zj/index",
    data,
  });
};
// 报名列表
export const bm_list = (data = {}) => {
  return request({
    url: "/txwx/bm/index",
    data,
  });
};
// 添加报名
export const bm_add = (data = {}) => {
  return request({
    url: "/txwx/bm/add",
    data,
  });
};
// 取消报名
export const bm_cancel = (data = {}) => {
  return request({
    url: "/txwx/bm/delete",
    data,
  });
}

// #endregion

// #region 我的点赞

// 点赞列表
export const dz_list = (data = {}) => {
  return request({
    url: "/txwx/dz/index",
    data,
  });
};
// 点赞详情
export const dz_detail = (data = {}) => {
  return request({
    url: "/txwx/dz/detail",
    data,
  });
};
// #endregion


//#region 我的积分
export const jf_list = (data = {}) => {
  return request({
    url: "/txwx/jffl_jfjl/index",
    data,
  });
};
//#endregion

//#region 我的足迹
export const zj_list = (data = {}) => {
  return request({
    url: "/foot/index/index",
    data,
  });
};
//#endregion

// 学校列表
export const sm_list = (data = {}) => {
  return request({
    url: "/school/main/index",
    data: {
      limit: 9999,
      page:1,
    },
  });
};
// 班级列表
export const class_list = (data = {}) => {
  return request({
    url: "/txwx/jcxxgl_zyflgl_bj/index",
    data: {
      limit: 9999,
      page: 1,
    },
  });
};
// 修改用户
export const yhxx_xs_edit = (data = {}) => {
  return request({
    url: "/user/main/edit",
    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 }
  })