import api from './api'

/**
 * 申请成为分销商
 * @param {Object} data - 包含 id, name, phone, workUnit, recipientName, bankCardNumber, bankName
 */
export function createDistributor(data) {
  return api.post(`/distributor/create`, data, { login: true })
}

/**
 * 获取分销商数据
 */
export function getDistributorInfo(id) {
  return api.get(`/distributor/get`, id , { login: true })
}

/**
 * 获取佣金明细
 */
export function getCommissionList(data) {
  return api.get(`/order/listByDistributor`, data, { login: true })
}
