{{-- 文件功能:聊天室使用说明页面 动态读取后台配置(sysparam、vip_levels、gifts、game_configs)展示规则 @extends layouts.app @author ChatRoom Laravel @version 2.0.0 --}} @extends('layouts.app') @section('title', '使用说明 - 飘落流星') @section('nav-icon', '📖') @section('nav-title', '使用说明') @section('head') @endsection @php use App\Models\GameConfig; 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'); // 排行榜配置 $lbLimit = (int) Sysparam::getValue('leaderboard_limit', '50'); // VIP 等级 $vipLevels = VipLevel::orderBy('sort_order')->get(); // VIP 在线支付开关 $vipPaymentEnabled = Sysparam::getValue('vip_payment_enabled', '0') === '1'; // 礼物列表 $gifts = Gift::activeList(); // 已启用的游戏配置(按 game_key 索引) $enabledGames = GameConfig::query()->where('enabled', true)->get()->keyBy('game_key'); // 各游戏展示定义(icon / 名称 / 简介 / 参数解析回调) // 每条对应 gameKey => [ icon, label, intro, details[] ] $gameDefinitions = [ 'fishing' => [ 'icon' => '🎣', 'label' => '钓鱼小游戏', 'color' => 'teal', 'intro' => '在聊天室内消耗金币参与钓鱼,根据鱼的稀有度赢取不同奖励。', 'details' => function ($p) { return [ '每次消耗 ' . ($p['fishing_cost'] ?? 5) . ' 金币', '等待 ' . ($p['fishing_wait_min'] ?? 8) . '~' . ($p['fishing_wait_max'] ?? 15) . ' 秒后收竿', '冷却时间 ' . (int) (($p['fishing_cooldown'] ?? 300) / 60) . ' 分钟', ]; }, ], 'slot_machine' => [ 'icon' => '🎰', 'label' => '老虎机', 'color' => 'violet', 'intro' => '消耗金币拉动老虎机,连线相同符号即可赢取倍率奖励,全图案一致赢取 Jackpot!', 'details' => function ($p) { return [ '每次消耗 ' . ($p['cost_per_spin'] ?? 100) . ' 金币', '每日最多拉 ' . ($p['daily_limit'] ?? 100) . ' 次', '对子 ×' . ($p['pair_payout'] ?? 2) . ',三同 ×' . ($p['same_payout'] ?? 10) . ',全同 ×' . ($p['triple_payout'] ?? 50) . ',Jackpot ×' . ($p['jackpot_payout'] ?? 100), ]; }, ], 'baccarat' => [ 'icon' => '🃏', 'label' => '百家乐', 'color' => 'red', 'intro' => '竞猜庄闲大小,系统每 2 分钟开一局,在投注窗口内下注,猜中即赢。', 'details' => function ($p) { $interval = $p['interval_minutes'] ?? 2; $window = $p['bet_window_seconds'] ?? 60; return [ '投注范围 ' . number_format($p['min_bet'] ?? 100) . '~' . number_format($p['max_bet'] ?? 50000) . ' 金币', '每 ' . $interval . ' 分钟一局,投注窗口 ' . $window . ' 秒', '大/小/庄/闲赔率 ×' . (1 + ($p['payout_big'] ?? 1)) . ',三公赔率 ×' . (1 + ($p['payout_triple'] ?? 24)), ]; }, ], 'horse_racing' => [ 'icon' => '🏇', 'label' => '赛马竞猜', 'color' => 'amber', 'intro' => '从 4 匹马中选择你看好的,押注金币,赛后按赔率发放奖励。', 'details' => function ($p) { return [ '投注范围 ' . number_format($p['min_bet'] ?? 100) . '~' . number_format($p['max_bet'] ?? 100000) . ' 金币', '每 ' . ($p['interval_minutes'] ?? 30) . ' 分钟一场,投注窗口 ' . ($p['bet_window_seconds'] ?? 90) . ' 秒', '系统初始化资金池 ' . number_format($p['seed_pool'] ?? 0) . ' 金币,连同玩家注池一起派奖', '平台抽成 ' . ($p['house_take_percent'] ?? 5) . '%,中奖时按占比瓜分派奖池', ]; }, ], 'mystery_box' => [ 'icon' => '📦', 'label' => '神秘箱子', 'color' => 'indigo', 'intro' => '管理员不定时在大厅投放神秘箱子,在线用户可点击领取,有惊喜也有陷阱!', 'details' => function ($p) { return [ '普通奖励 ' . number_format($p['normal_reward_min'] ?? 500) . '~' . number_format($p['normal_reward_max'] ?? 2000) . ' 金币', '稀有奖励 ' . number_format($p['rare_reward_min'] ?? 5000) . '~' . number_format($p['rare_reward_max'] ?? 20000) . ' 金币', '陷阱概率 ' . ($p['trap_chance_percent'] ?? 10) . '%,触发扣除 ' . number_format($p['trap_penalty_min'] ?? 200) . '~' . number_format($p['trap_penalty_max'] ?? 1000) . ' 金币', '领取窗口 ' . ($p['claim_window_seconds'] ?? 60) . ' 秒,先到先得', ]; }, ], 'fortune_telling' => [ 'icon' => '🔮', 'label' => '神秘占卜', 'color' => 'purple', 'intro' => '向神秘占卜师请卦,每日免费一次,获得吉凶预言和 24 小时加成 Buff。', 'details' => function ($p) { return [ '每日免费 ' . ($p['free_count_per_day'] ?? 1) . ' 次,额外次数消耗 ' . number_format($p['extra_cost'] ?? 500) . ' 金币', '大吉 ' . ($p['jackpot_chance'] ?? 5) . '%・吉 ' . ($p['good_chance'] ?? 20) . '%・凶 ' . ($p['bad_chance'] ?? 20) . '%・诅咒 ' . ($p['curse_chance'] ?? 5) . '%', 'Buff 持续 ' . ($p['buff_duration_hours'] ?? 24) . ' 小时(影响金币 / 经验加成)', ]; }, ], 'lottery' => [ 'icon' => '🎟️', 'label' => '双色球彩票', 'color' => 'rose', 'intro' => '每日一期,3 颗红球 + 1 颗蓝球,猜中越多奖励越丰厚,奖池无人中奖时自动滚存!', 'details' => function ($p) { $drawH = $p['draw_hour'] ?? 20; $drawM = str_pad($p['draw_minute'] ?? 0, 2, '0', STR_PAD_LEFT); return [ '每注 ' . number_format($p['ticket_price'] ?? 100) . ' 金币,每人每期最多 ' . ($p['max_tickets_per_user'] ?? 50) . ' 注', '每日 ' . $drawH . ':' . $drawM . ' 开奖,停售提前 ' . ($p['stop_sell_minutes'] ?? 2) . ' 分钟', '一等奖 = 奖池 ' . ($p['prize_1st_ratio'] ?? 60) . '%,二等 ' . ($p['prize_2nd_ratio'] ?? 20) . '%,三等 ' . ($p['prize_3rd_ratio'] ?? 10) . '%', '四等固定 ' . ($p['prize_4th_fixed'] ?? 150) . ' 金币,五等固定 ' . ($p['prize_5th_fixed'] ?? 50) . ' 金币', '连续 ' . ($p['super_issue_threshold'] ?? 3) . ' 期无一等奖触发超级期,系统额外注入 ' . number_format($p['super_issue_inject'] ?? 20000) . ' 金币', ]; }, ], 'gomoku' => [ 'icon' => '♟️', 'label' => '五子棋', 'color' => 'slate', 'intro' => '15×15 棋盘,率先五子连珠者胜。支持玩家对战(PvP)和人机对战(PvE)两种模式。', 'details' => function ($p) { return [ 'PvP 对战:胜者获得 ' . ($p['pvp_reward'] ?? 80) . ' 金币,邀请超时 ' . ($p['invite_timeout'] ?? 60) . ' 秒', '简单(免费)胜奖 ' . ($p['pve_easy_reward'] ?? 20) . ' 金币', '普通(入场 ' . ($p['pve_normal_fee'] ?? 10) . ' 金币)胜奖 ' . ($p['pve_normal_reward'] ?? 50) . ' 金币', '困难(入场 ' . ($p['pve_hard_fee'] ?? 30) . ' 金币)胜奖 ' . ($p['pve_hard_reward'] ?? 120) . ' 金币', '专家(入场 ' . ($p['pve_expert_fee'] ?? 80) . ' 金币)胜奖 ' . ($p['pve_expert_reward'] ?? 300) . ' 金币', '每步限时 ' . ($p['move_timeout'] ?? 30) . ' 秒,超时判负', ]; }, ], ]; // 颜色主题映射 $colorMap = [ 'teal' => ['bg' => 'bg-teal-50', 'border' => 'border-teal-200', 'icon' => 'bg-teal-100', 'title' => 'text-teal-700', 'tag' => 'bg-teal-100 text-teal-700'], 'violet' => ['bg' => 'bg-violet-50', 'border' => 'border-violet-200','icon' => 'bg-violet-100', 'title' => 'text-violet-700','tag' => 'bg-violet-100 text-violet-700'], 'red' => ['bg' => 'bg-red-50', 'border' => 'border-red-200', 'icon' => 'bg-red-100', 'title' => 'text-red-700', 'tag' => 'bg-red-100 text-red-700'], 'amber' => ['bg' => 'bg-amber-50', 'border' => 'border-amber-200', 'icon' => 'bg-amber-100', 'title' => 'text-amber-700', 'tag' => 'bg-amber-100 text-amber-700'], 'indigo' => ['bg' => 'bg-indigo-50', 'border' => 'border-indigo-200','icon' => 'bg-indigo-100', 'title' => 'text-indigo-700','tag' => 'bg-indigo-100 text-indigo-700'], 'purple' => ['bg' => 'bg-purple-50', 'border' => 'border-purple-200','icon' => 'bg-purple-100', 'title' => 'text-purple-700','tag' => 'bg-purple-100 text-purple-700'], 'rose' => ['bg' => 'bg-rose-50', 'border' => 'border-rose-200', 'icon' => 'bg-rose-100', 'title' => 'text-rose-700', 'tag' => 'bg-rose-100 text-rose-700'], 'slate' => ['bg' => 'bg-slate-50', 'border' => 'border-slate-200', 'icon' => 'bg-slate-100', 'title' => 'text-slate-700', 'tag' => 'bg-slate-100 text-slate-700'], ]; @endphp @section('content') {{-- 右侧固定导航(fixed 定位,独立于主内容之外) --}}
{{-- 页面标题 --}}

