优化:求婚前提示最低婚礼费用并检查金币余额

点击「送出求婚」前弹出确认弹窗:
  💍 确认向【XXX】发出求婚吗?
  📋 婚礼费用说明:
    • 婚礼最低费用:🪙 5,888 金币
    • 您当前金币:🪙 XXX 金币
  ⚠️ 戒指一旦送出即消耗,对方拒绝则戒指遗失。

金币不足时:直接拦截并弹 alert 说明,不发出请求
金币充足时:需确认后才发出求婚请求

同时在 chatContext 注入 userJjb 和 minWeddingCost
This commit is contained in:
2026-03-01 17:19:27 +08:00
parent 9c4598ab66
commit 9ccc0b379d
2 changed files with 34 additions and 0 deletions
+2
View File
@@ -62,7 +62,9 @@
revokeUrl: "{{ route('chat.appoint.revoke') }}",
rewardUrl: "{{ route('command.reward') }}",
rewardQuotaUrl: "{{ route('command.reward_quota') }}",
userJjb: {{ (int) $user->jjb }}, // 当前用户金币(求婚前金额预检查用)
// ─── 婚姻系统 ──────────────────────────────
minWeddingCost: {{ (int) \App\Models\WeddingTier::where('is_active', true)->orderBy('amount')->value('amount') ?? 0 }},
marriage: {
proposeUrl: "{{ route('marriage.propose') }}",
statusUrl: "{{ route('marriage.status') }}",