/*
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
*
* https://www.mall4j.com/
*
* 未经允许，不可做商业用途！
*
* 版权所有，侵权必究！
*/
import request from '@/utils/request'

export function getOrderCount () {
  return request({
    url: '/mall4cloud_order/s/order_statistics/order_count',
    method: 'get'
  })
}

export function getSpuCount () {
  return request({
    url: '/mall4cloud_product/s/spu_statistics/spu_count',
    method: 'get'
  })
}

export function getCurrentMonthInfoByDay () {
  return request({
    url: '/mall4cloud_order/s/order_statistics/get_current_month_by_day',
    method: 'get'
  })
}

export function listOrderRefundInfo () {
  return request({
    url: '/mall4cloud_order/s/order_statistics/list_order_refund_info',
    method: 'get'
  })
}

export function getToDayByHour () {
  return request({
    url: '/mall4cloud_order/s/order_statistics/get_today_info_by_hour',
    method: 'get'
  })
}

export function listRefundRankingByReason () {
  return request({
    url: '/mall4cloud_order/s/order_statistics/list_refund_ranking_by_reason',
    method: 'get'
  })
}

export function listProdRankingByPayActual (data) {
  return request({
    url: '/mall4cloud_order/s/order_statistics/list_prod_ranking_by_payActual',
    method: 'get',
    params: data
  })
}

export function test (data) {
  return request({
    url: '/mall4cloud_product/s/apply_supplier/brand/signing',
    method: 'post',
    data
  })
}

// 近10日新老访客占比
export function getShopProductFlowInfo (params) {
  return request({
    url: '/mall4cloud_flow/s/product_analyse/get_shop_product_flow_info',
    method: 'get',
    params
  })
}
