功能:排行榜页面新增今日三榜(今日经验/金币/魅力)及个人日志入口

This commit is contained in:
2026-02-28 12:50:15 +08:00
parent 0c5e218aa8
commit 1eb58ea331

View File

@@ -19,8 +19,10 @@
{{-- 说明条 --}}
<div class="bg-indigo-50 border-b border-indigo-100 py-3 shrink-0">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-between items-center text-sm">
<p class="text-indigo-800 font-medium"> 数据 <span class="font-bold text-red-500">15分钟</span>
自动刷新一次。努力提升自己,让全服铭记你的名字!</p>
<p class="text-indigo-800 font-medium"> 累计榜 <span class="font-bold text-red-500">15分钟</span>
刷新,今日榜每 <span class="font-bold text-green-600">5分钟</span> 刷新。努力提升自己,让全服铭记你的名字!</p>
<a href="{{ route('currency.my-logs') }}" class="text-indigo-600 font-semibold hover:underline text-xs">📊
查看我的积分日志 </a>
</div>
</div>
@@ -105,5 +107,83 @@
</div>
</div>
{{-- ═══ 今日榜每5分钟更新来自流水记录表═══ --}}
<h2 class="text-lg font-bold text-gray-700 mt-10 mb-4 flex items-center gap-2">
<span>📅</span> 今日排行榜
<span class="text-xs text-gray-400 font-normal">今日获得量排名5分钟更新</span>
</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
{{-- 今日经验榜 --}}
<div class="bg-white rounded-xl shadow-sm border border-amber-200 overflow-hidden">
<div
class="bg-gradient-to-r from-amber-500 to-orange-400 px-4 py-3 flex justify-between items-center text-white">
<h2 class="font-bold text-lg"> 今日修为榜</h2>
<span class="text-xs bg-amber-800/30 px-2 py-0.5 rounded">今日Exp</span>
</div>
<div class="p-0 overflow-y-auto max-h-64">
@if ($todayExp->isEmpty())
<p class="text-center text-gray-400 py-8 text-sm">今日暂无记录</p>
@else
@foreach ($todayExp as $i => $row)
<div class="flex items-center gap-3 px-4 py-2 border-b border-gray-50 hover:bg-amber-50">
<span class="w-6 text-center font-bold text-gray-400">{{ $i + 1 }}</span>
<span class="flex-1 text-sm font-medium truncate">{{ $row->username }}</span>
<span class="text-amber-600 font-semibold text-sm">+{{ number_format($row->total) }}</span>
</div>
@endforeach
@endif
</div>
</div>
{{-- 今日金币榜 --}}
<div class="bg-white rounded-xl shadow-sm border border-yellow-200 overflow-hidden">
<div
class="bg-gradient-to-r from-yellow-500 to-yellow-400 px-4 py-3 flex justify-between items-center text-yellow-900">
<h2 class="font-bold text-lg">💰 今日财富榜</h2>
<span class="text-xs bg-yellow-800/20 px-2 py-0.5 rounded">今日Coin</span>
</div>
<div class="p-0 overflow-y-auto max-h-64">
@if ($todayGold->isEmpty())
<p class="text-center text-gray-400 py-8 text-sm">今日暂无记录</p>
@else
@foreach ($todayGold as $i => $row)
<div class="flex items-center gap-3 px-4 py-2 border-b border-gray-50 hover:bg-yellow-50">
<span class="w-6 text-center font-bold text-gray-400">{{ $i + 1 }}</span>
<span class="flex-1 text-sm font-medium truncate">{{ $row->username }}</span>
<span class="text-yellow-600 font-semibold text-sm">+{{ number_format($row->total) }}</span>
</div>
@endforeach
@endif
</div>
</div>
{{-- 今日魅力榜 --}}
<div class="bg-white rounded-xl shadow-sm border border-pink-200 overflow-hidden">
<div
class="bg-gradient-to-r from-pink-500 to-rose-400 px-4 py-3 flex justify-between items-center text-white">
<h2 class="font-bold text-lg">🌸 今日魅力榜</h2>
<span class="text-xs bg-pink-800/30 px-2 py-0.5 rounded">今日Charm</span>
</div>
<div class="p-0 overflow-y-auto max-h-64">
@if ($todayCharm->isEmpty())
<p class="text-center text-gray-400 py-8 text-sm">今日暂无记录</p>
@else
@foreach ($todayCharm as $i => $row)
<div class="flex items-center gap-3 px-4 py-2 border-b border-gray-50 hover:bg-pink-50">
<span class="w-6 text-center font-bold text-gray-400">{{ $i + 1 }}</span>
<span class="flex-1 text-sm font-medium truncate">{{ $row->username }}</span>
<span class="text-pink-600 font-semibold text-sm">+{{ number_format($row->total) }}</span>
</div>
@endforeach
@endif
</div>
</div>
</div>
</div>
</main>
@endsection