import axios from 'axios';
import config from './config.js';

const urls = config.urls;
export default {
  getPersonInfo() {
    return axios.post(urls.getPersonInfo);
  },
  updatePersonInfo(data) {
    return axios.post(urls.updatePersonInfo,{
      "dept": data.dept,
      "email": data.email,    
      "linkman":data.linkman,
      "phone": data.phone,
      "position": data.position,
    });
  },
  midifyPassword(data) {
    return axios.post(urls.midifyPassword,{
      "password": data.password,
      "modifyPassword": data.modifyPassword,
      })
  },

  getOrderNum() {
    return axios.post(urls.waitExamOrderCou);
  },
  getAuthNum() {
    return axios.post(urls.waitAuthen);
  },
  getProductLines(data) {
    return axios.post(urls.getAllProductOrder, data);
  },
  getAuthentication(data) {
    return axios.post(urls.queryAuthentication, data);
  },
  getAuthenticated(data) {
    return axios.post(urls.getAuthenticated, data);
  },
  addAdmin(param) {
    return axios.post(urls.addUserInfo, param);
  },
  updateUserInfoAll(param){
    return axios.post(urls.updateUserInfoAll, param);
  },
  getOrgList(param) {
    return axios.post(urls.getOrgList, param);
  },
  exportProductLines(param) {
    return axios.post(urls.exportProductOrderInfo, param, {
      responseType: 'blob'
    });
  },
  exportSuperAdmin(param) {
    return axios.post(urls.exportAdminInfo, param, {
      responseType: 'blob'
    });
  },
	queryUserInfo(param) {
		return axios.post(urls.queryUserInfo, param);
	},
	exportUserInfo(param) {  // 导出注册用户信息
		return axios.post(urls.exportUserInfo, param, {
			responseType: 'blob'
		});
	},
	exportKema(param) {  // 导出认证中
		return axios.post(urls.exportKema, param, {
			responseType: 'blob'
		});
	},
	exportVerified(param) {  // 导出注册用户
		return axios.post(urls.exportVerified, param, {
			responseType: 'blob'
		});
	},
	renewalsInfos(param) {  //续费列表数据获取
		return axios.post(urls.renewalsInfos, param);
	},
	modifyOpeningTime(param) {  //续费添加
		return axios.post(urls.modifyOpeningTime, param);
	},
	deleteRenewalsInfos(param) {  //删除续费
		return axios.post(urls.deleteRenewalsInfos, param);
	},
  exportOrganizeInfo(param){//导出结构信息
    return axios.post(urls.exportOrganizeInfo, param, {
      responseType: 'blob'
    });
  },
  getOrganizationInfo(data){//机构信息
    return axios.post(urls.getOrganizationInfo,data)
  },
  addOrganization(param){//添加机构信息
    return axios.post(urls.addOrganization,param)
  },
  modifineOrganization(param){//修改机构信息
    return axios.post(urls.modifineOrganization,param)
  },
  exportAuthedAdmin(param){     //导出已认证超管
    return axios.post(urls.exportAuthedAdmin, param, {
      responseType: 'blob'
    });
  },
  auditUserInfoAll(param){
    return axios.post(urls.auditUserInfoAll, param);
  },
  auditUserInfoAllPass(param){
    return axios.post(urls.auditUserInfoAllPass, param);
  },
  getProductLinesManage(param){
    return axios.post(urls.getProductLinesManage, param);
  },
  delProductLine(param){
    return axios.post(urls.delProductLine, param);
  },
  addProductLine(param){
    return axios.post(urls.addProductLine, param);
  },
  editProductLine(param){
    return axios.post(urls.editProductLine, param);
  },
  proDetails(param){
    return axios.post(urls.proDetails, param);
  },
  getProductDetail(param){
    return axios.post(urls.getProductDetail, param);
  },
  reBuyProduct(param){
    return axios.post(urls.contineBuy, param);
  },
  delSuperAdmin(param){
    return axios.post(urls.delSuperAdmin, param);
  },
  updateServiceStatus(param){
    return axios.post(urls.updateServiceStatus, param);
  },
  startAndendByuserId(param){
    return axios.post(urls.startAndendByuserId, param);
  },
  delAdminDetail(param){
    return axios.post(urls.delInformationAvailable, param);
  },
  auditProductStatus(param){
    return axios.post(urls.auditProductStatus, param);
  }
}