From 0886e91fdfe3b5528f80d2b6742083aa11d16ebb Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 02 四月 2025 15:54:15 +0800
Subject: [PATCH] fix: 四期bug

---
 packages/components/src/views/Mine/Dashboard.vue |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/packages/components/src/views/Mine/Dashboard.vue b/packages/components/src/views/Mine/Dashboard.vue
new file mode 100644
index 0000000..06d6b0a
--- /dev/null
+++ b/packages/components/src/views/Mine/Dashboard.vue
@@ -0,0 +1,88 @@
+<template>
+  <NutGrid :gutter="10" :column-num="3" square class="dashboard-view">
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">绱鏀舵</div>
+        <div class="pro-statistics-content">
+          {{ toThousand(topStatistics?.accumulatedReceipts ?? 0) }}
+        </div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">鏄ㄦ棩鏀舵</div>
+        <div class="pro-statistics-content">
+          {{ toThousand(topStatistics?.receiptsYesterday ?? 0) }}
+        </div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">绱鏀剁泭</div>
+        <div class="pro-statistics-content">
+          {{ toThousand(topStatistics?.accumulatedIncome ?? 0) }}
+        </div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">绱涓嬪崟</div>
+        <div class="pro-statistics-content">{{ topStatistics?.accumulatedOrders ?? 0 }}</div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">鏄ㄦ棩涓嬪崟</div>
+        <div class="pro-statistics-content">{{ topStatistics?.ordersNumYesterday ?? 0 }}</div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">鏄ㄦ棩鎴愬姛</div>
+        <div class="pro-statistics-content">{{ topStatistics?.yesterdaySuccess ?? 0 }}</div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">绱鐢ㄦ埛</div>
+        <div class="pro-statistics-content">{{ topStatistics?.accumulatedUsers ?? 0 }}</div>
+      </div>
+    </NutGridItem>
+    <NutGridItem>
+      <div class="pro-statistics-wrapper">
+        <div class="pro-statistics-title">鏄ㄦ棩娲昏穬</div>
+        <div class="pro-statistics-content">{{ topStatistics?.yesterdayActiveUsers ?? 0 }}</div>
+      </div>
+    </NutGridItem>
+  </NutGrid>
+</template>
+
+<script setup lang="ts">
+import { Grid as NutGrid, GridItem as NutGridItem } from '@nutui/nutui-taro';
+import { toThousand } from '../../utils';
+import { useQuery } from '@tanstack/vue-query';
+import { useLifeRechargeContext, TopStatisticsOutput } from '@life-payment/core-vue';
+import { computed } from 'vue';
+
+defineOptions({
+  name: 'Dashboard',
+});
+
+const { blLifeRecharge } = useLifeRechargeContext();
+
+const { data: topStatistics } = useQuery({
+  queryKey: ['lifePayServices/getTopStatistics', blLifeRecharge.accountModel.userChannles],
+  queryFn: async () => {
+    return await blLifeRecharge.services.getTopStatistics(
+      {
+        channleList: blLifeRecharge.accountModel.userChannles.map((x) => x.channlesNum),
+      },
+      {
+        showLoading: false,
+      }
+    );
+  },
+  placeholderData: () => ({} as TopStatisticsOutput),
+  enabled: computed(() => blLifeRecharge.accountModel.isBackClientUser),
+});
+</script>

--
Gitblit v1.9.1