zhengyiming
2025-06-11 91f00f1df35a964d69f48b9f71b484e2d4ef357e
packages/components/src/views/Mine/Dashboard.vue
@@ -1,60 +1,4 @@
<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> -->
  <div class="dashboard-view">
    <Chunk title="核心数据">
      <DashboardLargeCell class="dashboard-large-cell1">
@@ -85,7 +29,7 @@
        <DashboardItem
          title="累计收益"
          :icon="IconDashboard5"
          :value="toThousand(topStatistics?.accumulatedIncome ?? 0)"
          :value="toThousand(topStatistics?.accumulatedChannlesRakePrice ?? 0)"
          need-symbol
        />
        <DashboardItem
@@ -136,7 +80,10 @@
const { blLifeRecharge } = useLifeRechargeContext();
const { data: topStatistics } = useQuery({
  queryKey: ['lifePayServices/getTopStatistics', blLifeRecharge.accountModel.userChannles],
  queryKey: [
    'lifePayServices/getTopStatistics',
    computed(() => blLifeRecharge.accountModel.userChannles),
  ],
  queryFn: async () => {
    return await blLifeRecharge.services.getTopStatistics(
      {
@@ -148,6 +95,10 @@
    );
  },
  placeholderData: () => ({} as TopStatisticsOutput),
  enabled: computed(() => blLifeRecharge.accountModel.isBackClientUser),
  enabled: computed(() => {
    return (
      !!blLifeRecharge.accountModel.isBackClientUser && blLifeRecharge.accountModel.isGetUserInfo
    );
  }),
});
</script>