feat:【mall 商城】商城首页的迁移【ele】100%:评审完成
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { MallDataComparisonResp } from './common';
|
||||
|
||||
import { formatDate2 } from '@vben/utils';
|
||||
import type { DataComparisonRespVO } from './common';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
@@ -40,58 +38,26 @@ export namespace MallProductStatisticsApi {
|
||||
/** 浏览转化率 */
|
||||
browseConvertPercent: number;
|
||||
}
|
||||
|
||||
/** 会员分析 Request */
|
||||
export interface ProductStatisticsReq {
|
||||
times: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得商品统计分析 */
|
||||
export function getProductStatisticsAnalyse(
|
||||
params: MallProductStatisticsApi.ProductStatisticsReq,
|
||||
) {
|
||||
export function getProductStatisticsAnalyse(params: PageParam) {
|
||||
return requestClient.get<
|
||||
MallDataComparisonResp<MallProductStatisticsApi.ProductStatistics>
|
||||
>('/statistics/product/analyse', {
|
||||
params: {
|
||||
times: [
|
||||
formatDate2(params.times[0] || new Date()),
|
||||
formatDate2(params.times[1] || new Date()),
|
||||
],
|
||||
},
|
||||
});
|
||||
DataComparisonRespVO<MallProductStatisticsApi.ProductStatistics>
|
||||
>('/statistics/product/analyse', { params });
|
||||
}
|
||||
|
||||
/** 获得商品状况明细 */
|
||||
export function getProductStatisticsList(
|
||||
params: MallProductStatisticsApi.ProductStatisticsReq,
|
||||
) {
|
||||
export function getProductStatisticsList(params: PageParam) {
|
||||
return requestClient.get<MallProductStatisticsApi.ProductStatistics[]>(
|
||||
'/statistics/product/list',
|
||||
{
|
||||
params: {
|
||||
times: [
|
||||
formatDate2(params.times[0] || new Date()),
|
||||
formatDate2(params.times[1] || new Date()),
|
||||
],
|
||||
},
|
||||
},
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出获得商品状况明细 Excel */
|
||||
export function exportProductStatisticsExcel(
|
||||
params: MallProductStatisticsApi.ProductStatisticsReq,
|
||||
) {
|
||||
return requestClient.download('/statistics/product/export-excel', {
|
||||
params: {
|
||||
times: [
|
||||
formatDate2(params.times[0] || new Date()),
|
||||
formatDate2(params.times[1] || new Date()),
|
||||
],
|
||||
},
|
||||
});
|
||||
export function exportProductStatisticsExcel(params: PageParam) {
|
||||
return requestClient.download('/statistics/product/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获得商品排行榜分页 */
|
||||
|
||||
Reference in New Issue
Block a user