From 4d6e96836865913dfb8b27b70cb52e0b2a4bae0e Mon Sep 17 00:00:00 2001 From: ikmkj Date: Thu, 19 Mar 2026 17:14:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B4=AD=E4=B9=B0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=B8=A6?= =?UTF-8?q?pid=E7=9A=84=E8=B4=AD=E7=89=A9=E8=BD=A6=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 11e940f..3b48dce 100644 --- a/public/index.html +++ b/public/index.html @@ -839,6 +839,7 @@ remaining: '', promoCode: '', duration: '', + buyUrl: '', isSoldOut: false }; @@ -930,8 +931,14 @@ let buyBtn = card.querySelector('.form-footer-butt'); if (!buyBtn) buyBtn = card.querySelector('.cat-styleBform-footer-butt'); if (!buyBtn) buyBtn = card.querySelector('.cat-styleCform-footer a'); - if (buyBtn && buyBtn.classList.contains('disableButton')) { - product.isSoldOut = true; + if (buyBtn) { + if (buyBtn.classList.contains('disableButton')) { + product.isSoldOut = true; + } + const href = buyBtn.getAttribute('href'); + if (href && href.includes('pid')) { + product.buyUrl = 'https://www.szhdy.com' + href; + } } return product; @@ -989,9 +996,9 @@ ${product.oldPrice ? `
原价: ¥${escapeHtml(product.oldPrice)}
` : ''} - ${isSoldOut + ${isSoldOut ? '已售罄' - : `立即购买` + : `立即购买` }