feat(chat): 完善五子棋功能,包含AI对战、PvP邀请、断线重连及界面美化

This commit is contained in:
2026-03-12 08:35:21 +08:00
parent b9c703b755
commit 1c42f05e20
17 changed files with 2740 additions and 6 deletions
@@ -23,6 +23,7 @@
'fortune_telling' => \App\Models\GameConfig::isEnabled('fortune_telling'),
'fishing' => \App\Models\GameConfig::isEnabled('fishing'),
'lottery' => \App\Models\GameConfig::isEnabled('lottery'),
'gomoku' => \App\Models\GameConfig::isEnabled('gomoku'),
];
@endphp
<script>
@@ -301,6 +302,24 @@
btnLabel: (data) => data?.is_open ? '🎟️ 立即购票' : '📊 查看结果',
},
{
id: 'gomoku',
name: '♟️ 五子棋',
desc: '益智对弈,支持 PvP 随机对战和 AI 人机对战(4档难度)',
accentColor: '#1e3a5f',
fetchUrl: null,
openFn: () => {
closeGameHall();
if (typeof openGomokuPanel === 'function') openGomokuPanel();
},
renderStatus: () => ({
badge: '♟️ 随时对弈',
badgeStyle: 'background:#e8eef8; color:#1e3a5f; border:1px solid #9db3d4',
detail: 'PvP 胜利 +80 金币 | AI 专家难度胜利 +300 金币',
}),
btnLabel: () => '♟️ 开始对弈',
},
];