diff --git a/resources/views/chat/partials/marriage-modals.blade.php b/resources/views/chat/partials/marriage-modals.blade.php index a39ca71..72b90d1 100644 --- a/resources/views/chat/partials/marriage-modals.blade.php +++ b/resources/views/chat/partials/marriage-modals.blade.php @@ -269,6 +269,76 @@ +{{-- ═══════════ 3.5. 离婚全屏公告(阴郁深色风格 + 雷雨特效) ═══════════ --}} +
+
+
+ {{-- 头部 --}} +
+ {{-- 断裂心形动效 --}} +
+ 💔 +
+
+ — 缘尽于此 — +
+
+
+
+ {{-- 底部按钮 --}} +
+ +
+
+
+
+ + + + {{-- ═══════════ 4. 婚礼设置弹窗 ═══════════ --}}
{ + if (window.EffectManager) { + window.EffectManager.play('rain'); + } + }, 3500); + } + }, + + close() { + this.show = false; + } + }; + } + + /** * 婚礼设置弹窗组件 */ @@ -978,7 +1083,7 @@ window.chatDialog?.alert(`+${amount.toLocaleString()} 金币已到账 🎉`, '红包到手!', '#f59e0b'); }); - /** 结婚/离婚全局公告:在聊天消息区追加一条系统消息 */ + /** 结婚/离婚全局公告:弹出全屏通知 + 追加公屏文字 */ window.addEventListener('chat:marriage-accepted', (e) => { const detail = e.detail; const groomName = detail.user?.username ?? detail.groom_name ?? '??'; @@ -986,17 +1091,25 @@ if (typeof appendSystemMessage === 'function') { appendSystemMessage(`💑 ${groomName} 与 ${brideName} 喜结连理!`); } + // 触发全屏结婚公告弹窗(由 marriageAcceptedModal 组件监听此事件) + const modal = document.getElementById('marriage-accepted-modal')?._x_dataStack?.[0]; + if (modal && typeof modal.open === 'function') modal.open(detail); }); + window.addEventListener('chat:marriage-divorced', (e) => { - const { - user_username, - partner_username - } = e.detail; + const detail = e.detail; + const userName = detail.user_username ?? detail.user?.username ?? '??'; + const partnerName = detail.partner_username ?? detail.partner?.username ?? '??'; + // 追加公屏文字 if (typeof appendSystemMessage === 'function') { - appendSystemMessage(`💔 ${user_username} 与 ${partner_username} 解除了婚姻关系。`); + appendSystemMessage(`💔 ${userName} 与 ${partnerName} 解除了婚姻关系。`); } + // 触发全屏离婚公告弹窗(暗色阴郁风格 + 雷雨特效) + const modal = document.getElementById('marriage-divorced-modal')?._x_dataStack?.[0]; + if (modal && typeof modal.open === 'function') modal.open(detail); }); + /** 页面加载完成后初始化私人频道监听 */ document.addEventListener('DOMContentLoaded', () => { const userId = window.chatContext?.userId;