Blame view

src/api/project/global.ts 871 Bytes
sanmu authored
1
2
3
4
5
import { defHttp } from '/@/utils/http/axios';

enum Api {
  DATA = '/order/erp/index/data',
  CHART_DATA = '/order/erp/index/chartData',
柏杨 authored
6
7
8

  SALES_DATA = '/order/erp/index/totalSalesStatistics', //销售额完成情况
  CUSTOMER_SALES = '/order/erp/index/salesStatusEveryCustomer', //每个客户销售额情况
sanmu authored
9
10
}
柏杨 authored
11
12
13
14
15
16
17
18
19
20
21
22
export const getApiData = async (params?) => {
  const res = await defHttp.get<any>({ url: Api.DATA, params });
  return res;
};

export const getChartData = async (params?) => {
  const res = await defHttp.get<any>({ url: Api.CHART_DATA, params });
  return res;
};

export const getSalesData = async (params?) => {
  const res = await defHttp.get<any>({ url: Api.SALES_DATA, params });
柏杨 authored
23
24
25
  return res;
};
柏杨 authored
26
27
export const getCustomerSalesData = async (params?) => {
  const res = await defHttp.get<any>({ url: Api.CUSTOMER_SALES, params });
柏杨 authored
28
29
  return res;
};