global.ts
871 Bytes
import { defHttp } from '/@/utils/http/axios';
enum Api {
DATA = '/order/erp/index/data',
CHART_DATA = '/order/erp/index/chartData',
SALES_DATA = '/order/erp/index/totalSalesStatistics', //销售额完成情况
CUSTOMER_SALES = '/order/erp/index/salesStatusEveryCustomer', //每个客户销售额情况
}
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 });
return res;
};
export const getCustomerSalesData = async (params?) => {
const res = await defHttp.get<any>({ url: Api.CUSTOMER_SALES, params });
return res;
};