|
|
@@ -56,6 +56,14 @@
|
|
|
<text class="summary-label">活跃用户</text>
|
|
|
<text class="summary-value">{{ summary.totalActiveUsers }}</text>
|
|
|
</view>
|
|
|
+ <view class="summary-card">
|
|
|
+ <text class="summary-label">充值笔数</text>
|
|
|
+ <text class="summary-value">{{ summary.totalRechargeCount }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="summary-card">
|
|
|
+ <text class="summary-label">退款笔数</text>
|
|
|
+ <text class="summary-value">{{ summary.totalRefundCount }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
@@ -217,14 +225,21 @@ const summary = ref({
|
|
|
totalConsumption: 0,
|
|
|
totalOrders: 0,
|
|
|
totalRegistrations: 0,
|
|
|
- totalActiveUsers: 0
|
|
|
+ totalActiveUsers: 0,
|
|
|
+ totalRechargeCount: 0,
|
|
|
+ totalRefundCount: 0
|
|
|
})
|
|
|
const summaryLoading = ref(false)
|
|
|
|
|
|
+const emptySummary = () => ({
|
|
|
+ totalIncome: 0, totalConsumption: 0, totalOrders: 0,
|
|
|
+ totalRegistrations: 0, totalActiveUsers: 0,
|
|
|
+ totalRechargeCount: 0, totalRefundCount: 0
|
|
|
+})
|
|
|
+
|
|
|
const loadSummary = async () => {
|
|
|
if (activeTab.value !== 0) {
|
|
|
- // 月统计暂不走聚合接口
|
|
|
- summary.value = { totalIncome: 0, totalConsumption: 0, totalOrders: 0, totalRegistrations: 0, totalActiveUsers: 0 }
|
|
|
+ summary.value = emptySummary()
|
|
|
return
|
|
|
}
|
|
|
summaryLoading.value = true
|
|
|
@@ -242,7 +257,9 @@ const loadSummary = async () => {
|
|
|
totalConsumption: res.data.totalConsumption || 0,
|
|
|
totalOrders: res.data.ordersCount || 0,
|
|
|
totalRegistrations: res.data.registrations || 0,
|
|
|
- totalActiveUsers: res.data.activeUserCount || 0
|
|
|
+ totalActiveUsers: res.data.activeUserCount || 0,
|
|
|
+ totalRechargeCount: res.data.rechargeCount || 0,
|
|
|
+ totalRefundCount: res.data.refundCount || 0
|
|
|
}
|
|
|
}
|
|
|
} catch (e) {
|
|
|
@@ -460,7 +477,7 @@ onMounted(async () => {
|
|
|
|
|
|
.summary-section {
|
|
|
display: grid;
|
|
|
- grid-template-columns: repeat(2, 1fr);
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
gap: 16rpx;
|
|
|
padding: 0 20rpx 16rpx;
|
|
|
}
|