From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/api/mall/statistics/product.ts | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/src/api/mall/statistics/product.ts b/src/api/mall/statistics/product.ts
new file mode 100644
index 0000000..798a2fa
--- /dev/null
+++ b/src/api/mall/statistics/product.ts
@@ -0,0 +1,52 @@
+import request from '@/config/axios'
+import { DataComparisonRespVO } from '@/api/mall/statistics/common'
+
+export interface ProductStatisticsVO {
+ id: number
+ day: string
+ spuId: number
+ spuName: string
+ spuPicUrl: string
+ browseCount: number
+ browseUserCount: number
+ favoriteCount: number
+ cartCount: number
+ orderCount: number
+ orderPayCount: number
+ orderPayPrice: number
+ afterSaleCount: number
+ afterSaleRefundPrice: number
+ browseConvertPercent: number
+}
+
+// 鍟嗗搧缁熻 API
+export const ProductStatisticsApi = {
+ // 鑾峰緱鍟嗗搧缁熻鍒嗘瀽
+ getProductStatisticsAnalyse: (params: any) => {
+ return request.get<DataComparisonRespVO<ProductStatisticsVO>>({
+ url: '/statistics/product/analyse',
+ params
+ })
+ },
+ // 鑾峰緱鍟嗗搧鐘跺喌鏄庣粏
+ getProductStatisticsList: (params: any) => {
+ return request.get<ProductStatisticsVO[]>({
+ url: '/statistics/product/list',
+ params
+ })
+ },
+ // 瀵煎嚭鑾峰緱鍟嗗搧鐘跺喌鏄庣粏 Excel
+ exportProductStatisticsExcel: (params: any) => {
+ return request.download({
+ url: '/statistics/product/export-excel',
+ params
+ })
+ },
+ // 鑾峰緱鍟嗗搧鎺掕姒滃垎椤�
+ getProductStatisticsRankPage: async (params: any) => {
+ return await request.get({
+ url: `/statistics/product/rank-page`,
+ params
+ })
+ }
+}
--
Gitblit v1.8.0