feat: 更新亚克力机箱-单详情页及 skills 配置优化
This commit is contained in:
@@ -19,30 +19,33 @@ description: 设计电商产品的详情页。当用户需要为产品生成详
|
||||
|
||||
### 步骤 1: 读取 SKU 配置
|
||||
|
||||
从 `产品/{产品线}/{产品名}/sku/` 目录下的 markdown 文件读取产品配置。
|
||||
从 `产品` 目录下找到对应的产品目录
|
||||
|
||||
文件格式示例:
|
||||
```
|
||||
亚克力-单-AMD-A4-2G-16G.md
|
||||
```
|
||||
|
||||
### 步骤 2: 渲染 HTML 模板
|
||||
### 步骤 2: 生成 HTML 文件
|
||||
|
||||
使用 `scripts/render.js` 脚本,将 SKU 数据填充到 HTML 模板中:
|
||||
#### 详情页组成部分
|
||||
- 购买须知
|
||||
- 亚克力机箱需要自己组装,店铺会提供安装视频
|
||||
- 受成本限制,产品无法做到十全十美,完美主义者慎拍
|
||||
- 配置清单
|
||||
- 功能描述
|
||||
- 产品实拍图
|
||||
- 配件清单
|
||||
- 包装展示
|
||||
- 常见问题
|
||||
1. 产品是否支持双CPU?
|
||||
2. 产品是否支持双内存条
|
||||
3. 产品是否支持双硬盘
|
||||
- 严格按照详情页组成生成详情页,多余的删除掉
|
||||
- 需要用的产品图片,都放在对应产品目录的image目录下
|
||||
- html 按照1000*1000的分辨率生成
|
||||
- 一个产品有多个sku,但一个产品只需要一个详情页,不需要为每个sku生成详情页
|
||||
- 详情页放到每个产品对应的`详情`目录下
|
||||
- 配色采用科技风格
|
||||
- 单个页面放不下,采用-1 -2 的方式拆分多个页面
|
||||
|
||||
```bash
|
||||
cd .codebuddy/skills/product-detail-designer/scripts
|
||||
node render.js <sku文件路径> [输出目录]
|
||||
```
|
||||
|
||||
模板位置:`assets/templates/{产品类型}/`
|
||||
|
||||
可用模板变量:
|
||||
- `{{PRODUCT_NAME}}` - 产品名称
|
||||
- `{{SKU_CODE}}` - SKU 编码
|
||||
- `{{CPU}}` / `{{MEMORY}}` / `{{STORAGE}}` - 核心配置
|
||||
- `{{TOTAL_COST}}` / `{{RETAIL_PRICE}}` - 价格信息
|
||||
- `{{NOTE}}` - 备注信息
|
||||
|
||||
### 步骤 3: HTML 转 PNG 图片
|
||||
|
||||
@@ -60,19 +63,3 @@ node convert-html-to-png.js
|
||||
```bash
|
||||
node remove-watermark.js
|
||||
```
|
||||
|
||||
## 资源说明
|
||||
|
||||
### scripts/
|
||||
|
||||
- `render.js` - HTML 模板渲染脚本,读取 SKU markdown 并生成对应的 HTML 文件
|
||||
|
||||
### assets/templates/
|
||||
|
||||
- `亚克力单/` - 亚克力单机箱详情页模板(7个 HTML 模板)
|
||||
- `亚克力双/` - (预留)
|
||||
- 其他产品模板可按需添加
|
||||
|
||||
### references/
|
||||
|
||||
- `产品配置规范.md` - 产品设计原则、SKU 命名规则、页面设计规范
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>使用场景 - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.scenario-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 30px;
|
||||
}
|
||||
.scenario-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 15px;
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.scenario-icon {
|
||||
font-size: 70px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.scenario-title {
|
||||
font-size: 28px;
|
||||
color: #004d40;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.scenario-desc {
|
||||
font-size: 20px;
|
||||
color: #00796b;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">使用场景</div>
|
||||
|
||||
<div class="scenario-grid">
|
||||
<div class="scenario-item">
|
||||
<div class="scenario-icon">🏠</div>
|
||||
<div class="scenario-title">家庭数据中心</div>
|
||||
<div class="scenario-desc">集中存储家庭照片、视频、文档,全家共享访问</div>
|
||||
</div>
|
||||
<div class="scenario-item">
|
||||
<div class="scenario-icon">💼</div>
|
||||
<div class="scenario-title">小型办公</div>
|
||||
<div class="scenario-desc">团队文件共享,数据集中管理,提升工作效率</div>
|
||||
</div>
|
||||
<div class="scenario-item">
|
||||
<div class="scenario-icon">🎬</div>
|
||||
<div class="scenario-title">影音娱乐</div>
|
||||
<div class="scenario-desc">搭建家庭影院,存储高清电影,随时观看</div>
|
||||
</div>
|
||||
<div class="scenario-item">
|
||||
<div class="scenario-icon">📚</div>
|
||||
<div class="scenario-title">学习资料库</div>
|
||||
<div class="scenario-desc">存储学习资料、电子书籍,构建个人知识管理系统</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,107 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>功能描述 - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.function-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25px;
|
||||
}
|
||||
.function-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 15px;
|
||||
padding: 25px 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 25px;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.function-icon {
|
||||
font-size: 50px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.function-text h3 {
|
||||
font-size: 28px;
|
||||
color: #004d40;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.function-text p {
|
||||
font-size: 20px;
|
||||
color: #00796b;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">功能描述</div>
|
||||
|
||||
<div class="function-list">
|
||||
<div class="function-item">
|
||||
<div class="function-icon">💾</div>
|
||||
<div class="function-text">
|
||||
<h3>私有云存储</h3>
|
||||
<p>搭建个人私有云,安全存储照片、视频、文档等重要资料</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="function-item">
|
||||
<div class="function-icon">🔄</div>
|
||||
<div class="function-text">
|
||||
<h3>数据备份</h3>
|
||||
<p>自动备份手机、电脑数据,防止数据丢失,多重保护</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="function-item">
|
||||
<div class="function-icon">🌐</div>
|
||||
<div class="function-text">
|
||||
<h3>远程访问</h3>
|
||||
<p>随时随地远程访问,在外也能查看家中文件资料</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="function-item">
|
||||
<div class="function-icon">👥</div>
|
||||
<div class="function-text">
|
||||
<h3>家庭共享</h3>
|
||||
<p>家庭成员共享存储空间,照片视频轻松分享</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="function-item">
|
||||
<div class="function-icon">🤖</div>
|
||||
<div class="function-text">
|
||||
<h3>智能家居</h3>
|
||||
<p>支持Home Assistant,打造智能家居控制中心</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,101 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>包装展示 - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.packaging-visual {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
.package-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 15px;
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.package-icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.package-name {
|
||||
font-size: 24px;
|
||||
color: #004d40;
|
||||
font-weight: bold;
|
||||
}
|
||||
.footer-note {
|
||||
margin-top: 40px;
|
||||
font-size: 24px;
|
||||
color: #00796b;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">包装展示</div>
|
||||
|
||||
<div class="packaging-visual">
|
||||
<div class="package-item">
|
||||
<div class="package-icon">📦</div>
|
||||
<div class="package-name">产品外箱</div>
|
||||
</div>
|
||||
<div class="package-item">
|
||||
<div class="package-icon">💻</div>
|
||||
<div class="package-name">主机</div>
|
||||
</div>
|
||||
<div class="package-item">
|
||||
<div class="package-icon">🔌</div>
|
||||
<div class="package-name">电源适配器</div>
|
||||
</div>
|
||||
<div class="package-item">
|
||||
<div class="package-icon">🔗</div>
|
||||
<div class="package-name">网线</div>
|
||||
</div>
|
||||
<div class="package-item">
|
||||
<div class="package-icon">🔋</div>
|
||||
<div class="package-name">电池</div>
|
||||
</div>
|
||||
<div class="package-item">
|
||||
<div class="package-icon">📄</div>
|
||||
<div class="package-name">说明书</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-note">整机包装,开箱即用</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>商品卖点 - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
text-shadow: 0 2px 10px rgba(0,105,92,0.2);
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 28px;
|
||||
color: #4db6ac;
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.points-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 30px;
|
||||
}
|
||||
.point-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 15px;
|
||||
padding: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.point-icon {
|
||||
font-size: 60px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.point-content h3 {
|
||||
font-size: 28px;
|
||||
color: #004d40;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.point-content p {
|
||||
font-size: 20px;
|
||||
color: #00796b;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">商品卖点</div>
|
||||
<div class="subtitle">{{PRODUCT_NAME}}</div>
|
||||
|
||||
<div class="points-grid">
|
||||
<div class="point-item">
|
||||
<div class="point-icon">💎</div>
|
||||
<div class="point-content">
|
||||
<h3>透明亚克力材质</h3>
|
||||
<p>高透光亚克力,清晰展示内部结构,科技感十足</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-item">
|
||||
<div class="point-icon">🎨</div>
|
||||
<div class="point-content">
|
||||
<h3>时尚外观设计</h3>
|
||||
<p>简约现代设计,透明机身,美观大方,适合各种环境</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-item">
|
||||
<div class="point-icon">⚡</div>
|
||||
<div class="point-content">
|
||||
<h3>低功耗静音</h3>
|
||||
<p>超低功耗设计,无风扇静音运行,7x24小时稳定</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-item">
|
||||
<div class="point-icon">🔧</div>
|
||||
<div class="point-content">
|
||||
<h3>易于维护</h3>
|
||||
<p>透明设计便于观察,拆卸方便,升级维护简单</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-item">
|
||||
<div class="point-icon">🌡️</div>
|
||||
<div class="point-content">
|
||||
<h3>散热优良</h3>
|
||||
<p>开放式设计,散热效果优异,保证系统稳定运行</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-item">
|
||||
<div class="point-icon">💰</div>
|
||||
<div class="point-content">
|
||||
<h3>超高性价比</h3>
|
||||
<p>入门级NAS首选,功能齐全,价格亲民</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,96 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>配件清单 - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.accessories-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
.accessory-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 12px;
|
||||
padding: 20px 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.accessory-icon {
|
||||
font-size: 40px;
|
||||
}
|
||||
.accessory-name {
|
||||
font-size: 26px;
|
||||
color: #004d40;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
}
|
||||
.accessory-check {
|
||||
font-size: 30px;
|
||||
color: #26a69a;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="title">配件清单</div>
|
||||
|
||||
<div class="accessories-list">
|
||||
<div class="accessory-item">
|
||||
<div class="accessory-icon">📦</div>
|
||||
<div class="accessory-name">主机 x1</div>
|
||||
<div class="accessory-check">✓</div>
|
||||
</div>
|
||||
<div class="accessory-item">
|
||||
<div class="accessory-icon">🔌</div>
|
||||
<div class="accessory-name">电源适配器 x1</div>
|
||||
<div class="accessory-check">✓</div>
|
||||
</div>
|
||||
<div class="accessory-item">
|
||||
<div class="accessory-icon">🔗</div>
|
||||
<div class="accessory-name">网线 x1</div>
|
||||
<div class="accessory-check">✓</div>
|
||||
</div>
|
||||
<div class="accessory-item">
|
||||
<div class="accessory-icon">🔋</div>
|
||||
<div class="accessory-name">电池 x1</div>
|
||||
<div class="accessory-check">✓</div>
|
||||
</div>
|
||||
<div class="accessory-item">
|
||||
<div class="accessory-icon">📝</div>
|
||||
<div class="accessory-name">说明书 x1</div>
|
||||
<div class="accessory-check">✓</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,187 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>配置清单 (1/2) - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
margin-bottom: 20px;
|
||||
text-shadow: 0 2px 10px rgba(0,105,92,0.2);
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 28px;
|
||||
color: #4db6ac;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.sku-badge {
|
||||
display: inline-block;
|
||||
background: #00695c;
|
||||
color: white;
|
||||
font-size: 22px;
|
||||
padding: 8px 24px;
|
||||
border-radius: 25px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.config-section {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #00796b;
|
||||
margin-bottom: 20px;
|
||||
padding-left: 20px;
|
||||
border-left: 5px solid #26a69a;
|
||||
}
|
||||
.config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px;
|
||||
}
|
||||
.config-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
padding: 20px 25px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.config-label {
|
||||
font-size: 24px;
|
||||
color: #004d40;
|
||||
font-weight: bold;
|
||||
}
|
||||
.config-value {
|
||||
font-size: 24px;
|
||||
color: #26a69a;
|
||||
font-weight: bold;
|
||||
}
|
||||
.config-item.highlight {
|
||||
background: rgba(0,105,92,0.1);
|
||||
border: 2px solid #26a69a;
|
||||
}
|
||||
.config-item.highlight .config-label,
|
||||
.config-item.highlight .config-value {
|
||||
color: #004d40;
|
||||
}
|
||||
.price-tag {
|
||||
font-size: 36px;
|
||||
color: #00695c;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.price-tag span {
|
||||
font-size: 24px;
|
||||
color: #00796b;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">配置清单 (1/2)</div>
|
||||
<div class="subtitle">{{PRODUCT_SUBTITLE}}</div>
|
||||
<div class="sku-badge">{{SKU_CODE}}</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="section-title">机箱类型</div>
|
||||
<div class="config-grid">
|
||||
<div class="config-item">
|
||||
<span class="config-label">亚克力-单</span>
|
||||
<span class="config-value">单SATA口</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">亚克力-双</span>
|
||||
<span class="config-value">双SATA口</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="section-title">处理器 (CPU)</div>
|
||||
<div class="config-grid">
|
||||
<div class="config-item">
|
||||
<span class="config-label">Intel N2840</span>
|
||||
<span class="config-value">双核 2.16GHz</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">Intel N2930</span>
|
||||
<span class="config-value">四核 1.83GHz</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">AMD A4</span>
|
||||
<span class="config-value">双核 2.0GHz</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">Intel 1037U</span>
|
||||
<span class="config-value">双核 1.8GHz</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">Intel J1900</span>
|
||||
<span class="config-value">四核 2.0GHz</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">Intel J3160</span>
|
||||
<span class="config-value">四核 1.6GHz</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="section-title">已选配置</div>
|
||||
<div class="config-grid">
|
||||
<div class="config-item highlight">
|
||||
<span class="config-label">CPU</span>
|
||||
<span class="config-value">{{CPU}}</span>
|
||||
</div>
|
||||
<div class="config-item highlight">
|
||||
<span class="config-label">内存</span>
|
||||
<span class="config-value">{{MEMORY}}</span>
|
||||
</div>
|
||||
<div class="config-item highlight">
|
||||
<span class="config-label">系统盘</span>
|
||||
<span class="config-value">{{STORAGE}}</span>
|
||||
</div>
|
||||
<div class="config-item highlight">
|
||||
<span class="config-label">机箱</span>
|
||||
<span class="config-value">{{CASE}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="price-tag">
|
||||
成本合计:<span>¥</span>{{TOTAL_COST}}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,154 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1000, height=1000">
|
||||
<title>配置清单 (2/2) - {{PRODUCT_NAME}}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 50%, #80cbc4 100%);
|
||||
padding: 40px;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 20px;
|
||||
padding: 50px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 100px rgba(255,255,255,0.5);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 2px solid rgba(255,255,255,0.6);
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.title {
|
||||
font-size: 56px;
|
||||
font-weight: bold;
|
||||
color: #00695c;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 28px;
|
||||
color: #4db6ac;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #00796b;
|
||||
margin-bottom: 20px;
|
||||
padding-left: 20px;
|
||||
border-left: 5px solid #26a69a;
|
||||
}
|
||||
.config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 20px;
|
||||
}
|
||||
.config-item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
padding: 20px 25px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
|
||||
border: 1px solid rgba(38,166,154,0.3);
|
||||
}
|
||||
.config-label {
|
||||
font-size: 24px;
|
||||
color: #004d40;
|
||||
font-weight: bold;
|
||||
}
|
||||
.config-value {
|
||||
font-size: 24px;
|
||||
color: #26a69a;
|
||||
font-weight: bold;
|
||||
}
|
||||
.summary {
|
||||
background: linear-gradient(135deg, #00695c, #004d40);
|
||||
border-radius: 15px;
|
||||
padding: 40px;
|
||||
margin-top: 40px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
.summary-title {
|
||||
font-size: 28px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.summary-price {
|
||||
font-size: 64px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.summary-note {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="title">配置清单 (2/2)</div>
|
||||
<div class="subtitle">{{SKU_CODE}}</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="section-title">随机配件</div>
|
||||
<div class="config-grid">
|
||||
<div class="config-item">
|
||||
<span class="config-label">电源</span>
|
||||
<span class="config-value">{{POWER}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">硬盘线</span>
|
||||
<span class="config-value">{{CABLE}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">电池</span>
|
||||
<span class="config-value">{{BATTERY}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">网线</span>
|
||||
<span class="config-value">{{ETHERNET_CABLE}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-section">
|
||||
<div class="section-title">费用明细</div>
|
||||
<div class="config-grid">
|
||||
<div class="config-item">
|
||||
<span class="config-label">运费</span>
|
||||
<span class="config-value">¥{{SHIPPING_FEE}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">包装费</span>
|
||||
<span class="config-value">¥{{PACKAGING_FEE}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">装机费</span>
|
||||
<span class="config-value">¥{{ASSEMBLY_FEE}}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<span class="config-label">总成本</span>
|
||||
<span class="config-value">¥{{TOTAL_COST}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="summary">
|
||||
<div class="summary-title">建议零售价</div>
|
||||
<div class="summary-price">¥{{RETAIL_PRICE}}</div>
|
||||
<div class="summary-note">{{NOTE}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,59 +0,0 @@
|
||||
# 产品配置规范参考
|
||||
|
||||
## 亚克力机箱配置原则
|
||||
|
||||
- 亚克力机箱-单:可安装所有单SATA口主板
|
||||
- 亚克力机箱-双:可安装所有双SATA口主板
|
||||
- 内存规格:2G-16G, 2G-32G, 4G-64G, 4G-128G
|
||||
- 支持 CPU:N2840, N2930, AMD-A4, 1037U, J1900, J3160, i3
|
||||
|
||||
## SKU 命名规则
|
||||
|
||||
格式:`亚克力-单-{CPU}-{内存}-{系统盘}`
|
||||
|
||||
示例:`亚克力-单-AMD-A4-2G-16G`
|
||||
|
||||
## SKU Markdown 文件格式
|
||||
|
||||
```markdown
|
||||
# 产品信息
|
||||
|
||||
| 字段 | 配件名称 | 价格 |
|
||||
:|------|---------|------:|
|
||||
| **产品编号** | - | - |
|
||||
| **产品名称** | 飞牛NAS 亚克力-单 AMD-A4 | - |
|
||||
| **产品型号** | 亚克力-单-AMD-A4-2G-16G | - |
|
||||
| **CPU** | AMD-A4 | ¥45 |
|
||||
| **内存** | D3-2G | ¥13 |
|
||||
| **系统盘** | mSATA-16G | ¥15 |
|
||||
| **机箱** | 亚-单 | ¥42 |
|
||||
| **电源** | 电源-60W | ¥12 |
|
||||
| **硬盘线** | 硬盘线-单 | ¥4 |
|
||||
| **电池** | 电池 | ¥1 |
|
||||
| **网线** | 网线 | ¥1 |
|
||||
| **运费** | 运费 | ¥10 |
|
||||
| **包装费** | 包装费 | ¥5 |
|
||||
| **装机费** | 装机费 | ¥10 |
|
||||
| **总成本** | - | ¥158 |
|
||||
| **建议零售价** | - | ¥205 |
|
||||
| **备注** | 亚克力机箱,单SATA口,入门级配置 | - |
|
||||
```
|
||||
|
||||
## 详情页组成部分
|
||||
|
||||
1. **配置清单-1.html** - 机箱类型、CPU 选项、已选配置
|
||||
2. **配置清单-2.html** - 随机配件、费用明细、建议零售价
|
||||
3. **商品卖点.html** - 产品核心卖点
|
||||
4. **功能描述.html** - 功能列表
|
||||
5. **使用场景.html** - 应用场景展示
|
||||
6. **配件清单.html** - 随机配件列表
|
||||
7. **包装展示.html** - 包装内容展示
|
||||
|
||||
## 页面设计规范
|
||||
|
||||
- 尺寸:1000x1000px
|
||||
- 背景:青绿色渐变 `#e0f2f1 → #b2dfdb → #80cbc4`
|
||||
- 圆角卡片:20px
|
||||
- 主色调:#00695c (深青色)
|
||||
- 强调色:#26a69a (青绿色)
|
||||
- 字体:Microsoft YaHei / PingFang SC
|
||||
@@ -28,7 +28,8 @@ function parseSkuFile(skuPath) {
|
||||
const data = {};
|
||||
|
||||
content.split('\n').forEach(line => {
|
||||
const match = line.match(/:\s*\|\s*(.+?)\s*\|\s*(.+?)\s*\|/);
|
||||
// 匹配格式: | **字段名** | 值 | 价格 |
|
||||
const match = line.match(/\|\s*\*\*(.+?)\*\*\s*\|\s*(.+?)\s*\|/);
|
||||
if (match) {
|
||||
const [, fieldName, value] = match;
|
||||
data[fieldName.trim()] = value.trim();
|
||||
|
||||
Reference in New Issue
Block a user