diff --git a/resources/views/chat/partials/toolbar.blade.php b/resources/views/chat/partials/toolbar.blade.php index 0ddb40b..b475195 100644 --- a/resources/views/chat/partials/toolbar.blade.php +++ b/resources/views/chat/partials/toolbar.blade.php @@ -782,6 +782,8 @@ badge.style.display = 'inline-block'; } + const ringCounts = data.ring_counts || {}; + const groups = [{ label: '⚡ 单次特效卡', desc: '立即播放一次,仅自己可见', @@ -797,6 +799,11 @@ desc: '', type: 'one_time' }, + { + label: '💍 求婚戒指', + desc: '存入背包,求婚时消耗(被拒则遗失)', + type: 'ring' + }, ]; const list = document.getElementById('shop-items-list'); @@ -815,17 +822,31 @@ items.forEach(item => { const isRename = item.slug === 'rename_card'; const canUse = isRename && data.has_rename_card; + const isRing = item.type === 'ring'; + const ownedQty = isRing ? (ringCounts[item.id] || 0) : 0; const card = document.createElement('div'); card.className = 'shop-card'; - // 顶部:图标 + 名称 + // 顶部:图标 + 名称(戒指加持有数徽章) + const iconHtml = isRing && ownedQty > 0 ? + ` + + ${ownedQty} + ` : + ``; + card.innerHTML = `