修复:排行榜/留言板缺失布局、退出登录跳转、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:
@@ -1,8 +1,14 @@
|
||||
@extends('layouts.app')
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
@section('title', '风云排行榜')
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>风云排行榜 - 飘落流星</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
|
||||
@section('content')
|
||||
<body class="bg-gray-100 flex h-screen overflow-hidden text-sm">
|
||||
<div class="h-screen w-full flex flex-col bg-gray-100 overflow-hidden font-sans">
|
||||
|
||||
<!-- 顶部导航条 -->
|
||||
@@ -29,12 +35,18 @@
|
||||
|
||||
<!-- 右侧:当前用户状态 -->
|
||||
<div class="flex items-center space-x-3 text-sm">
|
||||
<img src="/images/headface/{{ Auth::user()->headface ?? '01.gif' }}"
|
||||
class="w-8 h-8 rounded border border-indigo-500 object-cover bg-white">
|
||||
<div class="hidden sm:block">
|
||||
<span class="font-bold">{{ Auth::user()->username }}</span>
|
||||
<span class="text-indigo-300 ml-2">LV.{{ Auth::user()->user_level }}</span>
|
||||
</div>
|
||||
@auth
|
||||
<img src="/images/headface/{{ Auth::user()->headface ?? '01.gif' }}"
|
||||
class="w-8 h-8 rounded border border-indigo-500 object-cover bg-white">
|
||||
<div class="hidden sm:block">
|
||||
<span class="font-bold">{{ Auth::user()->username }}</span>
|
||||
<span class="text-indigo-300 ml-2">LV.{{ Auth::user()->user_level }}</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="hidden sm:block">
|
||||
<span class="text-indigo-300">游客状态</span>
|
||||
</div>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +70,8 @@
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden flex flex-col">
|
||||
<div
|
||||
class="bg-gradient-to-r from-red-600 to-red-500 px-4 py-3 flex justify-between items-center text-white">
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">👑</span> 无上境界榜</h2>
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">👑</span> 无上境界榜
|
||||
</h2>
|
||||
<span class="text-xs bg-red-800/40 px-2 py-0.5 rounded">Level</span>
|
||||
</div>
|
||||
<div class="p-0 overflow-y-auto max-h-[600px] flex-1">
|
||||
@@ -75,7 +88,8 @@
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden flex flex-col">
|
||||
<div
|
||||
class="bg-gradient-to-r from-amber-600 to-amber-500 px-4 py-3 flex justify-between items-center text-white">
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">🔥</span> 苦修经验榜</h2>
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">🔥</span> 苦修经验榜
|
||||
</h2>
|
||||
<span class="text-xs bg-amber-800/40 px-2 py-0.5 rounded">Exp</span>
|
||||
</div>
|
||||
<div class="p-0 overflow-y-auto max-h-[600px] flex-1">
|
||||
@@ -110,7 +124,8 @@
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden flex flex-col">
|
||||
<div
|
||||
class="bg-gradient-to-r from-pink-600 to-pink-500 px-4 py-3 flex justify-between items-center text-white">
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">🌸</span> 绝世名伶榜</h2>
|
||||
<h2 class="font-bold text-lg flex items-center"><span class="mr-2 text-xl">🌸</span> 绝世名伶榜
|
||||
</h2>
|
||||
<span class="text-xs bg-pink-800/40 px-2 py-0.5 rounded">Charm</span>
|
||||
</div>
|
||||
<div class="p-0 overflow-y-auto max-h-[600px] flex-1">
|
||||
@@ -128,4 +143,6 @@
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@endsection
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -15,40 +15,41 @@
|
||||
$rowBg = 'bg-orange-50 hover:bg-orange-100 border-l-4 border-orange-300';
|
||||
}
|
||||
@endphp
|
||||
<li class="p-3 flex items-center justify-between transition-colors duration-150 {{ $rowBg }}">
|
||||
<!-- 左侧:名次与头像/名字 -->
|
||||
<div class="flex items-center space-x-3 overflow-hidden">
|
||||
<div
|
||||
class="w-6 h-6 shrink-0 {{ $rankBg }} rounded-full flex items-center justify-center font-bold text-xs">
|
||||
{{ $index + 1 }}
|
||||
</div>
|
||||
<div class="flex items-center space-x-2 truncate">
|
||||
<img class="w-8 h-8 rounded border object-cover shrink-0"
|
||||
src="/images/headface/{{ $user->headface ?? '01.gif' }}" alt="">
|
||||
<div class="flex flex-col truncate">
|
||||
<span class="text-sm font-bold text-gray-800 truncate" title="{{ $user->username }}">
|
||||
{{ $user->username }}
|
||||
@if ($user->sex == '女')
|
||||
<span class="text-pink-500 text-xs ml-0.5">♀</span>
|
||||
@elseif($user->sex == '男')
|
||||
<span class="text-blue-500 text-xs ml-0.5">♂</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="text-[10px] text-gray-500 truncate"
|
||||
title="{{ $user->sign }}">{{ $user->sign ?: '这家伙很懒,什么也没留下' }}</span>
|
||||
@if ($user)
|
||||
<li class="p-3 flex items-center justify-between transition-colors duration-150 {{ $rowBg }}">
|
||||
<!-- 左侧:名次与头像/名字 -->
|
||||
<div class="flex items-center space-x-3 overflow-hidden">
|
||||
<div
|
||||
class="w-6 h-6 shrink-0 {{ $rankBg }} rounded-full flex items-center justify-center font-bold text-xs">
|
||||
{{ $index + 1 }}
|
||||
</div>
|
||||
<div class="flex items-center space-x-2 truncate">
|
||||
<img class="w-8 h-8 rounded border object-cover shrink-0"
|
||||
src="/images/headface/{{ $user->headface ?? '01.gif' }}" alt="">
|
||||
<div class="flex flex-col truncate">
|
||||
<span class="text-sm font-bold text-gray-800 truncate" title="{{ $user->username }}">
|
||||
{{ $user->username }}
|
||||
@if ($user->sex == '女')
|
||||
<span class="text-pink-500 text-xs ml-0.5">♀</span>
|
||||
@elseif($user->sex == '男')
|
||||
<span class="text-blue-500 text-xs ml-0.5">♂</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="text-[10px] text-gray-500 truncate">暂无个性签名</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:数值 -->
|
||||
<div class="flex flex-col items-end shrink-0 ml-2">
|
||||
<span class="text-sm font-black {{ $index < 3 ? $color : 'text-gray-600' }}">
|
||||
{{ number_format($user->$valueField) }}
|
||||
<span
|
||||
class="text-[10px] font-normal {{ $index < 3 ? $color : 'text-gray-400' }} ml-0.5">{{ $unit }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
<!-- 右侧:数值 -->
|
||||
<div class="flex flex-col items-end shrink-0 ml-2">
|
||||
<span class="text-sm font-black {{ $index < 3 ? $color : 'text-gray-600' }}">
|
||||
{{ number_format($user->$valueField) }}
|
||||
<span
|
||||
class="text-[10px] font-normal {{ $index < 3 ? $color : 'text-gray-400' }} ml-0.5">{{ $unit }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
@empty
|
||||
<li class="p-8 text-center text-sm text-gray-400 font-bold">
|
||||
暂无数据登榜
|
||||
|
||||
Reference in New Issue
Block a user