20 lines
731 B
TypeScript
20 lines
731 B
TypeScript
import { axios } from "timi-web";
|
|
import type { CustomerChartReq } from "@/types/Customer";
|
|
import type { StoreEventRecordCalendarView, StoreEventRecordDailyStatView } from "@/types/Store";
|
|
import { withCurrentStoreId } from "@/utils/store";
|
|
|
|
const BASE_URI = "/gao/customer/chart";
|
|
|
|
async function eventRecordDailyStat(req: CustomerChartReq): Promise<StoreEventRecordDailyStatView[]> {
|
|
return await axios.post(`${BASE_URI}/event/record/daily`, withCurrentStoreId(req));
|
|
}
|
|
|
|
async function eventRecordCalendar(req: CustomerChartReq): Promise<StoreEventRecordCalendarView[]> {
|
|
return await axios.post(`${BASE_URI}/event/record/calendar`, withCurrentStoreId(req));
|
|
}
|
|
|
|
export default {
|
|
eventRecordDailyStat,
|
|
eventRecordCalendar
|
|
};
|