feat: add product encyclopedia and whole house smart pages

This commit is contained in:
shenghuo2
2025-06-21 10:06:03 +08:00
parent 8af49d63b8
commit 0568cd5b55
5 changed files with 944 additions and 7 deletions

128
product-encyclopedia.html Normal file
View File

@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>产品百科 - 米家智能家居</title>
<link rel="stylesheet" href="styles/common.css">
<link rel="stylesheet" href="styles/product-encyclopedia.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<div class="container" id="product-encyclopedia-page">
<!-- 头部导航 -->
<header class="page-header">
<div class="header-content">
<button class="back-btn" onclick="history.back()">
<i class="fas fa-chevron-left"></i>
</button>
<h1 class="page-title">产品百科</h1>
</div>
</header>
<!-- 搜索栏 -->
<div class="search-section">
<div class="search-box">
<i class="fas fa-search"></i>
<input type="text" placeholder="请输入产品名称" class="search-input">
</div>
</div>
<!-- 分类导航 -->
<div class="category-nav">
<div class="category-item active">
<div class="category-icon">
<i class="fas fa-home"></i>
</div>
<span>全屋智能</span>
</div>
<div class="category-item">
<div class="category-icon">
<i class="fas fa-desktop"></i>
</div>
<span>网关攻略</span>
</div>
<div class="category-item">
<div class="category-icon">
<i class="fas fa-server"></i>
</div>
<span>蓝牙连接</span>
</div>
<div class="category-item">
<div class="category-icon">
<i class="fas fa-th"></i>
</div>
<span>功能更新</span>
</div>
</div>
<!-- 新上线产品 -->
<div class="section">
<div class="section-header">
<h2>新上线</h2>
<i class="fas fa-chevron-right"></i>
</div>
<div class="product-list">
<div class="product-item">
<div class="product-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 120'%3E%3Crect width='80' height='120' fill='%23333' rx='8'/%3E%3Crect x='10' y='20' width='60' height='80' fill='%23555' rx='4'/%3E%3Ccircle cx='40' cy='110' r='3' fill='%23777'/%3E%3C/svg%3E" alt="米家冰箱">
</div>
<div class="product-info">
<h3>米家冰箱 对开门501L 墨羽岩</h3>
<p class="product-brand">小米出品</p>
</div>
</div>
<div class="product-item">
<div class="product-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Crect width='100' height='60' fill='%23f5f5f5' rx='8'/%3E%3Crect x='10' y='15' width='80' height='30' fill='%23ddd' rx='4'/%3E%3Ccircle cx='20' cy='30' r='5' fill='%23666'/%3E%3Ctext x='50' y='35' text-anchor='middle' font-size='8' fill='%23666'%3E画法几何%3C/text%3E%3C/svg%3E" alt="画法几何智能鱼缸">
</div>
<div class="product-info">
<h3>画法几何智能鱼缸 M1</h3>
<p class="product-brand">画法几何</p>
</div>
</div>
</div>
</div>
<!-- 清洁电器 -->
<div class="section">
<div class="section-header">
<h2>清洁电器</h2>
<i class="fas fa-chevron-right"></i>
</div>
<div class="product-list">
<div class="product-item">
<div class="product-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='35' fill='%23333'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23555'/%3E%3Ccircle cx='40' cy='40' r='15' fill='%23777'/%3E%3Ctext x='40' y='45' text-anchor='middle' font-size='8' fill='white'%3E云米%3C/text%3E%3C/svg%3E" alt="云米洗烘一体机">
</div>
<div class="product-info">
<h3>云米洗烘一体机 (10kg语音版)</h3>
<p class="product-brand">云米</p>
</div>
</div>
<div class="product-item">
<div class="product-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='35' fill='%23444'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23666'/%3E%3Ccircle cx='40' cy='40' r='15' fill='%23888'/%3E%3Ctext x='40' y='45' text-anchor='middle' font-size='8' fill='white'%3E云米%3C/text%3E%3C/svg%3E" alt="云米洗衣机">
</div>
<div class="product-info">
<h3>云米洗衣机 (9kg/10kg语音版)</h3>
<p class="product-brand">云米</p>
</div>
</div>
</div>
</div>
<!-- 安防 -->
<div class="section">
<div class="section-header">
<h2>安防</h2>
<i class="fas fa-chevron-right"></i>
</div>
</div>
</div>
<script src="scripts/main.js"></script>
</body>
</html>

View File

