优化:去掉装饰品数量弹窗,改为确认对话框中提示叠加天数说明

This commit is contained in:
pllx
2026-04-28 13:10:15 +08:00
parent a2b09da730
commit 2be7e6caef
+3 -9
View File
@@ -548,16 +548,10 @@ async function confirmAndBuyItem(item) {
}
}
// 个性装扮支持多份购买(叠加天数),弹出数量选择
if (DECORATION_TYPE_TO_SLOT[item.type] && item.type !== "sign_repair") {
quantity = await window.promptQuantity?.(`购买多份【${item.name}】可叠加天数\n已激活的同款续购自动延长,无需一次买满`, 1, 99) ?? 1;
if (quantity === null || quantity === undefined) {
return;
}
}
const validityText = buildValidityText(item);
const confirmMessage = `确认花费 💰 ${Number(Number(item.price || 0) * quantity).toLocaleString()} 金币购买\n${item.name}${quantity > 1 ? ` × ${quantity}` : ""}${validityText ? `\n${validityText}` : ""}\n\n确定购买吗?`;
const isDecoration = DECORATION_TYPE_TO_SLOT[item.type] && item.type !== "sign_repair";
const stackingHint = isDecoration ? "\\n\\n💡 已激活的同款续购自动叠加天数,可多次购买" : "";
const confirmMessage = `确认花费 💰 ${Number(Number(item.price || 0) * quantity).toLocaleString()} 金币购买\\n【${item.name}${quantity > 1 ? ` × ${quantity}` : ""}${validityText ? `\\n${validityText}` : ""}${stackingHint}\\n\\n确定购买吗?`;
const confirmed = await confirmShopPurchase(confirmMessage);
if (confirmed) {