import http from '@/utils/request'

// 获取公共分销商
export const getOtaPublicList = (params) => {
  return http.post('/tenant/otaSource/getOtaPublicSourceList', { data: params })
}
// 绑定分销商
export const addOtaProject = (params) => {
  return http.post('/tenant/otaSource/add', { data: params })
}
// 编辑分销商
export const bindOtaManager = (params) => {
  return http.post('/tenant/otaProject/bindOtaManager', { data: params })
}
// 删除分销商
export const deleteOtaProject = (params) => {
  return http.post('/tenant/otaProject/deleteOtaProject', { data: params })
}
// 获取绑定分销商列表
export const getOtaProjectList = (params) => {
  return http.post('/tenant/otaSource', { data: params })
}
// 编辑绑定分销商
export const updateOtaProject = (params) => {
  return http.post('/tenant/otaSource/update', { data: params })
}

// ota充值记录
export const getOtaPaymentAmountLog = (params) => {
  return http.post('/tenant/otaSourceAmountLog', { data: params })
}

// ota { recharge: 充值, decrease: 扣款 }
export const otaAmount = (type, params) => {
  return http.post(`/tenant/otaSourceAmountLog/${type}`, { data: params })
}

// 获得所有旅行社
export const getAllAgency = (params) => {
  return http.post('/tenant/travel_agency/getAllAgency', { data: params })
}
