统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -3,109 +3,112 @@
|
||||
@section('title', '双色球彩票开奖记录')
|
||||
|
||||
@section('content')
|
||||
<div class="space-y-6">
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
{{-- 页头 --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex justify-between items-center">
|
||||
@php
|
||||
$tableCellClass = 'px-4 py-3';
|
||||
$badgeClass = $adminListBadgeBaseClass;
|
||||
@endphp
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
<div class="{{ $adminListHeaderCardClass }} flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div>
|
||||
<h2 class="text-lg font-bold text-gray-800">🎟️ 双色球彩票历史记录</h2>
|
||||
<p class="text-xs text-gray-500 mt-1">查询各期双色球的开奖结果及购买明细。</p>
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">🎟️ 双色球彩票历史记录</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">查询各期双色球的开奖结果及购买明细。</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.game-configs.index') }}"
|
||||
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg text-sm font-bold hover:bg-gray-200 transition">
|
||||
<a href="{{ route('admin.game-configs.index') }}" class="{{ $adminListSecondaryButtonClass }}">
|
||||
⚙️ 游戏配置
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- 统计卡片 --}}
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-indigo-600">{{ number_format($summary['total_issues']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">历史总期数</div>
|
||||
<div class="mt-1 text-xs text-gray-500">历史总期数</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-emerald-600">{{ number_format($summary['drawn_count']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">已开奖期数</div>
|
||||
<div class="mt-1 text-xs text-gray-500">已开奖期数</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-amber-600">{{ number_format($summary['total_tickets']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">历史售出彩票</div>
|
||||
<div class="mt-1 text-xs text-gray-500">历史售出彩票</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-rose-600">{{ number_format($summary['total_pool']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">历史开奖总奖池</div>
|
||||
<div class="mt-1 text-xs text-gray-500">历史开奖总奖池</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 期数列表 --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 border-b border-gray-100">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-bold text-gray-500 uppercase">期号</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-bold text-gray-500 uppercase">开奖时间</th>
|
||||
<th class="px-4 py-3 text-center text-xs font-bold text-gray-500 uppercase">状态</th>
|
||||
<th class="px-4 py-3 text-center text-xs font-bold text-gray-500 uppercase">开奖号码</th>
|
||||
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">售出票数</th>
|
||||
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">期奖池</th>
|
||||
<th class="px-4 py-3 text-right text-xs font-bold text-gray-500 uppercase">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($issues as $issue)
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-gray-600 text-xs font-mono font-bold">第 {{ $issue->issue_no }} 期</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-600">
|
||||
{{ $issue->draw_at ? $issue->draw_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($issue->status === 'settled')
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-emerald-100 text-emerald-700">已开奖</span>
|
||||
@else
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-amber-100 text-amber-700">销售中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-mono">
|
||||
@if ($issue->status === 'settled')
|
||||
<div class="flex items-center justify-center gap-1">
|
||||
<span
|
||||
class="text-xs bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red1, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red2, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red3, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-blue-100 text-blue-600 px-1 rounded">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
</div>
|
||||
@else
|
||||
<span class="text-xs text-gray-400">等待开奖</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-indigo-600 font-bold">
|
||||
{{ number_format($issue->total_tickets) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-amber-600 font-bold">
|
||||
{{ number_format($issue->pool_amount) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<a href="{{ route('admin.game-history.lottery.issue', $issue->id) }}"
|
||||
class="px-3 py-1 bg-indigo-50 text-indigo-700 rounded text-xs font-bold hover:bg-indigo-100 transition">
|
||||
购买明细
|
||||
</a>
|
||||
</td>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<div class="{{ $adminListSectionTitleClass }}">期数列表</div>
|
||||
<div class="{{ $adminListSectionDescClass }}">统一开奖记录列表结构,保留双色球号码配色和开奖状态语义。</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }}">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">期号</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">开奖时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">开奖号码</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">售出票数</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">期奖池</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">操作</th>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-10 text-center text-gray-400 text-sm">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($issues as $issue)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }} font-mono">第 {{ $issue->issue_no }} 期</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListBodyTextClass }}">
|
||||
{{ $issue->draw_at ? $issue->draw_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($issue->status === 'settled')
|
||||
<span class="{{ $badgeClass }} border-emerald-200 bg-emerald-100 text-emerald-700">已开奖</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} border-amber-200 bg-amber-100 text-amber-700">销售中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListNumericTextClass }}">
|
||||
@if ($issue->status === 'settled')
|
||||
<div class="flex flex-wrap items-center justify-center gap-1">
|
||||
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-xs text-red-600">{{ str_pad($issue->red1, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-xs text-red-600">{{ str_pad($issue->red2, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 text-xs text-red-600">{{ str_pad($issue->red3, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-blue-200 bg-blue-100 px-1.5 py-0.5 text-xs text-blue-600">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
</div>
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">等待开奖</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold text-indigo-600">
|
||||
{{ number_format($issue->total_tickets) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold text-amber-600">
|
||||
{{ number_format($issue->pool_amount) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right">
|
||||
<a href="{{ route('admin.game-history.lottery.issue', $issue->id) }}"
|
||||
class="{{ $adminListActionButtonClass }} bg-indigo-50 text-indigo-700 hover:bg-indigo-100">
|
||||
购买明细
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($issues->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $issues->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user