🌟 飘落流星聊天室 · 使用说明

了解如何获取经验、金币、魅力,以及各项功能和游戏的使用规则

{{-- ═══ 1. 经验与等级 ═══ --}}

⭐ 经验与等级

📈 如何获取经验?

  • 在聊天室内挂机聊天,系统自动每隔一段时间存点
  • 每次存点获得 {{ $expPerHb }} 点经验(支持范围随机)
  • VIP 会员享受经验加倍(详见会员系统)

📊 等级经验对照表(最高 LV.{{ $maxLevel }})

@foreach ($levelExp as $i => $exp) @if ($i % 2 === 0) @if (isset($levelExp[$i + 1])) @else @endif @endif @endforeach
等级 所需经验 等级 所需经验
LV.{{ $i + 1 }} {{ number_format($exp) }} LV.{{ $i + 2 }} {{ number_format($levelExp[$i + 1]) }}
{{-- ═══ 2. 金币系统 ═══ --}}

💰 金币系统

如何获取金币?

  • 与经验一起,挂机聊天自动获得
  • 每次存点获得 {{ $jjbPerHb }} 枚金币(支持范围随机)
  • VIP 会员享受金币加倍
  • 参与游戏获胜可赢取金币奖励

金币用途

  • 🎁 送礼物 — 向其他用户赠送礼物(消耗金币)
  • @foreach($gameDefinitions as $key => $def) @if($enabledGames->has($key))
  • {{ $def['icon'] }} {{ $def['label'] }} — 参与{{ $def['label'] }}游戏
  • @endif @endforeach
{{-- ═══ 3. 魅力系统 ═══ --}}

