{{-- 文件功能:用户个人积分流水日志页面 用户可筛选查看自己的经验、金币、魅力收入和支出变动历史,按日期倒序排列 @extends layouts.app --}} @extends('layouts.app') @section('title', '我的积分记录 - 飘落流星') @section('nav-icon', '📊') @section('nav-title', '我的积分记录') @section('content')
@php $selectedSourceCount = count($selectedSources ?? []); @endphp {{-- 筛选栏 --}}
筛选: {{-- 收支方向 --}}
@foreach(['' => '全部', 'income' => '收入', 'expense' => '支出'] as $val => $label) {{ $label }} @endforeach
{{-- 货币类型 --}}
@foreach(['' => '全部', 'exp' => '⚡ 经验', 'gold' => '💰 金币', 'charm' => '🌸 魅力'] as $val => $label) {{ $label }} @endforeach
{{-- 来源筛选 --}}
来源:{{ $selectedSourceCount > 0 ? '已选 '.$selectedSourceCount.' 项' : '全部' }} ▾
@foreach($sourceOptions as $sourceOption) @endforeach
清空来源
{{-- 日期范围 --}}
@foreach([7 => '7 天', 14 => '14 天', 30 => '30 天'] as $d => $label) {{ $label }} @endforeach
{{-- 流水列表 --}}
@if($logs->isEmpty())
📭

暂无积分记录,快去钓鱼或挂机吧!

@else @foreach($logs as $log) @php $currencyIcons = ['exp' => '⚡', 'gold' => '💰', 'charm' => '🌸']; $icon = $currencyIcons[$log->currency] ?? '📌'; $isPositive = $log->amount >= 0; @endphp @endforeach
时间 类型 来源 变动 变动后余额 备注
{{ \Carbon\Carbon::parse($log->created_at)->format('m-d H:i') }} {{ $icon }} {{ \App\Services\UserCurrencyService::currencyLabel($log->currency) }} @php $sourceLabel = ''; try { $sourceLabel = \App\Enums\CurrencySource::from($log->source)->label(); } catch (\Throwable) { $sourceLabel = $log->source; } @endphp {{ $sourceLabel }} {{ $isPositive ? '+' : '' }}{{ number_format($log->amount) }} {{ number_format($log->balance_after) }} {{ $log->remark ?: '—' }}
@endif

最多显示最近 200 条记录

@endsection