feat(frontend): 店铺概览页添加导出按钮

- 新增 exportByPost 通用导出工具(处理 blob 下载)
- 店铺概览页导出按钮绑定事件,支持当前页面日期范围导出
- shop/apis.ts 新增导出 API 函数
This commit is contained in:
小蟑螂
2026-03-26 10:05:13 +08:00
parent 8867903e7b
commit f172c12e4f
7 changed files with 220 additions and 1 deletions
@@ -80,3 +80,29 @@ export async function getShopOverviewStatisticsApi(
params,
);
}
/**
* 导出店铺概览Excel
*/
export async function exportShopOverviewApi(params: {
shopId: number;
dateRange: string[];
exportType?: string;
}) {
return requestClient.post('/ec/shop/export-overview', params, {
responseType: 'blob',
});
}
/**
* 导出公司概览Excel
*/
export async function exportCompanyOverviewApi(params: {
dateRange: string[];
shopIds?: number[];
exportType?: string;
}) {
return requestClient.post('/ec/company-overview/export', params, {
responseType: 'blob',
});
}