{{-- 文件功能:后台积分活动统计页面 显示指定日期下各来源活动(钓鱼、存点等)产出的经验/金币/魅力统计,以及今日净流通量 @extends admin/layouts --}} @extends('admin.layouts.app') @section('title', '积分流水统计') @section('content')
{{-- 页头 --}}

📊 积分流水活动统计

{{-- 日期选择器 --}}
{{-- 净流通量摘要卡片 --}}
@foreach (['exp' => ['label' => '经验', 'icon' => '⚡', 'color' => 'amber'], 'gold' => ['label' => '金币', 'icon' => '💰', 'color' => 'yellow'], 'charm' => ['label' => '魅力', 'icon' => '🌸', 'color' => 'pink']] as $cur => $info) @php $flow = $netFlow[$cur] ?? ['in'=>0,'out'=>0,'net'=>0]; @endphp
{{ $info['icon'] }} {{ $info['label'] }} 流通
+{{ number_format($flow['in']) }} 流入 -{{ number_format($flow['out']) }} 消耗
净增:{{ $flow['net'] >= 0 ? '+' : '' }}{{ number_format($flow['net']) }}
@endforeach
{{-- 来源活动详细统计表 --}}

各活动来源产出明细

日期:{{ $date }}(仅统计正向增加,不含消耗)

@foreach ($allSources as $source) @php $expRow = $statsByType['exp'][$source->value] ?? null; $goldRow = $statsByType['gold'][$source->value] ?? null; $charmRow = $statsByType['charm'][$source->value] ?? null; $hasData = $expRow || $goldRow || $charmRow; $maxParticipants = max( $expRow?->participant_count ?? 0, $goldRow?->participant_count ?? 0, $charmRow?->participant_count ?? 0, ); @endphp @endforeach
来源活动 ⚡ 经验产出 💰 金币产出 🌸 魅力产出 参与人次
{{ $source->label() }} {{ $expRow ? number_format($expRow->total_amount) : '—' }} {{ $goldRow ? number_format($goldRow->total_amount) : '—' }} {{ $charmRow ? number_format($charmRow->total_amount) : '—' }} {{ $maxParticipants > 0 ? $maxParticipants . ' 人' : '—' }}
@endsection