import request from '@/utils/request'

/**
 * 下载文件 用于excel导出
 * @param url
 * @param parameter
 * @returns {*}
 */
export function downFilePost(url, parameter) {
  return request({
    url: url,
    data: parameter,
    method: 'post',
    responseType: 'blob',
    timeout: 12000000, // 请求超时时间
  })
}

export function downFile(url, parameter) {
  return request({
    url: url,
    params: parameter,
    method: 'get',
    responseType: 'blob',
    timeout: 12000000, // 请求超时时间
  })
}

// 达人订单管理
export function getOrderList(query) {
  return request({
    url: '/bytedance/order/bytedanceOrderList',
    method: 'get',
    params: query
  })
}

export function submitPromotersCount(query) {
  return request({
    url: '/kuaishou/promoter/addPromotersCount',
    method: 'get',
    params: query
  })
}


export function getBytedanceBdReportList(query) {
  return request({
    url: '/bytedance/order/bytedanceBDReportList',
    method: 'get',
    params: query
  })
}

//供应链列表-渠道&社群(人员列表)
export function getSupplyChainUserList(query) {
  return request({
    url: '/isv/supply_chain/getSupplyChainUserList',
    method: 'get',
    params: query
  })


}

//商品列表
export function getBytedanceItemList(query) {
  return request({
    url: '/bytedance/order/bytedanceItemList',
    method: 'get',
    params: query
  })
}

//top3
export function getBytedanceTopPromoterByItemId(query) {
  return request({
    url: '/bytedance/order/getBytedanceTopPromoterByItemId',
    method: 'get',
    params: query
  })
}

// 招商管理
export function adminBytedanceReportList(query) {
  return request({
    url: '/bytedance/order/adminBytedanceReportList',
    method: 'get',
    params: query
  })
}
//供应链列表-招商
export function getSupplyChainCourtshipList(query) {
  return request({
    url: '/isv/supply_chain/getSupplyChainCourtshipUserList',
    method: 'get',
    params: query
  })
}


export function getOrderDetail(query) {
  return request({
    url: '/bytedance/order/anchorBytedanceOrderDetail',
    method: 'get',
    params: query
  })
}



export function getOrderStatistics(query) {
  return request({
    url: '/bytedance/order/bytedanceOrderStatistics',
    method: 'get',
    params: query
  })
}

//达人带货详情-领样申请校验
export function samplesCheck(query) {
  return request({
    url: '/itemCollectSamples/samplesCheck',
    method: 'get',
    params: query
  })
}


export function getItemDetail(query) {
  return request({
    url: '/bytedance/order/bytedanceItemDetail',
    method: 'get',
    params: query
  })
}

export function getBdDetailList(query) {
  return request({
    url: '/bytedance/order/bytedanceBDDetailList',
    method: 'get',
    params: query
  })
}

export function getBdTotal(query) {
  return request({
    url: '/bytedance/order/bytedanceBDTotal',
    method: 'get',
    params: query
  })
}

export function getUserItemDetail(query) {
  return request({
    url: '/bytedance/order/bytedanceUserItemDetail',
    method: 'get',
    params: query
  })
}
export function getUserItemTotal(query) {
  return request({
    url: '/bytedance/order/bytedanceUserItemTotal',
    method: 'get',
    params: query
  })
}






