feat(ai): 将小班长升级为完全独立的实体用户并支持随机金币发放及持续在线刷级,设定为女兵人设并使用自定义头像
This commit is contained in:
@@ -45,7 +45,30 @@
|
||||
fishReelUrl: "{{ route('fishing.reel', $room->id) }}",
|
||||
chatBotUrl: "{{ route('chatbot.chat') }}",
|
||||
chatBotClearUrl: "{{ route('chatbot.clear') }}",
|
||||
chatBotEnabled: {{ \App\Models\Sysparam::getValue('chatbot_enabled', '0') === '1' ? 'true' : 'false' }},
|
||||
@php
|
||||
$chatbotEnabledState = \App\Models\Sysparam::getValue('chatbot_enabled', '0') === '1';
|
||||
$botUserData = null;
|
||||
if ($chatbotEnabledState) {
|
||||
$botUser = \App\Models\User::where('username', 'AI小班长')->first();
|
||||
if ($botUser) {
|
||||
$botUserData = [
|
||||
'user_id' => $botUser->id,
|
||||
'username' => $botUser->username,
|
||||
'level' => $botUser->user_level,
|
||||
'sex' => $botUser->sex,
|
||||
'headfaceUrl' => $botUser->headfaceUrl,
|
||||
'vip_icon' => $botUser->vipIcon(),
|
||||
'vip_name' => $botUser->vipName(),
|
||||
'vip_color' => $botUser->isVip() ? ($botUser->vipLevel?->color ?? '') : '',
|
||||
'is_admin' => false,
|
||||
'position_icon' => '',
|
||||
'position_name' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
chatBotEnabled: {{ $chatbotEnabledState ? 'true' : 'false' }},
|
||||
botUser: @json($botUserData),
|
||||
hasPosition: {{ Auth::user()->activePosition || Auth::user()->user_level >= $superLevel ? 'true' : 'false' }},
|
||||
@php
|
||||
$activePos = Auth::user()->activePosition;
|
||||
|
||||
Reference in New Issue
Block a user