修复:排行榜/留言板缺失布局、退出登录跳转、WebSocket 配置与部署文档

- 修复 LeaderboardController 查询不存在的 sign 字段导致 500 错误
- 修复 leaderboard/index 和 guestbook/index 引用不存在的 layouts.app 布局
- 将排行榜和留言板改为独立 HTML 页面结构(含 Tailwind CDN)
- 修复退出登录返回 JSON 而非重定向的问题,现在会正确跳转回登录页
- 将 REDIS_CLIENT 从 phpredis 改为 predis(兼容无扩展环境)
- 新增 RoomSeeder 自动创建默认公共大厅房间
- 新增 Nginx 生产环境配置示例(含 WebSocket 反向代理)
- 重写 README.md 为完整的中文部署指南
- 修复 rooms/index 和 chat/frame 中 Alpine.js 语法错误
- 将 chat.js 加入 Vite 构建配置
- 新增验证码配置文件
This commit is contained in:
2026-02-26 14:57:24 +08:00
parent 50fc804402
commit d884853968
19 changed files with 1083 additions and 458 deletions
@@ -28,7 +28,7 @@ class LeaderboardController extends Controller
// 1. 境界榜 (以 user_level 为尊)
$topLevels = Cache::remember('leaderboard:top_levels', $ttl, function () {
return User::select('id', 'username', 'headface', 'user_level', 'sex', 'sign')
return User::select('id', 'username', 'headface', 'user_level', 'sex')
->where('user_level', '>', 0)
->orderByDesc('user_level')
->orderBy('id')
@@ -38,7 +38,7 @@ class LeaderboardController extends Controller
// 2. 修为榜 (以 exp_num 为尊)
$topExp = Cache::remember('leaderboard:top_exp', $ttl, function () {
return User::select('id', 'username', 'headface', 'exp_num', 'sex', 'user_level', 'sign')
return User::select('id', 'username', 'headface', 'exp_num', 'sex', 'user_level')
->where('exp_num', '>', 0)
->orderByDesc('exp_num')
->orderBy('id')
@@ -48,7 +48,7 @@ class LeaderboardController extends Controller
// 3. 财富榜 (以 jjb-交友币 为尊)
$topWealth = Cache::remember('leaderboard:top_wealth', $ttl, function () {
return User::select('id', 'username', 'headface', 'jjb', 'sex', 'user_level', 'sign')
return User::select('id', 'username', 'headface', 'jjb', 'sex', 'user_level')
->where('jjb', '>', 0)
->orderByDesc('jjb')
->orderBy('id')
@@ -58,7 +58,7 @@ class LeaderboardController extends Controller
// 4. 魅力榜 (以 meili 为尊)
$topCharm = Cache::remember('leaderboard:top_charm', $ttl, function () {
return User::select('id', 'username', 'headface', 'meili', 'sex', 'user_level', 'sign')
return User::select('id', 'username', 'headface', 'meili', 'sex', 'user_level')
->where('meili', '>', 0)
->orderByDesc('meili')
->orderBy('id')