统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -3,110 +3,113 @@
|
||||
@section('title', "百家乐第 #{$round->id} 局下注明细")
|
||||
|
||||
@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">🎲 百家乐 #{{ $round->id }} 局下注明细</h2>
|
||||
<p class="text-xs text-gray-500 mt-1">
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">🎲 百家乐 #{{ $round->id }} 局下注明细</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
结算时间:{{ $round->settled_at?->format('Y-m-d H:i:s') ?? '未结算' }}
|
||||
· 结果:
|
||||
<span class="font-bold text-indigo-600">{{ $round->resultLabel() }}</span>
|
||||
· 总点数:<span class="font-bold">{{ $round->total_points }}</span>
|
||||
· 结果:<span class="font-semibold text-indigo-600">{{ $round->resultLabel() }}</span>
|
||||
· 总点数:<span class="font-semibold text-gray-700">{{ $round->total_points }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.game-history.baccarat') }}"
|
||||
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-history.baccarat') }}" 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($round->bet_count ?? 0) }}</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-red-50 rounded-xl shadow-sm border border-red-100 p-5">
|
||||
<div class="rounded-xl border border-red-100 bg-red-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-red-600">{{ number_format($round->total_bet_big ?? 0) }}</div>
|
||||
<div class="text-xs text-red-400 mt-1">押大总金额</div>
|
||||
<div class="mt-1 text-xs text-red-400">押大总金额</div>
|
||||
</div>
|
||||
<div class="bg-blue-50 rounded-xl shadow-sm border border-blue-100 p-5">
|
||||
<div class="rounded-xl border border-blue-100 bg-blue-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-blue-600">{{ number_format($round->total_bet_small ?? 0) }}</div>
|
||||
<div class="text-xs text-blue-400 mt-1">押小总金额</div>
|
||||
<div class="mt-1 text-xs text-blue-400">押小总金额</div>
|
||||
</div>
|
||||
<div class="bg-amber-50 rounded-xl shadow-sm border border-amber-100 p-5">
|
||||
<div class="rounded-xl border border-amber-100 bg-amber-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-amber-600">{{ number_format($round->total_payout ?? 0) }}</div>
|
||||
<div class="text-xs text-amber-400 mt-1">本局派奖总额</div>
|
||||
<div class="mt-1 text-xs text-amber-400">本局派奖总额</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-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-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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($bets as $bet)
|
||||
@php
|
||||
$betLabels = ['big' => '大', 'small' => '小', 'triple' => '豹子'];
|
||||
$betColors = [
|
||||
'big' => 'bg-red-100 text-red-700',
|
||||
'small' => 'bg-blue-100 text-blue-700',
|
||||
'triple' => 'bg-purple-100 text-purple-700',
|
||||
];
|
||||
$won = $bet->payout > 0;
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold {{ $betColors[$bet->bet_type] ?? 'bg-gray-100 text-gray-600' }}">
|
||||
{{ $betLabels[$bet->bet_type] ?? $bet->bet_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-sm text-gray-700">
|
||||
{{ number_format($bet->amount) }}
|
||||
</td>
|
||||
<td
|
||||
class="px-4 py-3 text-right font-mono text-sm {{ $won ? 'text-emerald-600 font-bold' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($won)
|
||||
<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-gray-100 text-gray-500">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right text-xs text-gray-400">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</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 }} text-center">押注方向</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">押注金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">实际获得</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">是否中奖</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">下注时间</th>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-10 text-center text-gray-400 text-sm">本局无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($bets as $bet)
|
||||
@php
|
||||
$betLabels = ['big' => '大', 'small' => '小', 'triple' => '豹子'];
|
||||
$betColors = [
|
||||
'big' => 'bg-red-100 text-red-700 border-red-200',
|
||||
'small' => 'bg-blue-100 text-blue-700 border-blue-200',
|
||||
'triple' => 'bg-purple-100 text-purple-700 border-purple-200',
|
||||
];
|
||||
$won = $bet->payout > 0;
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $betColors[$bet->bet_type] ?? 'bg-gray-100 text-gray-600 border-gray-200' }}">
|
||||
{{ $betLabels[$bet->bet_type] ?? $bet->bet_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-700">
|
||||
{{ number_format($bet->amount) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $won ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($won)
|
||||
<span class="{{ $badgeClass }} bg-emerald-100 text-emerald-700 border-emerald-200">🎉 中奖</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} bg-gray-100 text-gray-500 border-gray-200">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListSecondaryTextClass }}">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="{{ $adminListEmptyClass }}">本局无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($bets->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $bets->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,43 +3,46 @@
|
||||
@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-5 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-5">
|
||||
<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_rounds']) }}</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_bets']) }}</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['total_payout']) }}</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-red-100 p-5">
|
||||
<div class="rounded-xl border border-red-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-red-600">{{ number_format($summary['total_lost']) }}</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="text-sm font-bold text-gray-700 mb-2">结果分布</div>
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="mb-2 text-sm font-bold text-gray-700">结果分布</div>
|
||||
<div class="space-y-1">
|
||||
@foreach (['big' => '大', 'small' => '小', 'triple' => '豹子', 'kill' => '收割'] as $key => $label)
|
||||
<div class="flex justify-between text-xs">
|
||||
<div class="flex items-center justify-between text-xs">
|
||||
<span class="text-gray-500">{{ $label }}</span>
|
||||
<span class="font-bold text-gray-700">{{ $summary['result_dist'][$key] ?? 0 }} 局</span>
|
||||
</div>
|
||||
@@ -48,93 +51,96 @@
|
||||
</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">局次ID</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-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 ($rounds as $round)
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-gray-400 text-xs font-mono">#{{ $round->id }}</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-600">
|
||||
{{ $round->settled_at ? $round->settled_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-lg">
|
||||
@if ($round->dice1)
|
||||
{{ $round->dice1 }} {{ $round->dice2 }} {{ $round->dice3 }}
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-bold text-gray-700">
|
||||
{{ $round->total_points ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@php
|
||||
$resultColors = [
|
||||
'big' => 'bg-red-100 text-red-700',
|
||||
'small' => 'bg-blue-100 text-blue-700',
|
||||
'triple' => 'bg-purple-100 text-purple-700',
|
||||
'kill' => 'bg-gray-100 text-gray-600',
|
||||
];
|
||||
$label = match ($round->result) {
|
||||
'big' => '大',
|
||||
'small' => '小',
|
||||
'triple' => '豹子',
|
||||
'kill' => '收割',
|
||||
default => $round->result ?? '—',
|
||||
};
|
||||
$colorClass = $resultColors[$round->result] ?? 'bg-gray-100 text-gray-600';
|
||||
@endphp
|
||||
@if ($round->result)
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold {{ $colorClass }}">
|
||||
{{ $label }}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-gray-400 text-xs">未结算</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-xs font-bold text-indigo-600">
|
||||
{{ number_format($round->bet_count ?? 0) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right text-xs text-gray-500 font-mono">
|
||||
<span class="text-red-500">{{ number_format($round->total_bet_big ?? 0) }}</span> /
|
||||
<span class="text-blue-500">{{ number_format($round->total_bet_small ?? 0) }}</span> /
|
||||
<span class="text-purple-500">{{ number_format($round->total_bet_triple ?? 0) }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-amber-600 font-bold">
|
||||
{{ number_format($round->total_payout ?? 0) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<a href="{{ route('admin.game-history.baccarat.round', $round->id) }}"
|
||||
class="px-3 py-1 bg-indigo-50 text-indigo-700 rounded text-xs font-bold hover:bg-indigo-100 transition">
|
||||
下注明细
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="9" class="px-4 py-10 text-center text-gray-400 text-sm">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<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 }}">局次ID</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">结算时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">骰子</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">点数</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>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($rounds as $round)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }} font-mono">#{{ $round->id }}</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListBodyTextClass }}">
|
||||
{{ $round->settled_at ? $round->settled_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center text-lg">
|
||||
@if ($round->dice1)
|
||||
{{ $round->dice1 }} {{ $round->dice2 }} {{ $round->dice3 }}
|
||||
@else
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListPrimaryTextClass }}">
|
||||
{{ $round->total_points ?? '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@php
|
||||
$resultColors = [
|
||||
'big' => 'bg-red-100 text-red-700 border-red-200',
|
||||
'small' => 'bg-blue-100 text-blue-700 border-blue-200',
|
||||
'triple' => 'bg-purple-100 text-purple-700 border-purple-200',
|
||||
'kill' => 'bg-gray-100 text-gray-600 border-gray-200',
|
||||
];
|
||||
$label = match ($round->result) {
|
||||
'big' => '大',
|
||||
'small' => '小',
|
||||
'triple' => '豹子',
|
||||
'kill' => '收割',
|
||||
default => $round->result ?? '—',
|
||||
};
|
||||
$colorClass = $resultColors[$round->result] ?? 'bg-gray-100 text-gray-600 border-gray-200';
|
||||
@endphp
|
||||
@if ($round->result)
|
||||
<span class="{{ $badgeClass }} {{ $colorClass }}">{{ $label }}</span>
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">未结算</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center text-sm font-semibold text-indigo-600">
|
||||
{{ number_format($round->bet_count ?? 0) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-500">
|
||||
<span class="text-red-500">{{ number_format($round->total_bet_big ?? 0) }}</span> /
|
||||
<span class="text-blue-500">{{ number_format($round->total_bet_small ?? 0) }}</span> /
|
||||
<span class="text-purple-500">{{ number_format($round->total_bet_triple ?? 0) }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold text-amber-600">
|
||||
{{ number_format($round->total_payout ?? 0) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right">
|
||||
<a href="{{ route('admin.game-history.baccarat.round', $round->id) }}"
|
||||
class="{{ $adminListActionButtonClass }} bg-indigo-50 text-indigo-700 hover:bg-indigo-100">
|
||||
下注明细
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="9" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{-- 分页 --}}
|
||||
@if ($rounds->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $rounds->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,49 +3,49 @@
|
||||
@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;
|
||||
$gradeAll = [
|
||||
'jackpot' => ['label' => '上上签', 'color' => 'text-amber-600'],
|
||||
'good' => ['label' => '上签', 'color' => 'text-emerald-600'],
|
||||
'normal' => ['label' => '中签', 'color' => 'text-gray-500'],
|
||||
'bad' => ['label' => '下签', 'color' => 'text-orange-500'],
|
||||
'curse' => ['label' => '大凶签', 'color' => 'text-red-600'],
|
||||
];
|
||||
@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_times']) }}</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="text-2xl font-bold text-amber-500">{{ number_format($summary['grade_dist']['jackpot'] ?? 0) }}
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 mt-1">✨ 上上签次数</div>
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-amber-500">{{ number_format($summary['grade_dist']['jackpot'] ?? 0) }}</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-red-500">{{ number_format($summary['grade_dist']['curse'] ?? 0) }}</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="text-sm font-bold text-gray-700 mb-2">签文分布</div>
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="mb-2 text-sm font-bold text-gray-700">签文分布</div>
|
||||
<div class="space-y-1">
|
||||
@php
|
||||
$gradeAll = [
|
||||
'jackpot' => ['label' => '上上签', 'color' => 'text-amber-600'],
|
||||
'good' => ['label' => '上签', 'color' => 'text-emerald-600'],
|
||||
'normal' => ['label' => '中签', 'color' => 'text-gray-500'],
|
||||
'bad' => ['label' => '下签', 'color' => 'text-orange-500'],
|
||||
'curse' => ['label' => '大凶签', 'color' => 'text-red-600'],
|
||||
];
|
||||
@endphp
|
||||
@foreach ($gradeAll as $key => $meta)
|
||||
<div class="flex justify-between text-xs">
|
||||
<div class="flex items-center justify-between text-xs">
|
||||
<span class="{{ $meta['color'] }}">{{ $meta['label'] }}</span>
|
||||
<span class="font-bold text-gray-700">{{ $summary['grade_dist'][$key] ?? 0 }}</span>
|
||||
</div>
|
||||
@@ -54,107 +54,100 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 筛选 --}}
|
||||
<form method="GET"
|
||||
class="bg-white rounded-xl shadow-sm border border-gray-100 p-4 flex flex-wrap items-end gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">签文等级</label>
|
||||
<select name="grade"
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 min-w-[130px]">
|
||||
<option value="">全部等级</option>
|
||||
@foreach ($gradeAll as $key => $meta)
|
||||
<option value="{{ $key }}" {{ request('grade') === $key ? 'selected' : '' }}>
|
||||
{{ $meta['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="{{ $adminListFilterCardClass }}">
|
||||
<div class="{{ $adminListFilterInnerClass }}">
|
||||
<form method="GET" class="{{ $adminListFilterFormClass }}">
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">签文等级</label>
|
||||
<select name="grade" class="min-w-[130px] {{ $adminListFilterInputClass }}">
|
||||
<option value="">全部等级</option>
|
||||
@foreach ($gradeAll as $key => $meta)
|
||||
<option value="{{ $key }}" {{ request('grade') === $key ? 'selected' : '' }}>
|
||||
{{ $meta['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">玩家名称</label>
|
||||
<input type="text" name="username" value="{{ request('username') }}" placeholder="模糊搜索..."
|
||||
class="w-40 {{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
<button type="submit" class="{{ $adminListPrimaryButtonClass }}">筛选</button>
|
||||
<a href="{{ route('admin.game-history.fortune') }}" class="{{ $adminListSecondaryButtonClass }}">重置</a>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">玩家名称</label>
|
||||
<input type="text" name="username" value="{{ request('username') }}" placeholder="模糊搜索..."
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 w-40">
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button type="submit"
|
||||
class="px-5 py-2 bg-indigo-600 text-white rounded-lg font-bold hover:bg-indigo-700 transition text-sm">
|
||||
🔍 筛选
|
||||
</button>
|
||||
<a href="{{ route('admin.game-history.fortune') }}"
|
||||
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg font-bold hover:bg-gray-200 transition text-sm">
|
||||
重置
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</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-left text-xs font-bold text-gray-500 uppercase w-1/3">签文内容</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-right text-xs font-bold text-gray-500 uppercase">消耗金币</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($logs as $log)
|
||||
@php
|
||||
$gradeInfo = match ($log->grade) {
|
||||
'jackpot' => ['label' => '✨ 上上签', 'color' => 'bg-amber-100 text-amber-700'],
|
||||
'good' => ['label' => '🌸 上签', 'color' => 'bg-emerald-100 text-emerald-700'],
|
||||
'normal' => ['label' => '📜 中签', 'color' => 'bg-gray-100 text-gray-600'],
|
||||
'bad' => ['label' => '😞 下签', 'color' => 'bg-orange-100 text-orange-700'],
|
||||
'curse' => ['label' => '💀 大凶签', 'color' => 'bg-red-100 text-red-700'],
|
||||
default => ['label' => $log->grade, 'color' => 'bg-gray-100 text-gray-500'],
|
||||
};
|
||||
@endphp
|
||||
<tr
|
||||
class="hover:bg-gray-50 transition {{ in_array($log->grade, ['jackpot']) ? 'bg-amber-50/50' : (in_array($log->grade, ['curse']) ? 'bg-red-50/30' : '') }}">
|
||||
<td class="px-4 py-3 text-xs text-gray-400">
|
||||
{{ $log->created_at->format('m-d H:i') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $log->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold {{ $gradeInfo['color'] }}">
|
||||
{{ $gradeInfo['label'] }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-600 leading-relaxed">
|
||||
{{ \Illuminate\Support\Str::limit($log->text, 50) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-500">
|
||||
{{ $log->buff_desc ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($log->is_free)
|
||||
<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-right font-mono text-xs {{ $log->cost > 0 ? 'text-red-500' : 'text-gray-400' }}">
|
||||
{{ $log->cost > 0 ? '-' . number_format($log->cost) : '0' }}
|
||||
</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 }} w-1/3">签文内容</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">加成/减益</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">是否免费</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 ($logs as $log)
|
||||
@php
|
||||
$gradeInfo = match ($log->grade) {
|
||||
'jackpot' => ['label' => '✨ 上上签', 'color' => 'bg-amber-100 text-amber-700 border-amber-200'],
|
||||
'good' => ['label' => '🌸 上签', 'color' => 'bg-emerald-100 text-emerald-700 border-emerald-200'],
|
||||
'normal' => ['label' => '📜 中签', 'color' => 'bg-gray-100 text-gray-600 border-gray-200'],
|
||||
'bad' => ['label' => '😞 下签', 'color' => 'bg-orange-100 text-orange-700 border-orange-200'],
|
||||
'curse' => ['label' => '💀 大凶签', 'color' => 'bg-red-100 text-red-700 border-red-200'],
|
||||
default => ['label' => $log->grade, 'color' => 'bg-gray-100 text-gray-500 border-gray-200'],
|
||||
};
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }} {{ in_array($log->grade, ['jackpot']) ? 'bg-amber-50/50' : (in_array($log->grade, ['curse']) ? 'bg-red-50/30' : '') }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }}">
|
||||
{{ $log->created_at->format('m-d H:i') }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $log->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $gradeInfo['color'] }}">{{ $gradeInfo['label'] }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-xs leading-relaxed text-gray-600">
|
||||
{{ \Illuminate\Support\Str::limit($log->text, 50) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-xs text-gray-500">
|
||||
{{ $log->buff_desc ?? '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($log->is_free)
|
||||
<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-right {{ $adminListNumericTextClass }} {{ $log->cost > 0 ? 'text-red-500' : 'text-gray-400' }}">
|
||||
{{ $log->cost > 0 ? '-' . number_format($log->cost) : '0' }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($logs->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $logs->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,120 +3,122 @@
|
||||
@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">查询全站所有的五子棋人机及 PvP 对局。</p>
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">♟️ 五子棋历史记录</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">查询全站所有的五子棋人机及 PvP 对局。</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_games']) }}</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['completed']) }}</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['pvp_count']) }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">PvP 人人对战数</div>
|
||||
<div class="mt-1 text-xs text-gray-500">PvP 人人对战数</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['today_games']) }}</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">赛事ID</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-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-center text-xs font-bold text-gray-500 uppercase">胜负</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($games as $game)
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-gray-600 text-xs font-mono font-bold">#{{ $game->id }}</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-600">
|
||||
{{ $game->created_at ? $game->created_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($game->mode === 'pve')
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-purple-100 text-purple-700">单机
|
||||
PvE(L{{ $game->ai_level }})</span>
|
||||
@else
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold bg-blue-100 text-blue-700">在线
|
||||
PvP</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-bold">
|
||||
{{ $game->playerBlack?->username ?? '已注销/未知' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-bold">
|
||||
@if ($game->mode === 'pve')
|
||||
<span class="text-xs text-gray-400">AI 机器人</span>
|
||||
@else
|
||||
{{ $game->playerWhite?->username ?? '已注销/未加入' }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@php
|
||||
$s = match ($game->status) {
|
||||
'waiting' => ['label' => '等待中', 'bg' => 'bg-amber-100 text-amber-600'],
|
||||
'playing' => ['label' => '对弈中', 'bg' => 'bg-blue-100 text-blue-600'],
|
||||
'finished' => ['label' => '已结束', 'bg' => 'bg-emerald-100 text-emerald-700'],
|
||||
default => ['label' => $game->status, 'bg' => 'bg-gray-100 text-gray-600'],
|
||||
};
|
||||
@endphp
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold {{ $s['bg'] }}">{{ $s['label'] }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($game->status !== 'finished')
|
||||
<span class="text-xs text-gray-400">-</span>
|
||||
@else
|
||||
@if ($game->winner === 1)
|
||||
<span class="text-xs font-bold text-gray-800 bg-gray-200 px-2 py-1 rounded">⚫
|
||||
黑胜</span>
|
||||
@elseif($game->winner === 2)
|
||||
<span class="text-xs font-bold bg-white border border-gray-300 px-2 py-1 rounded">⚪
|
||||
白胜</span>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<div class="{{ $adminListSectionTitleClass }}">对局列表</div>
|
||||
<div class="{{ $adminListSectionDescClass }}">统一表格层次,保留 PvE/PvP、对局状态与胜负视觉语义。</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }}">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">赛事ID</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">创建时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">模式</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">黑方 (发起)</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">白方 (迎战)</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">胜负</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($games as $game)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }} font-mono">#{{ $game->id }}</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListBodyTextClass }}">
|
||||
{{ $game->created_at ? $game->created_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($game->mode === 'pve')
|
||||
<span class="{{ $badgeClass }} border-purple-200 bg-purple-100 text-purple-700">单机 PvE(L{{ $game->ai_level }})</span>
|
||||
@else
|
||||
<span
|
||||
class="text-xs font-bold text-gray-500 bg-gray-100 px-2 py-1 rounded">平局撤销</span>
|
||||
<span class="{{ $badgeClass }} border-blue-200 bg-blue-100 text-blue-700">在线 PvP</span>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-10 text-center text-gray-400 text-sm">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListPrimaryTextClass }}">
|
||||
{{ $game->playerBlack?->username ?? '已注销/未知' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListPrimaryTextClass }}">
|
||||
@if ($game->mode === 'pve')
|
||||
<span class="{{ $adminListSecondaryTextClass }}">AI 机器人</span>
|
||||
@else
|
||||
{{ $game->playerWhite?->username ?? '已注销/未加入' }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@php
|
||||
$s = match ($game->status) {
|
||||
'waiting' => ['label' => '等待中', 'bg' => 'bg-amber-100 text-amber-600 border-amber-200'],
|
||||
'playing' => ['label' => '对弈中', 'bg' => 'bg-blue-100 text-blue-600 border-blue-200'],
|
||||
'finished' => ['label' => '已结束', 'bg' => 'bg-emerald-100 text-emerald-700 border-emerald-200'],
|
||||
default => ['label' => $game->status, 'bg' => 'bg-gray-100 text-gray-600 border-gray-200'],
|
||||
};
|
||||
@endphp
|
||||
<span class="{{ $badgeClass }} {{ $s['bg'] }}">{{ $s['label'] }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($game->status !== 'finished')
|
||||
<span class="{{ $adminListSecondaryTextClass }}">-</span>
|
||||
@else
|
||||
@if ($game->winner === 1)
|
||||
<span class="{{ $badgeClass }} border-gray-300 bg-gray-200 text-gray-800">⚫ 黑胜</span>
|
||||
@elseif ($game->winner === 2)
|
||||
<span class="{{ $badgeClass }} border-gray-300 bg-white text-gray-700">⚪ 白胜</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} border-gray-200 bg-gray-100 text-gray-500">平局撤销</span>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($games->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $games->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,43 +3,44 @@
|
||||
@section('title', "赛马第 #{$race->id} 场下注明细")
|
||||
|
||||
@section('content')
|
||||
<div class="space-y-6">
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
{{-- 页头 --}}
|
||||
@php
|
||||
$horses = $race->horses ?? [];
|
||||
$winner = collect($horses)->firstWhere('id', $race->winner_horse_id);
|
||||
@endphp
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 flex justify-between items-center">
|
||||
@php
|
||||
$horses = $race->horses ?? [];
|
||||
$winner = collect($horses)->firstWhere('id', $race->winner_horse_id);
|
||||
$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">🐎 赛马 #{{ $race->id }} 场下注明细</h2>
|
||||
<p class="text-xs text-gray-500 mt-1">
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">🐎 赛马 #{{ $race->id }} 场下注明细</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
结算时间:{{ $race->settled_at?->format('Y-m-d H:i:s') ?? '未结算' }}
|
||||
@if ($winner)
|
||||
· 胜者:<span class="font-bold text-indigo-600">{{ $winner['emoji'] ?? '' }}
|
||||
{{ $winner['name'] ?? '' }}</span>
|
||||
· 胜者:<span class="font-semibold text-indigo-600">{{ $winner['emoji'] ?? '' }} {{ $winner['name'] ?? '' }}</span>
|
||||
@endif
|
||||
· 注池:<span class="font-bold text-amber-600">{{ number_format($race->total_pool ?? 0) }}
|
||||
金币</span>
|
||||
· 注池:<span class="font-semibold text-amber-600">{{ number_format($race->total_pool ?? 0) }} 金币</span>
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.game-history.horse') }}"
|
||||
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-history.horse') }}" class="{{ $adminListSecondaryButtonClass }}">
|
||||
← 返回场次列表
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- 马匹信息 --}}
|
||||
@if (count($horses) > 0)
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="text-sm font-bold text-gray-700 mb-3">参赛马匹</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<div class="{{ $adminListSectionTitleClass }}">参赛马匹</div>
|
||||
<div class="{{ $adminListSectionDescClass }}">保留冠军高亮,仅统一容器与间距风格。</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3 p-6">
|
||||
@foreach ($horses as $horse)
|
||||
<div
|
||||
class="px-4 py-2 rounded-lg {{ $horse['id'] === $race->winner_horse_id ? 'bg-amber-100 border-2 border-amber-400' : 'bg-gray-100' }}">
|
||||
class="rounded-lg border px-4 py-3 {{ $horse['id'] === $race->winner_horse_id ? 'border-amber-400 bg-amber-100' : 'border-gray-200 bg-gray-50' }}">
|
||||
<div class="text-lg">{{ $horse['emoji'] ?? '🐎' }}</div>
|
||||
<div
|
||||
class="text-xs font-bold {{ $horse['id'] === $race->winner_horse_id ? 'text-amber-700' : 'text-gray-600' }}">
|
||||
<div class="mt-1 text-xs font-bold {{ $horse['id'] === $race->winner_horse_id ? 'text-amber-700' : 'text-gray-600' }}">
|
||||
{{ $horse['name'] }}
|
||||
@if ($horse['id'] === $race->winner_horse_id)
|
||||
🏆
|
||||
@@ -51,71 +52,72 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- 下注明细表 --}}
|
||||
<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-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-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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($bets as $bet)
|
||||
@php
|
||||
$betHorse = collect($horses)->firstWhere('id', $bet->horse_id);
|
||||
$isWinner = $bet->horse_id === $race->winner_horse_id;
|
||||
$won = ($bet->payout ?? 0) > 0;
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition {{ $won ? 'bg-amber-50/50' : '' }}">
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($betHorse)
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold {{ $isWinner ? 'bg-amber-100 text-amber-700' : 'bg-gray-100 text-gray-600' }}">
|
||||
{{ $betHorse['emoji'] ?? '' }} {{ $betHorse['name'] ?? '' }}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-gray-400 text-xs">#{{ $bet->horse_id }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-sm text-gray-700">
|
||||
{{ number_format($bet->amount) }}
|
||||
</td>
|
||||
<td
|
||||
class="px-4 py-3 text-right font-mono text-sm {{ $won ? 'text-emerald-600 font-bold' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($won)
|
||||
<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-gray-100 text-gray-500">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right text-xs text-gray-400">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</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 }} text-center">押注马匹</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">押注金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">实际获得</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">是否中奖</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">下注时间</th>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-10 text-center text-gray-400 text-sm">本场无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($bets as $bet)
|
||||
@php
|
||||
$betHorse = collect($horses)->firstWhere('id', $bet->horse_id);
|
||||
$isWinner = $bet->horse_id === $race->winner_horse_id;
|
||||
$won = ($bet->payout ?? 0) > 0;
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }} {{ $won ? 'bg-amber-50/50' : '' }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $bet->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($betHorse)
|
||||
<span class="{{ $badgeClass }} {{ $isWinner ? 'border-amber-200 bg-amber-100 text-amber-700' : 'border-gray-200 bg-gray-100 text-gray-600' }}">
|
||||
{{ $betHorse['emoji'] ?? '' }} {{ $betHorse['name'] ?? '' }}
|
||||
</span>
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">#{{ $bet->horse_id }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-700">
|
||||
{{ number_format($bet->amount) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $won ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($bet->payout) : '0' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($won)
|
||||
<span class="{{ $badgeClass }} border-emerald-200 bg-emerald-100 text-emerald-700">🎉 中奖</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} border-gray-200 bg-gray-100 text-gray-500">未中</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListSecondaryTextClass }}">
|
||||
{{ $bet->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="{{ $adminListEmptyClass }}">本场无人下注</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($bets->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $bets->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,108 +3,115 @@
|
||||
@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-3 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-3">
|
||||
<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_races']) }}</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_bets']) }}</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['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">场次ID</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-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 ($races as $race)
|
||||
@php
|
||||
$horses = $race->horses ?? [];
|
||||
$winner = collect($horses)->firstWhere('id', $race->winner_horse_id);
|
||||
$statusLabel = match ($race->status) {
|
||||
'betting' => ['label' => '押注中', 'color' => 'bg-blue-100 text-blue-700'],
|
||||
'running' => ['label' => '比赛中', 'color' => 'bg-amber-100 text-amber-700'],
|
||||
'settled' => ['label' => '已结算', 'color' => 'bg-emerald-100 text-emerald-700'],
|
||||
'canceled' => ['label' => '已取消', 'color' => 'bg-red-100 text-red-600'],
|
||||
default => ['label' => $race->status, 'color' => 'bg-gray-100 text-gray-500'],
|
||||
};
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-gray-400 text-xs font-mono">#{{ $race->id }}</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-600">
|
||||
{{ $race->settled_at ? $race->settled_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-sm">
|
||||
{{ collect($horses)->pluck('emoji')->implode('') ?: '—' }}
|
||||
<span class="text-xs text-gray-400">({{ count($horses) }} 匹)</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-bold text-indigo-700">
|
||||
@if ($winner)
|
||||
{{ $winner['emoji'] ?? '' }} {{ $winner['name'] ?? '' }}
|
||||
@else
|
||||
<span class="text-gray-400">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold {{ $statusLabel['color'] }}">
|
||||
{{ $statusLabel['label'] }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-indigo-600 font-bold">
|
||||
{{ number_format($race->total_bets ?? 0) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-amber-600 font-bold">
|
||||
{{ number_format($race->total_pool ?? 0) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<a href="{{ route('admin.game-history.horse.race', $race->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 }}">场次ID</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">结算时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">参赛马匹</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="8" class="px-4 py-10 text-center text-gray-400 text-sm">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($races as $race)
|
||||
@php
|
||||
$horses = $race->horses ?? [];
|
||||
$winner = collect($horses)->firstWhere('id', $race->winner_horse_id);
|
||||
$statusLabel = match ($race->status) {
|
||||
'betting' => ['label' => '押注中', 'color' => 'bg-blue-100 text-blue-700 border-blue-200'],
|
||||
'running' => ['label' => '比赛中', 'color' => 'bg-amber-100 text-amber-700 border-amber-200'],
|
||||
'settled' => ['label' => '已结算', 'color' => 'bg-emerald-100 text-emerald-700 border-emerald-200'],
|
||||
'canceled' => ['label' => '已取消', 'color' => 'bg-red-100 text-red-600 border-red-200'],
|
||||
default => ['label' => $race->status, 'color' => 'bg-gray-100 text-gray-500 border-gray-200'],
|
||||
};
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }} font-mono">#{{ $race->id }}</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListBodyTextClass }}">
|
||||
{{ $race->settled_at ? $race->settled_at->format('m-d H:i') : '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListBodyTextClass }}">
|
||||
{{ collect($horses)->pluck('emoji')->implode('') ?: '—' }}
|
||||
<span class="{{ $adminListSecondaryTextClass }}">({{ count($horses) }} 匹)</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center font-semibold text-indigo-700">
|
||||
@if ($winner)
|
||||
{{ $winner['emoji'] ?? '' }} {{ $winner['name'] ?? '' }}
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $statusLabel['color'] }}">{{ $statusLabel['label'] }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold text-indigo-600">
|
||||
{{ number_format($race->total_bets ?? 0) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold text-amber-600">
|
||||
{{ number_format($race->total_pool ?? 0) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right">
|
||||
<a href="{{ route('admin.game-history.horse.race', $race->id) }}"
|
||||
class="{{ $adminListActionButtonClass }} bg-indigo-50 text-indigo-700 hover:bg-indigo-100">
|
||||
下注明细
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($races->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $races->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,117 +3,111 @@
|
||||
@section('title', "双色球第 {$issue->issue_no} 期购买明细")
|
||||
|
||||
@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">🎟️ 双色球 第 {{ $issue->issue_no }} 期购买明细</h2>
|
||||
<p class="text-xs text-gray-500 mt-1">
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">🎟️ 双色球第 {{ $issue->issue_no }} 期购买明细</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
开奖时间:{{ $issue->draw_at?->format('Y-m-d H:i:s') ?? '未开奖' }}
|
||||
@if ($issue->status === 'settled')
|
||||
· 开奖号码:
|
||||
<span class="font-bold text-indigo-600">
|
||||
<span
|
||||
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red1, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red2, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="bg-red-100 text-red-600 px-1 rounded">{{ str_pad($issue->red3, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="bg-blue-100 text-blue-600 px-1 rounded">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="inline-flex items-center gap-1 font-semibold text-indigo-600">
|
||||
<span class="rounded border border-red-200 bg-red-100 px-1.5 py-0.5 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-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-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-blue-600">{{ str_pad($issue->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
</span>
|
||||
@endif
|
||||
· 奖池:<span class="font-bold text-amber-600">{{ number_format($issue->pool_amount ?? 0) }}
|
||||
金币</span>
|
||||
· 奖池:<span class="font-semibold text-amber-600">{{ number_format($issue->pool_amount ?? 0) }} 金币</span>
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.game-history.lottery') }}"
|
||||
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-history.lottery') }}" class="{{ $adminListSecondaryButtonClass }}">
|
||||
← 返回期号列表
|
||||
</a>
|
||||
</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-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-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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($tickets as $ticket)
|
||||
@php
|
||||
$won = ($ticket->payout ?? 0) > 0;
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition {{ $won ? 'bg-amber-50/50' : '' }}">
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $ticket->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center font-mono">
|
||||
<div class="flex items-center justify-center gap-1 flex-wrap">
|
||||
<span
|
||||
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red1, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red2, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-red-50 text-red-500 px-1 rounded shadow-sm border border-red-100">{{ str_pad($ticket->red3, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span
|
||||
class="text-xs bg-blue-50 text-blue-500 px-1 rounded shadow-sm border border-blue-100">{{ str_pad($ticket->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($ticket->is_quick_pick)
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-purple-100 text-purple-700">随机机选</span>
|
||||
@else
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-blue-100 text-blue-700">自选号码</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-sm text-gray-700">
|
||||
{{ number_format($ticket->amount) }}
|
||||
</td>
|
||||
<td
|
||||
class="px-4 py-3 text-right font-mono text-sm {{ $won ? 'text-emerald-600 font-bold' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($ticket->payout) : '0' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($issue->status === 'settled')
|
||||
@if ($won)
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-amber-100 text-amber-700">
|
||||
🎉 {{ $ticket->prize_level }}等奖
|
||||
</span>
|
||||
<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 }} 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-center">中奖等级</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">下注时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($tickets as $ticket)
|
||||
@php
|
||||
$won = ($ticket->payout ?? 0) > 0;
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }} {{ $won ? 'bg-amber-50/50' : '' }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $ticket->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListNumericTextClass }}">
|
||||
<div class="flex flex-wrap items-center justify-center gap-1">
|
||||
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red1, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red2, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-red-100 bg-red-50 px-1.5 py-0.5 text-xs text-red-500">{{ str_pad($ticket->red3, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="rounded border border-blue-100 bg-blue-50 px-1.5 py-0.5 text-xs text-blue-500">{{ str_pad($ticket->blue, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($ticket->is_quick_pick)
|
||||
<span class="{{ $badgeClass }} border-purple-200 bg-purple-100 text-purple-700">随机机选</span>
|
||||
@else
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold bg-gray-100 text-gray-500">未中奖</span>
|
||||
<span class="{{ $badgeClass }} border-blue-200 bg-blue-100 text-blue-700">自选号码</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-xs text-gray-400">等待开奖</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right text-xs text-gray-400">
|
||||
{{ $ticket->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-10 text-center text-gray-400 text-sm">本期暂无人购买</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-gray-700">
|
||||
{{ number_format($ticket->amount) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $won ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
|
||||
{{ $won ? '+' . number_format($ticket->payout) : '0' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
@if ($issue->status === 'settled')
|
||||
@if ($won)
|
||||
<span class="{{ $badgeClass }} border-amber-200 bg-amber-100 text-amber-700">🎉 {{ $ticket->prize_level }}等奖</span>
|
||||
@else
|
||||
<span class="{{ $badgeClass }} border-gray-200 bg-gray-100 text-gray-500">未中奖</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">等待开奖</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListSecondaryTextClass }}">
|
||||
{{ $ticket->created_at->format('H:i:s') }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">本期暂无人购买</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($tickets->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $tickets->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,46 +3,49 @@
|
||||
@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_dropped']) }}</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-emerald-50 rounded-xl shadow-sm border border-emerald-100 p-5">
|
||||
<div class="rounded-xl border border-emerald-100 bg-emerald-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-emerald-600">{{ number_format($summary['total_claimed']) }}</div>
|
||||
<div class="text-xs text-emerald-500 mt-1">已被领取</div>
|
||||
<div class="mt-1 text-xs text-emerald-500">已被领取</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 rounded-xl shadow-sm border border-gray-200 p-5">
|
||||
<div class="rounded-xl border border-gray-200 bg-gray-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-gray-500">{{ number_format($summary['total_expired']) }}</div>
|
||||
<div class="text-xs text-gray-400 mt-1">已过期/未领取</div>
|
||||
<div class="mt-1 text-xs text-gray-400">已过期/未领取</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="text-sm font-bold text-gray-700 mb-2">类型分布</div>
|
||||
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
|
||||
<div class="mb-2 text-sm font-bold text-gray-700">类型分布</div>
|
||||
<div class="space-y-1">
|
||||
<div class="flex justify-between text-xs">
|
||||
<div class="flex items-center justify-between text-xs">
|
||||
<span class="text-gray-500">📦 普通箱</span>
|
||||
<span class="font-bold">{{ $summary['type_dist']['normal'] ?? 0 }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-xs">
|
||||
<div class="flex items-center justify-between text-xs">
|
||||
<span class="text-gray-500">💎 稀有箱</span>
|
||||
<span class="font-bold text-purple-600">{{ $summary['type_dist']['rare'] ?? 0 }}</span>
|
||||
</div>
|
||||
<div class="flex justify-between text-xs">
|
||||
<div class="flex items-center justify-between text-xs">
|
||||
<span class="text-gray-500">☠️ 黑化箱</span>
|
||||
<span class="font-bold text-red-600">{{ $summary['type_dist']['trap'] ?? 0 }}</span>
|
||||
</div>
|
||||
@@ -50,122 +53,115 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 筛选条件 --}}
|
||||
<form method="GET"
|
||||
class="bg-white rounded-xl shadow-sm border border-gray-100 p-4 flex flex-wrap items-end gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">箱子类型</label>
|
||||
<select name="box_type"
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 min-w-[130px]">
|
||||
<option value="">全部类型</option>
|
||||
<option value="normal" {{ request('box_type') === 'normal' ? 'selected' : '' }}>📦 普通箱</option>
|
||||
<option value="rare" {{ request('box_type') === 'rare' ? 'selected' : '' }}>💎 稀有箱</option>
|
||||
<option value="trap" {{ request('box_type') === 'trap' ? 'selected' : '' }}>☠️ 黑化箱</option>
|
||||
</select>
|
||||
<div class="{{ $adminListFilterCardClass }}">
|
||||
<div class="{{ $adminListFilterInnerClass }}">
|
||||
<form method="GET" class="{{ $adminListFilterFormClass }}">
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">箱子类型</label>
|
||||
<select name="box_type" class="min-w-[130px] {{ $adminListFilterInputClass }}">
|
||||
<option value="">全部类型</option>
|
||||
<option value="normal" {{ request('box_type') === 'normal' ? 'selected' : '' }}>📦 普通箱</option>
|
||||
<option value="rare" {{ request('box_type') === 'rare' ? 'selected' : '' }}>💎 稀有箱</option>
|
||||
<option value="trap" {{ request('box_type') === 'trap' ? 'selected' : '' }}>☠️ 黑化箱</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">状态</label>
|
||||
<select name="status" class="min-w-[120px] {{ $adminListFilterInputClass }}">
|
||||
<option value="">全部状态</option>
|
||||
<option value="open" {{ request('status') === 'open' ? 'selected' : '' }}>等待领取</option>
|
||||
<option value="claimed" {{ request('status') === 'claimed' ? 'selected' : '' }}>已领取</option>
|
||||
<option value="expired" {{ request('status') === 'expired' ? 'selected' : '' }}>已过期</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="{{ $adminListPrimaryButtonClass }}">筛选</button>
|
||||
<a href="{{ route('admin.game-history.mystery-box') }}" class="{{ $adminListSecondaryButtonClass }}">重置</a>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">状态</label>
|
||||
<select name="status"
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 min-w-[120px]">
|
||||
<option value="">全部状态</option>
|
||||
<option value="open" {{ request('status') === 'open' ? 'selected' : '' }}>等待领取</option>
|
||||
<option value="claimed" {{ request('status') === 'claimed' ? 'selected' : '' }}>已领取</option>
|
||||
<option value="expired" {{ request('status') === 'expired' ? 'selected' : '' }}>已过期</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button type="submit"
|
||||
class="px-5 py-2 bg-indigo-600 text-white rounded-lg font-bold hover:bg-indigo-700 transition text-sm">
|
||||
🔍 筛选
|
||||
</button>
|
||||
<a href="{{ route('admin.game-history.mystery-box') }}"
|
||||
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg font-bold hover:bg-gray-200 transition text-sm">
|
||||
重置
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</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-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-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-left 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-left text-xs font-bold text-gray-500 uppercase">领取时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-50">
|
||||
@forelse ($boxes as $box)
|
||||
@php
|
||||
$typeInfo = match ($box->box_type) {
|
||||
'normal' => ['label' => '📦 普通箱', 'color' => 'bg-emerald-100 text-emerald-700'],
|
||||
'rare' => ['label' => '💎 稀有箱', 'color' => 'bg-purple-100 text-purple-700'],
|
||||
'trap' => ['label' => '☠️ 黑化箱', 'color' => 'bg-red-100 text-red-700'],
|
||||
default => ['label' => '📦 未知', 'color' => 'bg-gray-100 text-gray-600'],
|
||||
};
|
||||
$statusInfo = match ($box->status) {
|
||||
'open' => ['label' => '等待领取', 'color' => 'bg-blue-100 text-blue-700'],
|
||||
'claimed' => ['label' => '✅ 已领取', 'color' => 'bg-emerald-100 text-emerald-700'],
|
||||
'expired' => ['label' => '⏰ 已过期', 'color' => 'bg-gray-100 text-gray-500'],
|
||||
default => ['label' => $box->status, 'color' => 'bg-gray-100 text-gray-500'],
|
||||
};
|
||||
$claim = $box->claim;
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-xs text-gray-400">
|
||||
{{ $box->created_at->format('m-d H:i:s') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold {{ $typeInfo['color'] }}">
|
||||
{{ $typeInfo['label'] }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-xs text-gray-600 font-mono">
|
||||
{{ number_format($box->reward_min) }} ~ {{ number_format($box->reward_max) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<code class="bg-gray-100 px-2 py-0.5 rounded text-xs text-indigo-700 font-bold">
|
||||
{{ $box->passcode ?? '—' }}
|
||||
</code>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="px-2 py-0.5 rounded-full text-xs font-bold {{ $statusInfo['color'] }}">
|
||||
{{ $statusInfo['label'] }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 font-medium text-gray-700 text-sm">
|
||||
{{ $claim?->user?->username ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs">
|
||||
@if ($claim)
|
||||
<span
|
||||
class="{{ $claim->reward_amount > 0 ? 'text-emerald-600 font-bold' : 'text-red-500 font-bold' }}">
|
||||
{{ $claim->reward_amount > 0 ? '+' : '' }}{{ number_format($claim->reward_amount) }}
|
||||
</span>
|
||||
@else
|
||||
<span class="text-gray-400">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-xs text-gray-400">
|
||||
{{ $claim?->created_at?->format('m-d H:i:s') ?? '—' }}
|
||||
</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 }} text-center">类型</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">奖励范围</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">暗号</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">领取者</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">实际奖励</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">领取时间</th>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="px-4 py-10 text-center text-gray-400 text-sm">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($boxes as $box)
|
||||
@php
|
||||
$typeInfo = match ($box->box_type) {
|
||||
'normal' => ['label' => '📦 普通箱', 'color' => 'bg-emerald-100 text-emerald-700 border-emerald-200'],
|
||||
'rare' => ['label' => '💎 稀有箱', 'color' => 'bg-purple-100 text-purple-700 border-purple-200'],
|
||||
'trap' => ['label' => '☠️ 黑化箱', 'color' => 'bg-red-100 text-red-700 border-red-200'],
|
||||
default => ['label' => '📦 未知', 'color' => 'bg-gray-100 text-gray-600 border-gray-200'],
|
||||
};
|
||||
$statusInfo = match ($box->status) {
|
||||
'open' => ['label' => '等待领取', 'color' => 'bg-blue-100 text-blue-700 border-blue-200'],
|
||||
'claimed' => ['label' => '✅ 已领取', 'color' => 'bg-emerald-100 text-emerald-700 border-emerald-200'],
|
||||
'expired' => ['label' => '⏰ 已过期', 'color' => 'bg-gray-100 text-gray-500 border-gray-200'],
|
||||
default => ['label' => $box->status, 'color' => 'bg-gray-100 text-gray-500 border-gray-200'],
|
||||
};
|
||||
$claim = $box->claim;
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }}">
|
||||
{{ $box->created_at->format('m-d H:i:s') }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $typeInfo['color'] }}">{{ $typeInfo['label'] }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center {{ $adminListNumericTextClass }} text-gray-600">
|
||||
{{ number_format($box->reward_min) }} ~ {{ number_format($box->reward_max) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<code class="rounded bg-gray-100 px-2 py-0.5 text-xs font-bold text-indigo-700">
|
||||
{{ $box->passcode ?? '—' }}
|
||||
</code>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $statusInfo['color'] }}">{{ $statusInfo['label'] }}</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $claim?->user?->username ?? '—' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }}">
|
||||
@if ($claim)
|
||||
<span class="{{ $claim->reward_amount > 0 ? 'font-semibold text-emerald-600' : 'font-semibold text-red-500' }}">
|
||||
{{ $claim->reward_amount > 0 ? '+' : '' }}{{ number_format($claim->reward_amount) }}
|
||||
</span>
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }}">
|
||||
{{ $claim?->created_at?->format('m-d H:i:s') ?? '—' }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($boxes->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $boxes->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -3,167 +3,175 @@
|
||||
@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;
|
||||
$resultLabels = [
|
||||
'jackpot' => ['label' => '🎉 三个7', 'color' => 'bg-yellow-100 text-yellow-700 border-yellow-200'],
|
||||
'triple_gem' => ['label' => '💎 三钻', 'color' => 'bg-blue-100 text-blue-700 border-blue-200'],
|
||||
'triple' => ['label' => '✨ 三同', 'color' => 'bg-green-100 text-green-700 border-green-200'],
|
||||
'pair' => ['label' => '🎁 两同', 'color' => 'bg-indigo-100 text-indigo-700 border-indigo-200'],
|
||||
'curse' => ['label' => '☠️ 三骷髅', 'color' => 'bg-red-100 text-red-700 border-red-200'],
|
||||
'miss' => ['label' => '😔 未中奖', 'color' => 'bg-gray-100 text-gray-600 border-gray-200'],
|
||||
];
|
||||
@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-5 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-5">
|
||||
<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_spins']) }}</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-red-500">{{ number_format($summary['total_cost']) }}</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['total_payout']) }}</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['net_income']) }}</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-yellow-50 rounded-xl shadow-sm border border-yellow-100 p-5">
|
||||
<div class="text-2xl font-bold text-yellow-600">{{ number_format($summary['result_dist']['jackpot'] ?? 0) }}
|
||||
</div>
|
||||
<div class="text-xs text-yellow-500 mt-1">🎉 三7大奖次数</div>
|
||||
<div class="rounded-xl border border-yellow-100 bg-yellow-50 p-5 shadow-sm">
|
||||
<div class="text-2xl font-bold text-yellow-600">{{ number_format($summary['result_dist']['jackpot'] ?? 0) }}</div>
|
||||
<div class="mt-1 text-xs text-yellow-500">🎉 三7大奖次数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 结果分布 --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5">
|
||||
<div class="text-sm font-bold text-gray-700 mb-3">结果类型分布</div>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
@php
|
||||
$resultLabels = [
|
||||
'jackpot' => ['label' => '🎉 三个7', 'color' => 'bg-yellow-100 text-yellow-700'],
|
||||
'triple_gem' => ['label' => '💎 三钻', 'color' => 'bg-blue-100 text-blue-700'],
|
||||
'triple' => ['label' => '✨ 三同', 'color' => 'bg-green-100 text-green-700'],
|
||||
'pair' => ['label' => '🎁 两同', 'color' => 'bg-indigo-100 text-indigo-700'],
|
||||
'curse' => ['label' => '☠️ 三骷髅', 'color' => 'bg-red-100 text-red-700'],
|
||||
'miss' => ['label' => '😔 未中奖', 'color' => 'bg-gray-100 text-gray-600'],
|
||||
];
|
||||
@endphp
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<div class="{{ $adminListSectionTitleClass }}">结果类型分布</div>
|
||||
<div class="{{ $adminListSectionDescClass }}">保留中奖结果配色,仅统一卡片容器与排版节奏。</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-3 p-6">
|
||||
@foreach ($resultLabels as $key => $meta)
|
||||
<div class="px-4 py-2 rounded-lg {{ $meta['color'] }}">
|
||||
@php
|
||||
$distributionBorderClass = match ($key) {
|
||||
'jackpot' => 'border-yellow-200',
|
||||
'triple_gem' => 'border-blue-200',
|
||||
'triple' => 'border-green-200',
|
||||
'pair' => 'border-indigo-200',
|
||||
'curse' => 'border-red-200',
|
||||
default => 'border-gray-200',
|
||||
};
|
||||
@endphp
|
||||
<div class="rounded-lg border px-4 py-2 {{ $distributionBorderClass }} {{ $meta['color'] }}">
|
||||
<div class="text-sm font-bold">{{ $meta['label'] }}</div>
|
||||
<div class="text-xs mt-0.5">{{ number_format($summary['result_dist'][$key] ?? 0) }} 次</div>
|
||||
<div class="mt-0.5 text-xs">{{ number_format($summary['result_dist'][$key] ?? 0) }} 次</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 筛选条件 --}}
|
||||
<form method="GET"
|
||||
class="bg-white rounded-xl shadow-sm border border-gray-100 p-4 flex flex-wrap items-end gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">结果类型</label>
|
||||
<select name="result_type"
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 min-w-[140px]">
|
||||
<option value="">全部结果</option>
|
||||
@foreach ($resultLabels as $key => $meta)
|
||||
<option value="{{ $key }}" {{ request('result_type') === $key ? 'selected' : '' }}>
|
||||
{{ $meta['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="{{ $adminListFilterCardClass }}">
|
||||
<div class="{{ $adminListFilterInnerClass }}">
|
||||
<form method="GET" class="{{ $adminListFilterFormClass }}">
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">结果类型</label>
|
||||
<select name="result_type" class="min-w-[140px] {{ $adminListFilterInputClass }}">
|
||||
<option value="">全部结果</option>
|
||||
@foreach ($resultLabels as $key => $meta)
|
||||
<option value="{{ $key }}" {{ request('result_type') === $key ? 'selected' : '' }}>
|
||||
{{ $meta['label'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="{{ $adminListFilterLabelClass }}">玩家名称</label>
|
||||
<input type="text" name="username" value="{{ request('username') }}" placeholder="模糊搜索..."
|
||||
class="w-40 {{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
<button type="submit" class="{{ $adminListPrimaryButtonClass }}">筛选</button>
|
||||
<a href="{{ route('admin.game-history.slot') }}" class="{{ $adminListSecondaryButtonClass }}">重置</a>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">玩家名称</label>
|
||||
<input type="text" name="username" value="{{ request('username') }}" placeholder="模糊搜索..."
|
||||
class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:border-indigo-400 w-40">
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button type="submit"
|
||||
class="px-5 py-2 bg-indigo-600 text-white rounded-lg font-bold hover:bg-indigo-700 transition text-sm">
|
||||
🔍 筛选
|
||||
</button>
|
||||
<a href="{{ route('admin.game-history.slot') }}"
|
||||
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg font-bold hover:bg-gray-200 transition text-sm">
|
||||
重置
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</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 ($logs as $log)
|
||||
@php
|
||||
$symbols = \App\Models\SlotMachineLog::symbols();
|
||||
$r1Emoji = $symbols[$log->reel1]['emoji'] ?? $log->reel1;
|
||||
$r2Emoji = $symbols[$log->reel2]['emoji'] ?? $log->reel2;
|
||||
$r3Emoji = $symbols[$log->reel3]['emoji'] ?? $log->reel3;
|
||||
$net = $log->payout - $log->cost;
|
||||
$rowBg = match ($log->result_type) {
|
||||
'jackpot' => 'bg-yellow-50',
|
||||
'triple_gem' => 'bg-blue-50',
|
||||
'curse' => 'bg-red-50',
|
||||
default => '',
|
||||
};
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50 transition {{ $rowBg }}">
|
||||
<td class="px-4 py-3 text-xs text-gray-400">
|
||||
{{ $log->created_at->format('m-d H:i:s') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 font-medium text-gray-800">
|
||||
{{ $log->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-lg tracking-widest">
|
||||
{{ $r1Emoji }} {{ $r2Emoji }} {{ $r3Emoji }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span
|
||||
class="px-2 py-0.5 rounded-full text-xs font-bold {{ $resultLabels[$log->result_type]['color'] ?? 'bg-gray-100 text-gray-600' }}">
|
||||
{{ $resultLabels[$log->result_type]['label'] ?? $log->result_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-mono text-xs text-red-500">
|
||||
-{{ number_format($log->cost) }}
|
||||
</td>
|
||||
<td
|
||||
class="px-4 py-3 text-right font-mono text-xs {{ $log->payout > 0 ? 'text-emerald-600 font-bold' : 'text-gray-400' }}">
|
||||
{{ $log->payout > 0 ? '+' . number_format($log->payout) : '0' }}
|
||||
</td>
|
||||
<td
|
||||
class="px-4 py-3 text-right font-mono text-xs {{ $net >= 0 ? 'text-emerald-600' : 'text-red-500' }} font-bold">
|
||||
{{ $net >= 0 ? '+' : '' }}{{ number_format($net) }}
|
||||
</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 ($logs as $log)
|
||||
@php
|
||||
$symbols = \App\Models\SlotMachineLog::symbols();
|
||||
$r1Emoji = $symbols[$log->reel1]['emoji'] ?? $log->reel1;
|
||||
$r2Emoji = $symbols[$log->reel2]['emoji'] ?? $log->reel2;
|
||||
$r3Emoji = $symbols[$log->reel3]['emoji'] ?? $log->reel3;
|
||||
$net = $log->payout - $log->cost;
|
||||
$rowBg = match ($log->result_type) {
|
||||
'jackpot' => 'bg-yellow-50',
|
||||
'triple_gem' => 'bg-blue-50',
|
||||
'curse' => 'bg-red-50',
|
||||
default => '',
|
||||
};
|
||||
@endphp
|
||||
<tr class="{{ $adminListTableRowClass }} {{ $rowBg }}">
|
||||
<td class="{{ $tableCellClass }} {{ $adminListSecondaryTextClass }}">
|
||||
{{ $log->created_at->format('m-d H:i:s') }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} {{ $adminListPrimaryTextClass }}">
|
||||
{{ $log->user?->username ?? '已注销' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center text-lg tracking-widest">
|
||||
{{ $r1Emoji }} {{ $r2Emoji }} {{ $r3Emoji }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-center">
|
||||
<span class="{{ $badgeClass }} {{ $resultLabels[$log->result_type]['color'] ?? 'bg-gray-100 text-gray-600 border-gray-200' }}">
|
||||
{{ $resultLabels[$log->result_type]['label'] ?? $log->result_type }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} text-red-500">
|
||||
-{{ number_format($log->cost) }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} {{ $log->payout > 0 ? 'font-semibold text-emerald-600' : 'text-gray-400' }}">
|
||||
{{ $log->payout > 0 ? '+' . number_format($log->payout) : '0' }}
|
||||
</td>
|
||||
<td class="{{ $tableCellClass }} text-right {{ $adminListNumericTextClass }} font-semibold {{ $net >= 0 ? 'text-emerald-600' : 'text-red-500' }}">
|
||||
{{ $net >= 0 ? '+' : '' }}{{ number_format($net) }}
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($logs->hasPages())
|
||||
<div class="px-4 py-3 border-t border-gray-100">
|
||||
<div class="{{ $adminListPaginationClass }}">
|
||||
{{ $logs->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user