From fc4c0c543e142e97639c47cc7ba7d5580f69c9c3 Mon Sep 17 00:00:00 2001 From: lkddi Date: Sun, 1 Mar 2026 16:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=92=93=E9=B1=BC=E5=8D=A1=E5=89=A9=E4=BD=99=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E7=A7=BB=E8=87=B3=E5=88=86=E7=BB=84=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=97=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 商品图标上去掉紫色时间徽章(避免每张卡都显示同值造成误解); 改为在「🎣 自动钓鱼卡」分组标题后方统一显示「⏳ 剩余 X 小时」紫色标签, 仅持有有效卡时出现。 --- .../views/chat/partials/toolbar.blade.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) 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}`; }