feat(ai): 将小班长升级为完全独立的实体用户并支持随机金币发放及持续在线刷级,设定为女兵人设并使用自定义头像

This commit is contained in:
2026-03-26 11:15:11 +08:00
parent c13bb5f35c
commit 4d60893dbe
16 changed files with 523 additions and 101 deletions
@@ -67,28 +67,56 @@
},
}">
{{-- 全局开关 + 操作栏 --}}
{{-- 全局开关 + 高级设置 --}}
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden mb-6">
<div class="p-6 flex items-center justify-between">
<div class="flex items-center gap-4">
<h2 class="text-lg font-bold text-gray-800">🤖 AI 聊天机器人</h2>
<div class="flex items-center gap-2">
<span class="text-sm text-gray-500">全局开关:</span>
<button id="chatbot-toggle-btn" onclick="toggleChatBot()"
class="relative inline-flex h-6 w-11 items-center rounded-full transition-colors {{ $chatbotEnabled ? 'bg-emerald-500' : 'bg-gray-300' }}">
<span
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {{ $chatbotEnabled ? 'translate-x-6' : 'translate-x-1' }}"></span>
</button>
<span id="chatbot-status-text"
class="text-sm font-bold {{ $chatbotEnabled ? 'text-emerald-600' : 'text-gray-400' }}">
{{ $chatbotEnabled ? '已开启' : '已关闭' }}
</span>
<div class="p-6">
<!-- 顶部栏:开关和添加按钮 -->
<div class="flex items-center justify-between border-b border-gray-100 pb-4 mb-4">
<div class="flex items-center gap-4">
<h2 class="text-lg font-bold text-gray-800">🤖 AI 聊天机器人配置</h2>
<div class="flex items-center gap-2">
<span class="text-sm text-gray-500">大厅状态:</span>
<button id="chatbot-toggle-btn" onclick="toggleChatBot()"
class="relative inline-flex h-6 w-11 items-center rounded-full transition-colors {{ $chatbotEnabled ? 'bg-emerald-500' : 'bg-gray-300' }}">
<span
class="inline-block h-4 w-4 transform rounded-full bg-white transition-transform {{ $chatbotEnabled ? 'translate-x-6' : 'translate-x-1' }}"></span>
</button>
<span id="chatbot-status-text"
class="text-sm font-bold {{ $chatbotEnabled ? 'text-emerald-600' : 'text-gray-400' }}">
{{ $chatbotEnabled ? '已开启' : '已关闭' }}
</span>
</div>
</div>
<button x-on:click="openNew()"
class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition font-bold text-sm">
+ 添加 AI 厂商
</button>
</div>
<button x-on:click="openNew()"
class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition font-bold text-sm">
+ 添加 AI 厂商
</button>
<!-- 交互参数表单 -->
<form action="{{ route('admin.ai-providers.update-settings') }}" method="POST" class="flex flex-wrap items-end gap-6">
@csrf
<div>
<label class="block text-sm font-bold text-gray-700 mb-1">系统打赏单次最高金币(上限)</label>
<div class="relative">
<input type="number" name="chatbot_max_gold" value="{{ $chatbotMaxGold }}" min="1" required
class="w-64 border border-gray-300 rounded-md p-2 pl-3 pr-8 text-sm focus:ring-indigo-500 focus:border-indigo-500">
<span class="absolute right-3 top-2.5 text-gray-400 text-sm"></span>
</div>
</div>
<div>
<label class="block text-sm font-bold text-gray-700 mb-1">每人每日最高获取红包次数限制</label>
<div class="relative">
<input type="number" name="chatbot_max_daily_rewards" value="{{ $chatbotMaxDailyRewards }}" min="1" required
class="w-64 border border-gray-300 rounded-md p-2 pl-3 pr-8 text-sm focus:ring-indigo-500 focus:border-indigo-500">
<span class="absolute right-3 top-2.5 text-gray-400 text-sm"></span>
</div>
</div>
<button type="submit"
class="px-6 py-2 bg-slate-800 text-white rounded-md font-bold hover:bg-slate-900 text-sm transition h-[38px]">
保存运行参数
</button>
</form>
</div>
</div>