✨ 魅力系统

如何获取魅力?

  • 聊天获取 — 对指定用户发言可获得魅力
  • 异性聊天(男↔女):每条消息 +{{ $charmCross }} 魅力
  • 同性聊天(男↔男 / 女↔女):每条消息 +{{ $charmSame }} 魅力
  • 每小时上限 {{ $charmLimit }} 点(防刷屏保护)
  • 收到礼物 — 被赠送礼物时增加魅力(见下方礼物列表)

💡 小贴士

对「大家」发言和悄悄话不增加魅力。注意设置正确的性别可以获得更多魅力哦!

{{-- ═══ 4. 礼物系统 ═══ --}}

🎁 礼物系统

双击用户名打开名片,即可选择礼物赠送。送出礼物消耗金币,对方获得魅力。

@foreach ($gifts as $gift)
{{ $gift->name }}
{{ $gift->emoji }} {{ $gift->name }}
💰 {{ $gift->cost }} 金币
✨ +{{ $gift->charm }} 魅力
@endforeach
{{-- ═══ 5. VIP 会员 ═══ --}} @if ($vipLevels->count() > 0)

👑 VIP 会员

VIP 会员享受经验和金币获取加倍、专属进场特效等特权。

@foreach ($vipLevels as $vip) @endforeach
等级 经验倍率 金币倍率 时长 价格 操作
{!! $vip->icon !!} {{ $vip->name }} ×{{ $vip->exp_multiplier }} ×{{ $vip->jjb_multiplier }} {{ $vip->duration_days > 0 ? $vip->duration_days . ' 天' : '永久' }} {{ $vip->price > 0 ? $vip->price . ' 元' : '免费' }} @php $isCurrentVipLevel = auth()->user()?->isVip() && (int) auth()->user()?->vip_level_id === (int) $vip->id; @endphp @if ($vip->price > 0 && $vipPaymentEnabled)
@csrf
@elseif ($vip->price > 0) 暂未开启 @else 联系管理员 @endif
VIP 会员支付由平台支付中心提供,最终开通结果以异步回调为准。
@endif {{-- ═══ 6. 娱乐游戏 ═══ --}} @if($enabledGames->count() > 0)

