翻译前

This commit is contained in:
2026-04-08 22:42:13 +08:00
parent 9266c83fe5
commit e8ad6696cd
2 changed files with 424 additions and 199 deletions
-154
View File
@@ -200,55 +200,6 @@
margin-bottom: 24px;
line-height: 1.6;
}
.product-price-box {
background: var(--card);
border-radius: 16px;
padding: 24px;
margin-bottom: 24px;
border: 1px solid var(--line);
}
.product-price {
font-size: 32px;
font-weight: 700;
color: var(--primary);
}
.product-price span { font-size: 16px; font-weight: 400; }
.product-original-price {
font-size: 16px;
color: var(--muted);
text-decoration: line-through;
margin-left: 12px;
}
.product-actions {
display: flex;
gap: 12px;
margin-bottom: 32px;
}
.btn-primary {
flex: 1;
padding: 16px 32px;
font-size: 16px;
font-weight: 600;
color: #fff;
background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
border: none;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(47, 107, 255, 0.3); }
.btn-secondary {
padding: 16px 24px;
font-size: 16px;
font-weight: 500;
color: var(--text);
background: var(--card);
border: 1px solid var(--line);
border-radius: 12px;
cursor: pointer;
transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
/* 产品亮点 */
.product-highlights {
@@ -532,9 +483,6 @@
<a href="help.html" class="navbar-btn" aria-label="Search">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
</a>
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
</button>
<a href="index.html#contact" class="navbar-cta">联系我们</a>
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
@@ -554,26 +502,6 @@
<p class="footer-text">© 2025 Chookoo 宠科智能科技(苏州)有限公司 保留所有权利</p>
</footer>
<!-- 购物弹窗 -->
<div class="contact-modal-overlay" id="shopModal">
<div class="contact-modal">
<button class="contact-modal-close" id="shopModalClose">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
<div class="contact-modal-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
</div>
<h3>官方旗舰店</h3>
<p>扫描二维码,进入官方店铺选购</p>
<div class="contact-qr-wrapper">
<div class="contact-qr-box"><img src="qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" /></div>
<div class="contact-qr-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="7" y1="7" x2="7" y2="7"/><line x1="17" y1="7" x2="17" y2="7"/><line x1="7" y1="12" x2="7" y2="12"/><line x1="17" y1="12" x2="17" y2="12"/><line x1="7" y1="17" x2="7" y2="17"/><line x1="17" y1="17" x2="17" y2="17"/></svg>
<span>扫码进店</span>
</div>
</div>
</div>
</div>
<script>
// 视口缩放 - 基于1920px设计稿
@@ -611,8 +539,6 @@
subtitle: 'AI健康监测,自动清洁,守护猫咪如厕健康',
image: 'cat.png',
tags: ['猫用', '热销'],
price: '¥1,999',
originalPrice: '¥2,499',
category: 'toilet',
highlights: [
'毫米波雷达监测心率呼吸',
@@ -643,8 +569,6 @@
subtitle: '入门之选,核心功能一应俱全',
image: 'cat.png',
tags: ['猫用', '新品'],
price: '¥999',
originalPrice: '¥1,299',
category: 'toilet',
highlights: [
'自动铲屎,解放双手',
@@ -675,8 +599,6 @@
subtitle: '科学如厕训练,智能清洁管理',
image: 'dog.jpeg',
tags: ['狗用'],
price: '¥1,299',
originalPrice: '',
category: 'toilet',
highlights: [
'智能诱导训练',
@@ -706,8 +628,6 @@
subtitle: '定时定量精准投喂,养成健康饮食习惯',
image: 'feeder.png',
tags: ['通用', '热销'],
price: '¥599',
originalPrice: '¥799',
category: 'feeding',
highlights: [
'定时定量投喂',
@@ -738,8 +658,6 @@
subtitle: '四重过滤循环净化,提升饮水健康',
image: 'water.jpeg',
tags: ['通用'],
price: '¥399',
originalPrice: '¥499',
category: 'feeding',
highlights: [
'四重过滤系统',
@@ -769,8 +687,6 @@
subtitle: '真空保鲜,智能控湿,锁住新鲜',
image: 'cat.png',
tags: ['猫用'],
price: '¥299',
originalPrice: '',
category: 'feeding',
highlights: [
'真空密封保鲜',
@@ -798,8 +714,6 @@
subtitle: '大容量设计,适合多狗家庭',
image: 'dog.jpeg',
tags: ['狗用'],
price: '¥399',
originalPrice: '',
category: 'feeding',
highlights: [
'超大容量',
@@ -827,8 +741,6 @@
subtitle: '1080P高清夜视,AI行为识别,双向语音',
image: 'camera.jpeg',
tags: ['通用', '新品'],
price: '¥399',
originalPrice: '¥499',
category: 'monitor',
highlights: [
'1080P高清画质',
@@ -858,8 +770,6 @@
subtitle: '轻便佩戴,实时监测活动量与睡眠',
image: 'cat.png',
tags: ['通用'],
price: '¥299',
originalPrice: '',
category: 'monitor',
highlights: [
'轻便舒适佩戴',
@@ -888,8 +798,6 @@
subtitle: '温湿度、空气质量实时监测',
image: 'dog.jpeg',
tags: ['通用'],
price: '¥199',
originalPrice: '',
category: 'monitor',
highlights: [
'温湿度监测',
@@ -919,8 +827,6 @@
subtitle: '适用于饮水机,建议3个月更换',
image: 'cat.png',
tags: ['配件'],
price: '¥79',
originalPrice: '',
category: 'accessories',
highlights: [
'四重过滤',
@@ -946,8 +852,6 @@
subtitle: '适用于智能厕所,保持卫生洁净',
image: 'dog.jpeg',
tags: ['配件'],
price: '¥99',
originalPrice: '',
category: 'accessories',
highlights: [
'含集便袋10个',
@@ -973,8 +877,6 @@
subtitle: '通用设计,支持全系产品',
image: 'cat.png',
tags: ['配件'],
price: '¥49',
originalPrice: '',
category: 'accessories',
highlights: [
'全系通用',
@@ -1001,8 +903,6 @@
subtitle: '额外1年保修,安心无忧',
image: 'dog.jpeg',
tags: ['服务'],
price: '¥99',
originalPrice: '',
category: 'accessories',
highlights: [
'额外1年保修',
@@ -1084,18 +984,6 @@
<h1 class="product-title">${product.name}</h1>
<p class="product-subtitle">${product.subtitle}</p>
<div class="product-price-box">
<span class="product-price">${product.price}</span>
${product.originalPrice ? `<span class="product-original-price">${product.originalPrice}</span>` : ''}
</div>
<div class="product-actions">
<button class="btn-primary" id="buyBtn">立即购买</button>
<button class="btn-secondary" id="favoriteBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
</button>
</div>
<div class="product-highlights">
<h3>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
@@ -1162,12 +1050,6 @@
</section>
` : ''}
`;
// 绑定购买按钮事件
document.getElementById('buyBtn').addEventListener('click', function() {
document.getElementById('shopModal').classList.add('active');
document.body.style.overflow = 'hidden';
});
}
// 初始化
@@ -1176,42 +1058,6 @@
const productId = urlParams.get('id') || 'cat-toilet-pro';
renderProduct(productId);
});
// 购物弹窗控制
const shopModal = document.getElementById('shopModal');
const shopBtn = document.getElementById('shopBtn');
const shopModalClose = document.getElementById('shopModalClose');
if (shopBtn) {
shopBtn.addEventListener('click', function(e) {
e.preventDefault();
shopModal.classList.add('active');
document.body.style.overflow = 'hidden';
});
}
if (shopModalClose) {
shopModalClose.addEventListener('click', function() {
shopModal.classList.remove('active');
document.body.style.overflow = '';
});
}
if (shopModal) {
shopModal.addEventListener('click', function(e) {
if (e.target === shopModal) {
shopModal.classList.remove('active');
document.body.style.overflow = '';
}
});
}
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && shopModal && shopModal.classList.contains('active')) {
shopModal.classList.remove('active');
document.body.style.overflow = '';
}
});
</script>
</body>
</html>