diff --git a/api/dashboard.js b/api/dashboard.js index 392ece6..ca47a9a 100644 --- a/api/dashboard.js +++ b/api/dashboard.js @@ -30,3 +30,15 @@ export const getDashboardBrief = ({ joinUserId, keys }) => { }); }; +/** + * 获取客户统计排行榜 + * @returns {Promise} 返回排行榜数据,包含 today、week、month 三个时间段的数据 + */ +export const getCustomerStatistics = () => { + return uni.$uv.http.get('/dashboard/customer/statistics', { + custom: { + auth: true // 启用 token 认证 + } + }); +}; + diff --git a/components/index/RankingBoard.vue b/components/index/RankingBoard.vue new file mode 100644 index 0000000..5246eae --- /dev/null +++ b/components/index/RankingBoard.vue @@ -0,0 +1,516 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 4ae2b46..5735dfd 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,6 +1,7 @@