🎮 娱乐游戏

点击聊天室工具栏中的游戏图标即可参与,金币可通过挂机获得。

@foreach($gameDefinitions as $key => $def) @if($enabledGames->has($key)) @php $game = $enabledGames->get($key); $params = $game->params ?? []; $c = $colorMap[$def['color']] ?? $colorMap['slate']; $details = ($def['details'])($params); @endphp
{{ $def['icon'] }}

{{ $def['label'] }}

{{ $def['intro'] }}

    @foreach($details as $detail)
  • {{ $detail }}
  • @endforeach
@endif @endforeach
@endif {{-- ═══ 7. 管理权限 ═══ --}}

🛡️ 管理权限

聊天室管理动作已统一按职务权限控制。被任命到具备对应权限的职务后,双击用户名片即可执行以下操作:

⚠️
警告用户 需具备“警告用户”职务权限
🔇
禁言用户 需具备“禁言用户”职务权限
🚫
踢出用户 需具备“踢出用户”职务权限
封号用户 需具备“封号用户”职务权限
🌐
封 IP / 查看管理员网络信息 需具备“封IP”职务权限
{{-- ═══ 8. 排行榜 ═══ --}}

🏆 排行榜

  • 经验排行 — 按总经验值排名
  • 金币排行 — 按金币数量排名
  • 魅力排行 — 按魅力值排名
  • 排行榜显示前 {{ $lbLimit }}
{{-- ═══ 9. 基础操作 ═══ --}}

💬 基础操作

  • 👆 单击用户名 — 切换聊天对象(私聊)
  • 👆👆 双击用户名 — 打开用户名片(查看资料、送花、管理操作)
  • 💬 对「大家」说 — 消息显示在公屏
  • 💬 对指定用户说 — 消息显示在对方的私聊窗
  • 🤫 悄悄话 — 只有双方可见的私密消息
  • 📬 写私信 — 类似留言板,离线也能收到
@endsection