import request from "@/utils/request";
import { Order_BaseUrl } from "@/api/config";
const baseURL = Order_BaseUrl + "/admin/sale/summary";
// 销量统计
const Api = {
  // 统计
  count(params: any) {
    return request<any>({
      url: `${baseURL}/count`,
      method: "get",
      params
    });
  },
  // 分页
  page(params: any) {
    return request<any>({
      url: `${baseURL}/page`,
      method: "get",
      params
    });
  },
  // 导出
  export(params: any) {
    return request<any>({
      url: `${baseURL}/export`,
      method: "get",
      params,
      responseType: 'blob'
    });
  },
  // 商品报表打印
  print(params: any) {
    return request<any>({
      url: `${baseURL}/print`,
      method: "get",
      params
    });
  },
};

export default Api;

