From 464db7f638dcf74ac010ab63ee6c1518a6854d73 Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 25 Jan 2026 18:15:29 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=9B=A2=E9=98=9F?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9F=E8=AE=A1=E4=BF=A1=E6=81=AF=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/team/index.vue | 390 +++++++++++++++++++++++---------------- 1 file changed, 231 insertions(+), 159 deletions(-) diff --git a/src/views/team/index.vue b/src/views/team/index.vue index 5589d8c..b5ee6b1 100644 --- a/src/views/team/index.vue +++ b/src/views/team/index.vue @@ -19,10 +19,11 @@ const [depth3Query] = useResetRef({ pageSize: 10, }); // 统计数据 -const { data: statistics } = safeClient(client.api.team.stats.get()); +const { data: statistics } = safeClient(client.api.team.dashboard.summary.get()); +const { data: earnings } = safeClient(client.api.team.earnings.get()); const { data: depth1, execute: executeDepth1 } = safeClient(() => client.api.team.members.get({ query: { ...depth1Query.value } })); -const { data: depth2, execute: executeDepth2 } = safeClient(() => client.api.team.members.get({ query: { ...depth2Query.value } })); -const { data: depth3, execute: executeDepth3 } = safeClient(() => client.api.team.members.get({ query: { ...depth3Query.value } })); +const { data: depth2, execute: executeDepth2 } = safeClient(() => client.api.team.members.get({ query: { ...depth2Query.value } }), { immediate: false }); +const { data: depth3, execute: executeDepth3 } = safeClient(() => client.api.team.members.get({ query: { ...depth3Query.value } }), { immediate: false }); // 当前选中的级别 const selectedLevel = ref<1 | 2 | 3>(1); @@ -133,91 +134,158 @@ function nextPage() { 团队规模 -
-
-
- {{ statistics?.totalCount }} +
+
+
+ {{ statistics?.totalCount || 0 }}
-
+
团队总人数
-
-
- 今日新增 - {{ statistics?.todayCount }} +
+
+ {{ statistics?.todayCount || 0 }}
-
- 昨日新增 - {{ statistics?.yesterdayCount }} +
+ 今日新增
-
- 本月新增 - {{ statistics?.monthCount }} +
+
+
+ {{ statistics?.monthCount || 0 }} +
+
+ 本月新增 +
+
+
+ +
+
+
+ {{ statistics?.totalRegister || 0 }} +
+
+ 总注册 +
+
+
+
+ {{ statistics?.totalKyc || 0 }} +
+
+ 总实名 +
+
+
+
+ {{ statistics?.totalActivated || 0 }} +
+
+ 总激活
- - - - +
+
+
+ 团队总助力
-
- 今日收益 -
-
-
-
- 本周收益 - ¥{{ statistics.weekIncome.toFixed(2) }} -
-
- 较上月 - - {{ incomeChange.isPositive ? '+' : '' }}{{ incomeChange.percent }}% - +
+ ¥{{ Number(earnings?.totalAmount || 0).toFixed(2) }}
-
--> + + +
+
+ 本月助力 +
+
+
+
+ ¥{{ Number(earnings?.monthAmount || 0).toFixed(2) }} +
+
+ 本月金额 +
+
+
+
+ ¥{{ Number(earnings?.lastMonthAmount || 0).toFixed(2) }} +
+
+ 上月金额 +
+
+
+
+ {{ Number(earnings?.monthIncreaseAmount || 0) >= 0 ? '+' : '' }}¥{{ Number(earnings?.monthIncreaseAmount || 0).toFixed(2) }} +
+
+ 月增长 +
+
+
+
+ + +
+
+ 本周助力 +
+
+
+
+ ¥{{ Number(earnings?.weekAmount || 0).toFixed(2) }} +
+
+ 本周金额 +
+
+
+
+ ¥{{ Number(earnings?.lastWeekAmount || 0).toFixed(2) }} +
+
+ 上周金额 +
+
+
+
+ {{ Number(earnings?.weekIncreaseAmount || 0) >= 0 ? '+' : '' }}¥{{ Number(earnings?.weekIncreaseAmount || 0).toFixed(2) }} +
+
+ 周增长 +
+
+
+
+ + +
+
+
+ 今日助力 +
+
+ ¥{{ Number(earnings?.todayAmount || 0).toFixed(2) }} +
+
+
+
@@ -328,6 +396,7 @@ function nextPage() { overflow: hidden; border-radius: 100%; } + .stats-section { background: white; padding: 20px; @@ -349,113 +418,116 @@ function nextPage() { color: #c41e3a; } -.team-size-card { - display: flex; - align-items: center; - background: linear-gradient(135deg, #fff7f0 0%, #ffe8e8 100%); - border-radius: 12px; - padding: 20px; - gap: 20px; -} - -.team-total { - flex: 1; - text-align: center; - padding-right: 20px; - border-right: 1px solid #333; -} - -.total-value { - font-size: 36px; - font-weight: 700; - color: #c41e3a; - margin-bottom: 8px; -} - -.total-label { - font-size: 14px; -} - -.team-growth { - flex: 1; - display: flex; - flex-direction: column; +.stats-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); gap: 12px; } -.growth-item { - display: flex; - justify-content: space-between; - align-items: center; -} - -.growth-label { - font-size: 14px; -} - -.growth-value { - font-size: 18px; - font-weight: 700; -} - -.unified-card { - display: flex; - align-items: center; - background: linear-gradient(135deg, #f5f7fa 0%, #e8edf3 100%); +.stat-card { + background: #f5f7fa; border-radius: 12px; - padding: 20px; - gap: 20px; -} - -.unified-left { - flex: 1; + padding: 16px 12px; text-align: center; - padding-right: 20px; - border-right: 1px solid #333; + transition: all 0.3s ease; } -.unified-value { +.stat-card.primary { + background: linear-gradient(135deg, #c41e3a 0%, #8b1a2e 100%); + color: white; +} + +.stat-card.accent { + background: linear-gradient(135deg, #fff7f0 0%, #ffe8e8 100%); +} + +.stat-card.success { + background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); +} + +.stat-card.danger { + background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); +} + +.stat-value { font-size: 28px; font-weight: 700; + margin-bottom: 4px; +} + +.stat-card.primary .stat-value { + color: white; +} + +.stat-card.accent .stat-value { color: #c41e3a; +} + +.stat-card.success .stat-value { + color: #16a34a; +} + +.stat-card.danger .stat-value { + color: #dc2626; +} + +.stat-value.small { + font-size: 20px; +} + +.stat-label { + font-size: 12px; + color: #666; +} + +.stat-card.primary .stat-label { + color: rgba(255, 255, 255, 0.9); +} + +.earnings-main-card { + background: linear-gradient(135deg, #c41e3a 0%, #8b1a2e 100%); + border-radius: 16px; + padding: 24px; + margin-bottom: 16px; + color: white; +} + +.earnings-total { + text-align: center; +} + +.earnings-label { + font-size: 14px; + opacity: 0.9; margin-bottom: 8px; } -.unified-label { +.earnings-value { + font-size: 36px; + font-weight: 700; +} + +.earnings-section { + margin-bottom: 16px; +} + +.earnings-section:last-of-type { + margin-bottom: 0; +} + +.earnings-section-title { font-size: 14px; - color: #666; -} - -.unified-right { - flex: 1; - display: flex; - flex-direction: column; - gap: 12px; -} - -.unified-item { - display: flex; - justify-content: space-between; - align-items: center; -} - -.unified-item-label { - font-size: 14px; - color: #666; -} - -.unified-item-value { - font-size: 16px; font-weight: 600; - color: #333; + color: #666; + margin-bottom: 12px; + padding-left: 12px; + border-left: 3px solid #c41e3a; } -.unified-item-value.success { - color: #52c41a; -} - -.unified-item-value.danger { - color: #ff4d4f; +.today-earnings-card { + background: linear-gradient(135deg, #fff7f0 0%, #ffe8e8 100%); + border-radius: 12px; + padding: 16px; } .team-list-section {