修复:confirmGift null错误(先保存item再关弹框);MessageSent改为ShouldBroadcastNow立即广播;修复route()引号冲突

This commit is contained in:
2026-02-27 16:26:16 +08:00
parent 6a8ba4fbc8
commit 157aee3812
3 changed files with 9 additions and 6 deletions

View File

@@ -117,8 +117,8 @@ class ShopController extends Controller
: '';
$sysContent = "{$icon}{$user->username}】送出了一张 [{$item->name}],赠给 {$toStr}{$msgText}";
// 广播系统消息到公屏
broadcast(new MessageSent(
// 广播系统消息到公屏ShouldBroadcastNow 模式)
$sysMsgEvent = new MessageSent(
roomId: $roomId,
message: [
'id' => 0,
@@ -129,7 +129,8 @@ class ShopController extends Controller
'color' => '#cc6600',
'created_at' => now()->toDateTimeString(),
]
));
);
broadcast($sysMsgEvent);
}
}