迁移钓鱼游戏脚本
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
$operatorActivePosition = Auth::user()->activePosition?->load('position.department')->position;
|
||||
$operatorDepartmentRank = (int) ($operatorActivePosition?->department?->rank ?? 0);
|
||||
$operatorPositionRank = (int) ($operatorActivePosition?->rank ?? 0);
|
||||
// 自动钓鱼状态下发给 Vite 模块,避免钓鱼面板继续在 Blade 内写业务脚本。
|
||||
$autoFishingMinutesLeft = app(\App\Services\ShopService::class)->getActiveAutoFishingMinutesLeft(Auth::user());
|
||||
$fishingCooldownKey = 'fishing:cd:'.Auth::id();
|
||||
$fishingCooldownSeconds = \Illuminate\Support\Facades\Redis::ttl($fishingCooldownKey);
|
||||
$fishingCooldownSeconds = $fishingCooldownSeconds > 0 ? $fishingCooldownSeconds : 0;
|
||||
@endphp
|
||||
<script>
|
||||
window.chatContext = {
|
||||
@@ -49,6 +54,8 @@
|
||||
heartbeatUrl: "{{ route('chat.heartbeat', $room->id) }}",
|
||||
fishCastUrl: "{{ route('fishing.cast', $room->id) }}",
|
||||
fishReelUrl: "{{ route('fishing.reel', $room->id) }}",
|
||||
autoFishingMinutesLeft: {{ (int) $autoFishingMinutesLeft }},
|
||||
fishingCooldownSeconds: {{ (int) $fishingCooldownSeconds }},
|
||||
chatBotUrl: "{{ route('chatbot.chat') }}",
|
||||
chatBotClearUrl: "{{ route('chatbot.clear') }}",
|
||||
@php
|
||||
|
||||
Reference in New Issue
Block a user