import request from '@/config/axios'

export const getResellList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/distribution/list',
    params: params
  })
}

export const addResell = async (data) => {
  return await request.post({
    url: '/admin-api/applet/xunjia/distribution/add',
    data
  })
}

export const updateResell = async (data) => {
  return await request.put({
    url: '/admin-api/applet/xunjia/distribution/update',
    data
  })
}
export const deleteResell = async (id) => {
  return await request.delete({
    url: '/admin-api/applet/xunjia/distribution/delete?distributionId=' + id
  })
}
export const getResellDetail = async (id) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/distribution/' + id
  })
}

export const getResellSimpleList = async (params) => {
  return await request.get({
    url: '/admin-api/applet/xunjia/distribution/simple-list',
    params: params
  })
}
