From 84883bdb2e1bef35d54d75baf554ae5a8e3e4e94 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Thu, 13 Nov 2025 10:21:17 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=92=E8=A1=8C=E6=A6=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/dashboard.js | 12 +
components/index/RankingBoard.vue | 516 ++++++++++++++++++++++++++++++
pages/index/index.vue | 18 +-
3 files changed, 542 insertions(+), 4 deletions(-)
create mode 100644 components/index/RankingBoard.vue
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 @@
+
+
+
+
+
+
+
+
+
+
+ 日排行
+
+
+ 周排行
+
+
+ 月排行
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
+
+ {{ currentUserRank.addNum }}
+
+
+ {{ currentUserRank.followNum }}
+
+
+ {{ currentUserRank.intentionNum }}
+
+
+ {{ currentUserRank.addWxNum }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 🥇
+ 🥈
+ 🥉
+ {{ index + 1 }}
+
+
+
+
+
+ {{ getAvatarText(item.userName) }}
+
+ {{ item.userName }}
+
+
+
+
+ {{ item.addNum }}
+
+
+ {{ item.followNum }}
+
+
+ {{ item.intentionNum }}
+
+
+ {{ item.addWxNum }}
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
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 @@
-
-
+
+
+
@@ -10,6 +11,8 @@
+
+
@@ -33,7 +36,7 @@
-
+
@@ -46,7 +49,7 @@
-
+