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 ? `