修复: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
@@ -870,8 +870,10 @@
const recipient = document.getElementById('gift-recipient').value.trim();
const message = document.getElementById('gift-message').value.trim();
document.getElementById('gift-err').textContent = '';
// 先将商品数据保存到局部变量,再关闭弹框(closeGiftDialog 会把 _giftItem 设为 null
const item = _giftItem;
closeGiftDialog();
buyItem(_giftItem.id, _giftItem.name, _giftItem.price, recipient, message);
buyItem(item.id, item.name, item.price, recipient, message);
};
/** 购买商品(最终执行) */