// 基础模块函数库
import apis from "../apis_moudles/index";
import req from "../request";

// 示例：获取用户信息
const GETUSERINFO = (params) => {
  return req.get(apis.getUserInfo, {
    params,
  });
};

// 保险公司下拉数据
const GETPAYORCODE = (data) => {
  return req.post(apis.payorCodeList, {
    data,
  });
};

// get corporate Code 根据保险公司获取客户公司
const GETCORPORATECODEBYPAYOR = (data) => {
  return req.post(apis.corporateCodeList, data);
};

// get plan Code 根据客户公司获取保险计划
const GETPLANCODEBYCORP = (data) => {
  return req.post(apis.planCodeList, data);
};

// 科室信息
const GETSPECIALTYLIST = (data) => {
  return req.post(apis.specialtyList, data);
};

// 上传图片
const UPLOADIMG = (data) => {
  return req.post(apis.uploadImg, data);
};

// 责任累类型列表
const GETCOVERAGECODE = (data) => {
  return req.post(apis.coverageCode, data);
};

// 公共获取码表列表
const GETREFCDBYREFGRP = (data) => {
  return req.post(apis.getRefcdByRefgrp, data);
};

// 校验用户邮箱
const CHECKUSEREMAIL = (data) => {
  return req.post(apis.checkUserEmail, data);
};

// 对象数组
export default {
  GETUSERINFO,
  GETPAYORCODE,
  GETCORPORATECODEBYPAYOR,
  GETPLANCODEBYCORP,
  GETSPECIALTYLIST,
  UPLOADIMG,
  GETCOVERAGECODE,
  GETREFCDBYREFGRP,
  CHECKUSEREMAIL,
};
