功能:聊天室使用说明页面
- 新增 /guide 路由和 rooms/guide.blade.php 视图
- 动态读取后台配置:经验阈值、金币/魅力奖励、管理权限等级、VIP 等级、礼物列表
- 8 个板块:经验与等级、金币系统、魅力系统、礼物系统、VIP 会员、管理权限、排行榜、基础操作
- 星光大厅导航栏增加「📖 使用说明」入口
This commit is contained in:
298
resources/views/rooms/guide.blade.php
Normal file
298
resources/views/rooms/guide.blade.php
Normal file
@@ -0,0 +1,298 @@
|
||||
{{--
|
||||
文件功能:聊天室使用说明页面
|
||||
动态读取后台配置(sysparam、vip_levels、gifts)展示规则
|
||||
|
||||
@extends layouts.app
|
||||
@author ChatRoom Laravel
|
||||
@version 1.0.0
|
||||
--}}
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', '使用说明 - 飘落流星')
|
||||
@section('nav-icon', '📖')
|
||||
@section('nav-title', '使用说明')
|
||||
|
||||
@section('nav-right')
|
||||
<a href="{{ route('rooms.index') }}"
|
||||
class="bg-indigo-500 hover:bg-indigo-400 px-4 py-2 rounded-md font-bold text-sm transition shadow-sm">
|
||||
← 返回大厅
|
||||
</a>
|
||||
@endsection
|
||||
|
||||
@php
|
||||
use App\Models\Sysparam;
|
||||
use App\Models\VipLevel;
|
||||
use App\Models\Gift;
|
||||
|
||||
// 等级经验阈值
|
||||
$levelExp = Sysparam::getLevelExpThresholds();
|
||||
$maxLevel = (int) Sysparam::getValue('maxlevel', '99');
|
||||
|
||||
// 奖励配置
|
||||
$expPerHb = Sysparam::getValue('exp_per_heartbeat', '1');
|
||||
$jjbPerHb = Sysparam::getValue('jjb_per_heartbeat', '1');
|
||||
|
||||
// 魅力配置
|
||||
$charmCross = Sysparam::getValue('charm_cross_sex', '2');
|
||||
$charmSame = Sysparam::getValue('charm_same_sex', '1');
|
||||
$charmLimit = Sysparam::getValue('charm_hourly_limit', '20');
|
||||
|
||||
// 管理权限等级
|
||||
$levelWarn = (int) Sysparam::getValue('level_warn', '5');
|
||||
$levelMute = (int) Sysparam::getValue('level_mute', '8');
|
||||
$levelKick = (int) Sysparam::getValue('level_kick', '10');
|
||||
$levelFreeze = (int) Sysparam::getValue('level_freeze', '14');
|
||||
|
||||
// 排行榜配置
|
||||
$lbLimit = (int) Sysparam::getValue('leaderboard_limit', '50');
|
||||
|
||||
// VIP 等级
|
||||
$vipLevels = VipLevel::orderBy('sort_order')->get();
|
||||
|
||||
// 礼物列表
|
||||
$gifts = Gift::activeList();
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<main class="max-w-4xl mx-auto py-10 px-6">
|
||||
|
||||
{{-- 页面标题 --}}
|
||||
<div class="text-center mb-10">
|
||||
<h1 class="text-3xl font-extrabold text-gray-800 mb-2">🌟 飘落流星聊天室 · 使用说明</h1>
|
||||
<p class="text-gray-500">了解如何获取经验、金币、魅力,以及各项功能的使用规则</p>
|
||||
</div>
|
||||
|
||||
{{-- ═══ 1. 经验与等级 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-indigo-700 mb-4 flex items-center gap-2">⭐ 经验与等级</h2>
|
||||
|
||||
<div class="space-y-3 text-sm text-gray-700">
|
||||
<div class="bg-indigo-50 rounded-lg p-4">
|
||||
<p class="font-bold text-indigo-800 mb-2">📈 如何获取经验?</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-gray-600">
|
||||
<li>在聊天室内<strong>挂机聊天</strong>,系统自动每隔一段时间存点</li>
|
||||
<li>每次存点获得 <strong class="text-indigo-600">{{ $expPerHb }}</strong> 点经验(支持范围随机)</li>
|
||||
<li>VIP 会员享受经验加倍(详见会员系统)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-gray-50 rounded-lg p-4">
|
||||
<p class="font-bold text-gray-800 mb-2">📊 等级经验对照表(最高 LV.{{ $maxLevel }})</p>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-xs">
|
||||
<thead>
|
||||
<tr class="bg-indigo-100 text-indigo-800">
|
||||
<th class="px-3 py-2 rounded-tl-md">等级</th>
|
||||
<th class="px-3 py-2">所需经验</th>
|
||||
<th class="px-3 py-2">等级</th>
|
||||
<th class="px-3 py-2 rounded-tr-md">所需经验</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($levelExp as $i => $exp)
|
||||
@if ($i % 2 === 0)
|
||||
<tr class="{{ $i % 4 === 0 ? 'bg-white' : 'bg-gray-50' }}">
|
||||
<td class="px-3 py-1.5 font-bold text-indigo-600">LV.{{ $i + 1 }}</td>
|
||||
<td class="px-3 py-1.5">{{ number_format($exp) }}</td>
|
||||
@if (isset($levelExp[$i + 1]))
|
||||
<td class="px-3 py-1.5 font-bold text-indigo-600">
|
||||
LV.{{ $i + 2 }}</td>
|
||||
<td class="px-3 py-1.5">{{ number_format($levelExp[$i + 1]) }}
|
||||
</td>
|
||||
@else
|
||||
<td class="px-3 py-1.5" colspan="2"></td>
|
||||
@endif
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 2. 金币系统 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-amber-700 mb-4 flex items-center gap-2">💰 金币系统</h2>
|
||||
|
||||
<div class="bg-amber-50 rounded-lg p-4 text-sm text-gray-700">
|
||||
<p class="font-bold text-amber-800 mb-2">如何获取金币?</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-gray-600">
|
||||
<li>与经验一起,挂机聊天自动获得</li>
|
||||
<li>每次存点获得 <strong class="text-amber-600">{{ $jjbPerHb }}</strong> 枚金币(支持范围随机)</li>
|
||||
<li>VIP 会员享受金币加倍</li>
|
||||
</ul>
|
||||
|
||||
<p class="font-bold text-amber-800 mt-4 mb-2">金币用途</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-gray-600">
|
||||
<li>🎁 送礼物 — 向其他用户赠送鲜花等礼物(消耗金币)</li>
|
||||
<li>🎣 钓鱼 — 消耗金币参与钓鱼游戏</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 3. 魅力系统 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-pink-700 mb-4 flex items-center gap-2">✨ 魅力系统</h2>
|
||||
|
||||
<div class="space-y-3 text-sm text-gray-700">
|
||||
<div class="bg-pink-50 rounded-lg p-4">
|
||||
<p class="font-bold text-pink-800 mb-2">如何获取魅力?</p>
|
||||
<ul class="list-disc list-inside space-y-1 text-gray-600">
|
||||
<li><strong>聊天获取</strong> — 对指定用户发言可获得魅力</li>
|
||||
<li>异性聊天(男↔女):每条消息 <strong class="text-pink-600">+{{ $charmCross }}</strong>
|
||||
魅力
|
||||
</li>
|
||||
<li>同性聊天(男↔男 / 女↔女):每条消息 <strong class="text-pink-600">+{{ $charmSame }}</strong>
|
||||
魅力
|
||||
</li>
|
||||
<li>每小时上限 <strong class="text-pink-600">{{ $charmLimit }}</strong> 点(防刷屏保护)</li>
|
||||
<li><strong>收到礼物</strong> — 被赠送礼物时增加魅力(见下方礼物列表)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-pink-50/50 rounded-lg p-4">
|
||||
<p class="font-bold text-pink-800 mb-1">💡 小贴士</p>
|
||||
<p class="text-gray-600">对「大家」发言和悄悄话不增加魅力。注意设置正确的性别可以获得更多魅力哦!</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 4. 礼物系统 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-rose-700 mb-4 flex items-center gap-2">🎁 礼物系统</h2>
|
||||
|
||||
<p class="text-sm text-gray-600 mb-4">双击用户名打开名片,即可选择礼物赠送。送出礼物消耗金币,对方获得魅力。</p>
|
||||
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3">
|
||||
@foreach ($gifts as $gift)
|
||||
<div class="bg-gray-50 rounded-xl p-3 text-center border border-gray-100 hover:shadow-sm transition">
|
||||
<img src="/images/gifts/{{ $gift->image }}" alt="{{ $gift->name }}"
|
||||
class="w-12 h-12 mx-auto object-contain mb-2">
|
||||
<div class="font-bold text-sm text-gray-800">{{ $gift->emoji }} {{ $gift->name }}</div>
|
||||
<div class="text-xs text-amber-600 mt-1">💰 {{ $gift->cost }} 金币</div>
|
||||
<div class="text-xs text-pink-600">✨ +{{ $gift->charm }} 魅力</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 5. VIP 会员 ═══ --}}
|
||||
@if ($vipLevels->count() > 0)
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-purple-700 mb-4 flex items-center gap-2">👑 VIP 会员</h2>
|
||||
|
||||
<p class="text-sm text-gray-600 mb-4">VIP 会员享受经验和金币获取加倍、专属进场特效等特权。</p>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead>
|
||||
<tr class="bg-purple-50 text-purple-800">
|
||||
<th class="px-4 py-2 text-left rounded-tl-md">等级</th>
|
||||
<th class="px-4 py-2 text-center">经验倍率</th>
|
||||
<th class="px-4 py-2 text-center">金币倍率</th>
|
||||
<th class="px-4 py-2 text-center">时长</th>
|
||||
<th class="px-4 py-2 text-center rounded-tr-md">价格</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($vipLevels as $vip)
|
||||
<tr class="border-t border-gray-100">
|
||||
<td class="px-4 py-2.5 font-bold" style="color: {{ $vip->color ?? '#333' }}">
|
||||
{!! $vip->icon !!} {{ $vip->name }}
|
||||
</td>
|
||||
<td class="px-4 py-2.5 text-center text-indigo-600 font-bold">
|
||||
×{{ $vip->exp_multiplier }}</td>
|
||||
<td class="px-4 py-2.5 text-center text-amber-600 font-bold">
|
||||
×{{ $vip->jjb_multiplier }}</td>
|
||||
<td class="px-4 py-2.5 text-center text-gray-600">{{ $vip->duration_days }} 天</td>
|
||||
<td class="px-4 py-2.5 text-center text-rose-600 font-bold">
|
||||
{{ $vip->price > 0 ? $vip->price . ' 元' : '免费' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
{{-- ═══ 6. 管理权限 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-red-700 mb-4 flex items-center gap-2">🛡️ 管理权限</h2>
|
||||
|
||||
<p class="text-sm text-gray-600 mb-4">等级越高,可使用的管理功能越多。双击用户名片中可执行以下操作:</p>
|
||||
|
||||
<div class="space-y-2">
|
||||
<div class="flex items-center gap-3 bg-yellow-50 rounded-lg px-4 py-3">
|
||||
<span class="text-lg">⚠️</span>
|
||||
<div>
|
||||
<span class="font-bold text-gray-800">警告用户</span>
|
||||
<span class="text-xs text-gray-500 ml-2">需要 LV.{{ $levelWarn }} 以上</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 bg-indigo-50 rounded-lg px-4 py-3">
|
||||
<span class="text-lg">🔇</span>
|
||||
<div>
|
||||
<span class="font-bold text-gray-800">禁言用户</span>
|
||||
<span class="text-xs text-gray-500 ml-2">需要 LV.{{ $levelMute }} 以上</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 bg-red-50 rounded-lg px-4 py-3">
|
||||
<span class="text-lg">🚫</span>
|
||||
<div>
|
||||
<span class="font-bold text-gray-800">踢出用户</span>
|
||||
<span class="text-xs text-gray-500 ml-2">需要 LV.{{ $levelKick }} 以上</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 bg-blue-50 rounded-lg px-4 py-3">
|
||||
<span class="text-lg">🧊</span>
|
||||
<div>
|
||||
<span class="font-bold text-gray-800">冻结账号</span>
|
||||
<span class="text-xs text-gray-500 ml-2">需要 LV.{{ $levelFreeze }} 以上</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 7. 排行榜 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-emerald-700 mb-4 flex items-center gap-2">🏆 排行榜</h2>
|
||||
|
||||
<div class="bg-emerald-50 rounded-lg p-4 text-sm text-gray-700">
|
||||
<ul class="list-disc list-inside space-y-1 text-gray-600">
|
||||
<li><strong>经验排行</strong> — 按总经验值排名</li>
|
||||
<li><strong>金币排行</strong> — 按金币数量排名</li>
|
||||
<li><strong>魅力排行</strong> — 按魅力值排名</li>
|
||||
<li>排行榜显示前 <strong class="text-emerald-600">{{ $lbLimit }}</strong> 名</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- ═══ 8. 基础操作 ═══ --}}
|
||||
<section class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-6">
|
||||
<h2 class="text-xl font-bold text-gray-700 mb-4 flex items-center gap-2">💬 基础操作</h2>
|
||||
|
||||
<div class="space-y-3 text-sm text-gray-700">
|
||||
<div class="bg-gray-50 rounded-lg p-4">
|
||||
<ul class="space-y-2 text-gray-600">
|
||||
<li>👆 <strong>单击用户名</strong> — 切换聊天对象(私聊)</li>
|
||||
<li>👆👆 <strong>双击用户名</strong> — 打开用户名片(查看资料、送花、管理操作)</li>
|
||||
<li>💬 <strong>对「大家」说</strong> — 消息显示在公屏</li>
|
||||
<li>💬 <strong>对指定用户说</strong> — 消息显示在对方的私聊窗</li>
|
||||
<li>🤫 <strong>悄悄话</strong> — 只有双方可见的私密消息</li>
|
||||
<li>📬 <strong>写私信</strong> — 类似留言板,离线也能收到</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- 底部返回 --}}
|
||||
<div class="text-center mt-8">
|
||||
<a href="{{ route('rooms.index') }}"
|
||||
class="inline-block bg-indigo-600 hover:bg-indigo-700 text-white px-8 py-3 rounded-xl font-bold shadow-md transition">
|
||||
🚀 返回星光大厅
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
@endsection
|
||||
@@ -34,6 +34,8 @@
|
||||
@if (Auth::user()->user_level >= 15)
|
||||
<a href="{{ route('admin.dashboard') }}" class="text-indigo-200 hover:text-white font-bold hidden sm:block">⚙️ 后台</a>
|
||||
@endif
|
||||
{{-- 使用说明 --}}
|
||||
<a href="{{ route('guide') }}" class="text-indigo-200 hover:text-white font-bold text-sm hidden sm:block">📖 使用说明</a>
|
||||
{{-- 个人资料 --}}
|
||||
<button @click="showProfileModal = true" class="font-medium text-sm hover:text-indigo-200 transition flex items-center">
|
||||
欢迎您,{{ Auth::user()->username }}
|
||||
|
||||
@@ -31,6 +31,7 @@ Route::post('/logout', [AuthController::class, 'logout'])->name('logout');
|
||||
// 聊天室系统内部路由 (需要鉴权)
|
||||
Route::middleware(['chat.auth'])->group(function () {
|
||||
// ---- 第六阶段:大厅与房间管理 ----
|
||||
Route::get('/guide', fn () => view('rooms.guide'))->name('guide');
|
||||
Route::get('/rooms', [RoomController::class, 'index'])->name('rooms.index');
|
||||
Route::post('/rooms', [RoomController::class, 'store'])->name('rooms.store');
|
||||
Route::put('/rooms/{id}', [RoomController::class, 'update'])->name('rooms.update');
|
||||
|
||||
Reference in New Issue
Block a user