diff --git a/resources/views/chat/partials/toolbar.blade.php b/resources/views/chat/partials/toolbar.blade.php index 6f6956e..e7060eb 100644 --- a/resources/views/chat/partials/toolbar.blade.php +++ b/resources/views/chat/partials/toolbar.blade.php @@ -821,7 +821,16 @@ // 分组标题(独占一整行) const header = document.createElement('div'); header.className = 'shop-group-header'; - header.innerHTML = `${g.label}${g.desc ? ` ${g.desc}` : ''}`; + + // 自动钓鱼卡分组:若持有有效卡,在标题后附加剩余时间徽章 + let groupSuffix = ''; + if (g.type === 'auto_fishing' && (data.auto_fishing_minutes_left || 0) > 0) { + const left = data.auto_fishing_minutes_left; + const leftStr = left >= 60 ? Math.floor(left / 60) + ' 小时' : left + ' 分钟'; + groupSuffix = + ` ⏳ 剩余 ${leftStr}`; + } + header.innerHTML = `${g.label}${groupSuffix}${g.desc ? ` ${g.desc}` : ''}`; list.appendChild(header); items.forEach(item => { @@ -833,9 +842,8 @@ const card = document.createElement('div'); card.className = 'shop-card'; - // 顶部:图标 + 名称(戒指/自动钓鱼卡加徽章) + // 顶部:图标 + 名称(戒指加持有数徽章,其余正常显示) const isAutoFishing = item.type === 'auto_fishing'; - const autoFishLeft = isAutoFishing ? (data.auto_fishing_minutes_left || 0) : 0; let iconHtml; if (isRing && ownedQty > 0) { @@ -843,13 +851,6 @@ ${item.icon} ${ownedQty} `; - } else if (isAutoFishing && autoFishLeft > 0) { - const hLeft = autoFishLeft >= 60 ? Math.floor(autoFishLeft / 60) + 'h' : - autoFishLeft + 'm'; - iconHtml = ` - ${item.icon} - ${hLeft} - `; } else { iconHtml = `${item.icon}`; }