import service from '@/utils/service'

// const baseUrl = 'http://localhost:8082/manager/api/order'

const baseUrl = process.env.VUE_APP_HOST + '/manager/api/order'

const orderApi = {}

orderApi.baseUrl = baseUrl

orderApi.getOrderList = params => {
  return service({
    url: `${baseUrl}/v1/list`,
    method: 'get',
    params: params
  })
};

orderApi.getSelectOptions = () => {
  return service({
    url: `${baseUrl}/v1/select`,
    method: 'get'
  })
};

orderApi.getExcel = data => {
  return service({
    url: `${baseUrl}/v1/excel`,
    method: 'post',
    data: data
  })
};

orderApi.getExcelV2 = params => {
    return service({
        url: `${baseUrl}/v2/excel`,
        method: 'get',
        params: params
    })
};

export default orderApi
