import axios from 'axios'
const formHeader = {
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}

export const getOrderFilePage = (params: any) => {
  return axios.get('/api/excelOrderFile/page', {
    params,
    headers: formHeader
  })
}

export const deleteOrderFiles = (ids: string) => {
  return axios.get('/api/excelOrderFile/batchDeleteByIds', {
    params: { ids },
    headers: formHeader
  })
}

export const getOrderFileById = (id: string) => {
  return axios.get('/api/excelOrderFile/getById', {
    params: { id },
    headers: formHeader
  })
}

export const modifyCustomerEmail = (data: any) => {
  return axios.post('/api/customer/editEmail', data)
}

export const saveCustomerEmail = (data: any) => {
  return axios.post('/api/customer/addEmail', data)
}

export const getCustomerEmailList = (params: any) => {
  return axios.get('/api/customer/listEmail', {
    params,
    headers: formHeader
  })
}

export const deleteCustomerEmails = (customerEmailIds: string) => {
  return axios.get('/api/customer/deleteEmailByIds', {
    params: { customerEmailIds },
    headers: formHeader
  })
}
