import request from '@/utils/request'

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

// 获取达人列表
export function getItemList(query) {
  return request({
    url: '/jy/report/item',
    method: 'get',
    params: query
  })
}

export function getItemDetail(query) {
  return request({
    url: '/jy/report/itemDetail',
    method: 'get',
    params: query
  })
}

export function getJYOrderItemList(query) {
  return request({
    url: '/item/getJYOrderItemList',
    method: 'get',
    params: query
  })
}


export function promoterReport(query) {
  return request({
    url: '/jy/report/promoter',
    method: 'get',
    params: query
  })
}

export function getOrderDetail(query) {
  return request({
    url: '/jy/report/promoterDetail',
    method: 'get',
    params: query
  })
}

export function getOrderStatistics(query) {
  return request({
    url: '/jy/report/promoterStatistics',
    method: 'get',
    params: query
  })
}

export function getClipCooperation(query) {
  return request({
    url: '/jy/report/getClipCooperation',
    method: 'get',
    params: query
  })
}


// 获取订单数据
export function getIndexOrderInfo(query) {
  return request({
    url: '/jy/report/indexOrderInfo',
    method: 'get',
    params: query
  })
}


// 获取服务费数据
export function getIndexServiceAmountInfo(query) {
  return request({
    url: '/jy/report/indexServiceAmountInfo',
    method: 'get',
    params: query
  })
}


// 获取金额数据
export function getIndexAmountInfo(query) {
  return request({
    url: '/jy/report/indexAmountInfo',
    method: 'get',
    params: query
  })
}

// 获取达人排行
export function getIndexPromoterRank(query) {
  return request({
    url: '/jy/report/indexPromoterRank',
    method: 'get',
    params: query
  })
}

// 获取商品排行
export function getIndexOrderRank(query) {
  return request({
    url: '/jy/report/indexOrderRank',
    method: 'get',
    params: query
  })
}

// 首页订单统计-echarts图表
export function getIndexStatistics(query) {
  return request({
    url: '/jy/report/indexStatistics',
    method: 'get',
    params: query
  })
}

// 首页时间段对比
export function getTimeRatio(query) {
  return request({
    url: '/jy/report/indexTimeIntervalRatio',
    method: 'get',
    params: query
  })
}


export function profitData(query) {
  return request({
    url: '/jy/report/profitData',
    method: 'get',
    params: query
  })
}

export function getTopItem(query) {
  return request({
    url: '/jy/report/getTopItem',
    method: 'get',
    params: query
  })
}

export function getItemClipIds(query) {
  return request({
    url: '/jy/report/getTopItemUser',
    method: 'get',
    params: query
  })
}

export function getHourGmv(query) {
  return request({
    url: '/jy/report/getHourGmv',
    method: 'get',
    params: query
  })
}

export function getTypeData(query) {
  return request({
    url: '/jy/report/getTypeData',
    method: 'get',
    params: query
  })
}

export function getAuthItemList(query) {
  return request({
    url: '/jy/report/getAuthItemList',
    method: 'get',
    params: query
  })
}

export function getAuthItem(query) {
  return request({
    url: '/jy/report/getAuthItem',
    method: 'get',
    params: query
  })
}

// 盯盘- 汇总数据
export function getSumInfo(query) {
  return request({
    url: '/jy/dingpan/getSumInfo',
    method: 'get',
    params: query
  })
}

export function getMonthData(query) {
  return request({
    url: '/jy/dingpan/getMonthInfo',
    method: 'get',
    params: query
  })
}

export function getGmvHours(query) {
  return request({
    url: '/jy/dingpan/getGmvHours',
    method: 'get',
    params: query
  })
}

export function getTeamList(query) {
  return request({
    url: '/jy/dingpan/getTeamList',
    method: 'get',
    params: query
  })
}

export function getPeopleList(query) {
  return request({
    url: '/jy/dingpan/getPeopleList',
    method: 'get',
    params: query
  })
}

export function getPromoterList(query) {
  return request({
    url: '/jy/dingpan/getPromoterList',
    method: 'get',
    params: query
  })
}

export function getDingPanItemList(query) {
  return request({
    url: '/jy/dingpan/getDingPanItemList',
    method: 'get',
    params: query
  })
}

export function getTuiGuangList(query) {
  return request({
    url: '/jy/dingpan/getDingPanTuiGuangUserList',
    method: 'get',
    params: query
  })
}

export function getMentorBusinessList(query) {
  return request({
    url: '/jy/dingpan/getDingPanMentorBusinessList',
    method: 'get',
    params: query
  })
}

export function getAddItemList(query) {
  return request({
    url: '/jy/dingpan/getAddItemList',
    method: 'get',
    params: query
  })
}

export function getVideoList(query) {
  return request({
    url: '/jy/dingpan/getVideoList',
    method: 'get',
    params: query
  })
}

export function getAddItemListByUserId(query) {
  return request({
    url: '/jy/dingpan/getAddItemListByUserId',
    method: 'get',
    params: query
  })
}

export function getAddItemListByExpertId(query) {
  return request({
    url: '/jy/dingpan/getAddItemListByExpertId',
    method: 'get',
    params: query
  })
}

export function getAddItemListByClipUserId(query) {
  return request({
    url: '/jy/dingpan/getAddItemListByClipUserId',
    method: 'get',
    params: query
  })
}

export function getTeamDetail(query) {
  return request({
    url: '/jy/dingpan/getTeamDetail',
    method: 'get',
    params: query
  })
}

export function getTeamExpertBusinessDetail(query) {
  return request({
    url: '/jy/dingpan/getTeamExpertBusinessDetail',
    method: 'get',
    params: query
  })
}

export function getPromoterItemDetail(query) {
  return request({
    url: '/jy/dingpan/getPromoterItemDetail',
    method: 'get',
    params: query
  })
}export function getItemPromoterDetail(query) {
  return request({
    url: '/jy/dingpan/getItemPromoterDetail',
    method: 'get',
    params: query
  })
}



