import { axios } from '@/utils/request'

const api = {
  studentFederationInfo: '/backmanage/studentFederationInfo'
}

export function getStudentFederationInfoList (parameter) {
  return axios({
    url: api.studentFederationInfo + '/list',
    method: 'get',
    params: parameter
  })
}
export function geteducationIdTypes (parameter) {
  return axios({
    url:  '/backmanage/embassy/embassyList',
    method: 'post',
    params: parameter
  })
}

export function saveStudentFederationInfo (parameter) {
  return axios({
    url: api.studentFederationInfo+(parameter.id === 0 ? '/save' : '/update'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function checkStudentFederationByIdAndUserName (parameter) {
  return axios({
    url: api.studentFederationInfo+'/check/username',
    method: 'post',
    params: parameter
  })
}

export function delStudentFederationInfo (parameter) {
  return axios({
    url: api.studentFederationInfo + '/remove',
    method: 'post',
    params: parameter
  })
}

export const studentFederationInfoExport = api.studentFederationInfo + '/export'
