变更:求婚及离婚弹窗在有效期内重新刷新必现,并移除全局提示框的点击背景蒙层关闭功能强制操作

This commit is contained in:
2026-03-01 18:08:50 +08:00
parent 5bcbf74dfc
commit d7c6e0e7a8
3 changed files with 61 additions and 8 deletions
+22 -1
View File
@@ -165,7 +165,6 @@
});
</script>
@endif
{{-- 进房特效自动播放:新人烟花礼包 / 周卡特效 --}}
@if (!empty($newbieEffect) || !empty($weekEffect))
<script>
/**
@@ -184,6 +183,28 @@
</script>
@endif
{{-- 页面初始加载时,若存在挂起的求婚 / 离婚请求,则弹窗 --}}
@if (!empty($pendingProposal) || !empty($pendingDivorce))
<script>
document.addEventListener('DOMContentLoaded', () => {
// 等待短暂延迟以确保 Alpine 和 window.chatDialog 初始化完成
setTimeout(() => {
@if (!empty($pendingProposal))
window.dispatchEvent(new CustomEvent('chat:marriage-proposed', {
detail: @json($pendingProposal)
}));
@endif
@if (!empty($pendingDivorce))
window.dispatchEvent(new CustomEvent('chat:divorce-requested', {
detail: @json($pendingDivorce)
}));
@endif
}, 800);
});
</script>
@endif
</body>
</html>
@@ -180,11 +180,4 @@
},
};
})();
// 点击遮罩层关闭(等同点取消)
document.getElementById('global-dialog-modal').addEventListener('click', function(e) {
if (e.target === this) {
window.chatDialog._cancel();
}
});
</script>