@ -43,13 +43,13 @@
</div> </div>
<span>米家众测</span> <span>米家众测</span>
</div> </div>
<div class="feature-card"> <div class="feature-card" onclick="location.href='product-encyclopedia.html'">
<div class="feature-icon" style="background: linear-gradient(135deg, #f093fb, #f5576c);"> <div class="feature-icon" style="background: linear-gradient(135deg, #f093fb, #f5576c);">
<i class="fas fa-book"></i> <i class="fas fa-book"></i>
</div> </div>
<span>产品百科</span> <span>产品百科</span>
</div> </div>
<div class="feature-card"> <div class="feature-card" onclick="window.location.href='whole-house-smart.html'">
<div class="feature-icon" style="background: linear-gradient(135deg, #4facfe, #00f2fe);"> <div class="feature-icon" style="background: linear-gradient(135deg, #4facfe, #00f2fe);">
<i class="fas fa-home"></i> <i class="fas fa-home"></i>
</div> </div>

View File

@ -0,0 +1,309 @@
/* 产品百科页面样式 */
#product-encyclopedia-page {
background: #f8f9fa;
min-height: 100vh;
padding-bottom: 20px;
}
/* 页面头部 */
.page-header {
background: white;
padding: 12px 0;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 100;
}
.header-content {
display: flex;
align-items: center;
padding: 0 16px;
max-width: 414px;
margin: 0 auto;
}
.back-btn {
background: none;
border: none;
font-size: 18px;
color: #333;
padding: 8px;
margin-right: 12px;
cursor: pointer;
border-radius: 50%;
transition: background-color 0.2s;
}
.back-btn:hover {
background-color: #f5f5f5;
}
.page-title {
font-size: 18px;
font-weight: 600;
color: #333;
margin: 0;
flex: 1;
text-align: center;
margin-right: 32px;
}
/* 搜索区域 */
.search-section {
padding: 16px;
background: white;
margin-bottom: 8px;
}
.search-box {
position: relative;
background: #f5f5f5;
border-radius: 20px;
padding: 12px 16px;
display: flex;
align-items: center;
}
.search-box i {
color: #999;
margin-right: 8px;
font-size: 14px;
}
.search-input {
border: none;
background: none;
outline: none;
flex: 1;
font-size: 14px;
color: #333;
}
.search-input::placeholder {
color: #999;
}
/* 分类导航 */
.category-nav {
display: flex;
justify-content: space-around;
background: white;
padding: 16px 8px;
margin-bottom: 8px;
}
.category-item {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
transition: all 0.2s;
padding: 8px;
border-radius: 8px;
}
.category-item:hover {
background-color: #f5f5f5;
}
.category-item.active .category-icon {
background: linear-gradient(135deg, #4ECDC4, #44A08D);
color: white;
}
.category-icon {
width: 40px;
height: 40px;
border-radius: 8px;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 4px;
transition: all 0.2s;
}
.category-icon i {
font-size: 16px;
color: #666;
}
.category-item.active .category-icon i {
color: white;
}
.category-item span {
font-size: 12px;
color: #666;
text-align: center;
}
.category-item.active span {
color: #4ECDC4;
font-weight: 500;
}
/* 产品区域 */
.section {
background: white;
margin-bottom: 8px;
padding: 16px;
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
.section-header h2 {
font-size: 16px;
font-weight: 600;
color: #333;
margin: 0;
}
.section-header i {
color: #999;
font-size: 14px;
}
/* 产品列表 */
.product-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.product-item {
display: flex;
align-items: center;
padding: 12px;
background: #f8f9fa;
border-radius: 12px;
transition: all 0.2s;
cursor: pointer;
}
.product-item:hover {
background: #f0f0f0;
transform: translateY(-1px);
}
.product-image {
width: 60px;
height: 60px;
border-radius: 8px;
overflow: hidden;
margin-right: 12px;
background: white;
display: flex;
align-items: center;
justify-content: center;
}
.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.product-info {
flex: 1;
}
.product-info h3 {
font-size: 14px;
font-weight: 500;
color: #333;
margin: 0 0 4px 0;
line-height: 1.4;
}
.product-brand {
font-size: 12px;
color: #999;
margin: 0;
}
/* 响应式设计 */
@media (max-width: 375px) {
.category-nav {
padding: 12px 4px;
}
.category-item {
padding: 4px;
}
.category-icon {
width: 36px;
height: 36px;
}
.category-icon i {
font-size: 14px;
}
.category-item span {
font-size: 11px;
}
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.section {
animation: fadeInUp 0.3s ease-out;
}
.product-item {
animation: fadeInUp 0.3s ease-out;
}
.product-item:nth-child(2) {
animation-delay: 0.1s;
}
.product-item:nth-child(3) {
animation-delay: 0.2s;
}
/* 加载状态 */
.loading {
display: flex;
justify-content: center;
align-items: center;
padding: 40px;
color: #999;
}
.loading::after {
content: '';
width: 20px;
height: 20px;
border: 2px solid #f3f3f3;
border-top: 2px solid #4ECDC4;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-left: 8px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

View File

@ -0,0 +1,376 @@
/* 全屋智能页面样式 */
#whole-house-smart-page {
background-color: #f5f5f5;
min-height: 100vh;
padding-bottom: 20px;
}
/* 页面头部 */
.page-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
max-width: 1200px;
margin: 0 auto;
}
.back-btn, .info-btn {
background: none;
border: none;
color: white;
font-size: 18px;
padding: 8px;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.3s ease;
}
.back-btn:hover, .info-btn:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.page-title {
font-size: 18px;
font-weight: 600;
margin: 0;
}
/* 分类导航 */
.category-section {
background: white;
margin: 20px;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.category-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 20px;
text-align: center;
}
.category-item {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
transition: transform 0.3s ease;
}
.category-item:hover {
transform: translateY(-2px);
}
.category-icon {
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 8px;
color: white;
font-size: 20px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.category-item span {
font-size: 12px;
color: #333;
font-weight: 500;
}
/* 1V1定制服务 */
.service-section {
margin: 20px;
}
.service-card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.service-card h2 {
font-size: 16px;
font-weight: 600;
margin: 0 0 15px 0;
color: #333;
}
.service-banner {
background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
border-radius: 12px;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
position: relative;
overflow: hidden;
}
.banner-text h3 {
font-size: 18px;
font-weight: 600;
margin: 0 0 5px 0;
}
.banner-text p {
font-size: 14px;
margin: 0 0 15px 0;
opacity: 0.9;
}
.detail-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.detail-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-1px);
}
.banner-image {
width: 80px;
height: 60px;
}
.banner-image img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}
/* 自己动手搭建 */
.diy-section {
margin: 20px;
}
.diy-card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.diy-card h2 {
font-size: 16px;
font-weight: 600;
margin: 0 0 15px 0;
color: #333;
}
.diy-content {
display: flex;
flex-direction: column;
gap: 15px;
}
.diy-item {
background: #f8f9fa;
border-radius: 12px;
padding: 15px;
display: flex;
align-items: center;
gap: 15px;
}
.diy-image {
width: 80px;
height: 60px;
flex-shrink: 0;
}
.diy-image img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}
.diy-info {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
}
.diy-info p {
margin: 0;
font-size: 14px;
color: #333;
font-weight: 500;
}
.guide-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 12px;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}
.guide-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
/* 全屋智能入门套餐 */
.package-section {
margin: 20px;
}
.package-card {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.package-header {
margin-bottom: 15px;
}
.package-header h2 {
font-size: 16px;
font-weight: 600;
margin: 0 0 5px 0;
color: #333;
}
.package-header p {
font-size: 14px;
color: #666;
margin: 0;
}
.package-image {
width: 100%;
height: 120px;
}
.package-image img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.category-grid {
grid-template-columns: repeat(5, 1fr);
gap: 15px;
}
.category-icon {
width: 45px;
height: 45px;
font-size: 18px;
}
.category-item span {
font-size: 11px;
}
.service-banner {
flex-direction: column;
text-align: center;
gap: 15px;
}
.banner-image {
width: 100px;
height: 70px;
}
.diy-item {
flex-direction: column;
text-align: center;
gap: 10px;
}
.diy-info {
flex-direction: column;
gap: 10px;
}
}
@media (max-width: 480px) {
.category-grid {
grid-template-columns: repeat(3, 1fr);
}
.page-header {
padding: 12px 0;
}
.header-content {
padding: 0 15px;
}
.service-section,
.diy-section,
.package-section,
.category-section {
margin: 15px;
}
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.category-section,
.service-section,
.diy-section,
.package-section {
animation: fadeInUp 0.6s ease-out;
}
.service-section {
animation-delay: 0.1s;
}
.diy-section {
animation-delay: 0.2s;
}
.package-section {
animation-delay: 0.3s;
}

124
whole-house-smart.html Normal file
View File

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>全屋智能 - 米家智能家居</title>
<link rel="stylesheet" href="styles/common.css">
<link rel="stylesheet" href="styles/whole-house-smart.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<div class="container" id="whole-house-smart-page">
<!-- 头部导航 -->
<header class="page-header">
<div class="header-content">
<button class="back-btn" onclick="history.back()">
<i class="fas fa-chevron-left"></i>
</button>
<h1 class="page-title">全屋智能</h1>
<button class="info-btn">
<i class="fas fa-info-circle"></i>
</button>
</div>
</header>
<!-- 分类导航 -->
<div class="category-section">
<div class="category-grid">
<div class="category-item">
<div class="category-icon" style="background: linear-gradient(135deg, #4ECDC4, #44A08D);">
<i class="fas fa-wifi"></i>
</div>
<span>家居中枢</span>
</div>
<div class="category-item">
<div class="category-icon" style="background: linear-gradient(135deg, #FFD93D, #FF6B6B);">
<i class="fas fa-lightbulb"></i>
</div>
<span>智能照明</span>
</div>
<div class="category-item">
<div class="category-icon" style="background: linear-gradient(135deg, #667eea, #764ba2);">
<i class="fas fa-shield-alt"></i>
</div>
<span>智能安防</span>
</div>
<div class="category-item">
<div class="category-icon" style="background: linear-gradient(135deg, #f093fb, #f5576c);">
<i class="fas fa-thermometer-half"></i>
</div>
<span>智能温控</span>
</div>
<div class="category-item">
<div class="category-icon" style="background: linear-gradient(135deg, #4facfe, #00f2fe);">
<i class="fas fa-window-maximize"></i>
</div>
<span>智能窗帘</span>
</div>
</div>
</div>
<!-- 1V1定制服务 -->
<div class="service-section">
<div class="service-card">
<h2>1V1 定制服务</h2>
<div class="service-content">
<div class="service-banner">
<div class="banner-text">
<h3>小米全屋智能定制</h3>
<p>设计·安装·调试,一站式服务</p>
<button class="detail-btn">了解详情</button>
</div>
<div class="banner-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'%3E%3Crect width='120' height='80' fill='%23FFD93D' rx='8'/%3E%3Crect x='20' y='20' width='80' height='40' fill='%23FFA500' rx='4'/%3E%3Ccircle cx='100' cy='20' r='8' fill='%23FF6B6B'/%3E%3Ctext x='60' y='45' text-anchor='middle' font-size='10' fill='white'%3E智能家居%3C/text%3E%3C/svg%3E" alt="智能家居定制">
</div>
</div>
</div>
</div>
</div>
<!-- 自己动手搭建 -->
<div class="diy-section">
<div class="diy-card">
<h2>自己动手,搭建全屋智能</h2>
<div class="diy-content">
<div class="diy-item">
<div class="diy-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'%3E%3Crect width='120' height='80' fill='%23f5f5f5' rx='8'/%3E%3Crect x='20' y='20' width='80' height='40' fill='%23ddd' rx='4'/%3E%3Ccircle cx='30' cy='30' r='5' fill='%23666'/%3E%3Ccircle cx='90' cy='30' r='5' fill='%23666'/%3E%3Ctext x='60' y='45' text-anchor='middle' font-size='8' fill='%23666'%3E智能开关%3C/text%3E%3C/svg%3E" alt="智能开关">
</div>
<div class="diy-info">
<p>智能开关、智能灯如何选择?</p>
<button class="guide-btn">立即查看</button>
</div>
</div>
<div class="diy-item">
<div class="diy-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'%3E%3Crect width='120' height='80' fill='%23e8f5e8' rx='8'/%3E%3Crect x='30' y='25' width='60' height='30' fill='%23a8d8a8' rx='4'/%3E%3Ccircle cx='45' cy='40' r='3' fill='%234a7c59'/%3E%3Ccircle cx='75' cy='40' r='3' fill='%234a7c59'/%3E%3Ctext x='60' y='70' text-anchor='middle' font-size='8' fill='%23666'%3E智能指南%3C/text%3E%3C/svg%3E" alt="小米全屋智能指南">
</div>
<div class="diy-info">
<p>小米全屋智能指南</p>
<button class="guide-btn">立即查看</button>
</div>
</div>
</div>
</div>
</div>
<!-- 全屋智能入门套餐 -->
<div class="package-section">
<div class="package-card">
<div class="package-header">
<h2>全屋智能入门套餐</h2>
<p>必备6大单品</p>
</div>
<div class="package-image">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 100'%3E%3Crect width='150' height='100' fill='%23f8f9fa' rx='8'/%3E%3Crect x='20' y='20' width='25' height='15' fill='%23333' rx='2'/%3E%3Crect x='55' y='20' width='25' height='15' fill='%23666' rx='2'/%3E%3Crect x='90' y='20' width='25' height='15' fill='%23999' rx='2'/%3E%3Crect x='20' y='45' width='25' height='15' fill='%23333' rx='2'/%3E%3Crect x='55' y='45' width='25' height='15' fill='%23666' rx='2'/%3E%3Crect x='90' y='45' width='25' height='15' fill='%23999' rx='2'/%3E%3Ctext x='75' y='85' text-anchor='middle' font-size='10' fill='%23666'%3E智能套餐%3C/text%3E%3C/svg%3E" alt="全屋智能套餐">
</div>
</div>
</div>
</div>
<script src="scripts/main.js"></script>
</body>
</html>