feat(M08-D): 建立后台运营总览
This commit is contained in:
@@ -5,6 +5,8 @@ import type {
|
||||
CleaningTask,
|
||||
CleaningTaskEvent,
|
||||
CleaningTaskMember,
|
||||
BusinessStatistics,
|
||||
ManagedStore,
|
||||
ManagedUser,
|
||||
PageResult,
|
||||
PayoutStateFilter,
|
||||
@@ -32,6 +34,18 @@ export interface ApiSession {
|
||||
token: string;
|
||||
}
|
||||
|
||||
export function listManagedStores(session: ApiSession) {
|
||||
return request<ManagedStore[]>(session, '/stores');
|
||||
}
|
||||
|
||||
export function getBusinessStatistics(
|
||||
session: ApiSession,
|
||||
input: { storeId: string; from: string; to: string }
|
||||
) {
|
||||
const params = new URLSearchParams(input);
|
||||
return request<BusinessStatistics>(session, `/statistics?${params}`);
|
||||
}
|
||||
|
||||
async function request<T>(
|
||||
session: ApiSession,
|
||||
path: string,
|
||||
|
||||
Reference in New Issue
Block a user