Add steering wheel accessories to catalog
This commit is contained in:
137
app/catalog-accessories.ts
Normal file
137
app/catalog-accessories.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
import type { CatalogProduct } from "./catalog-data";
|
||||
|
||||
// 舵盘配件来自高徳乐商城产品资料,作为官方目录的独立配件分类展示。
|
||||
export const STEERING_WHEEL_ACCESSORIES: CatalogProduct[] = [
|
||||
{
|
||||
id: "shop-563",
|
||||
category: "舵盘配件",
|
||||
name: "9克舵机舵盘配件",
|
||||
code: "2.A.LS009.001A",
|
||||
image: "/catalog-products/steering-wheel/563.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅5.0x21T",
|
||||
"类别": "四叶舵盘",
|
||||
"产品名称": "四叶舵盘_花键直径∅5.0_21T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "30.30",
|
||||
"宽(mm)": "30.30",
|
||||
"高(mm)": "3.80",
|
||||
"重量": "0.415",
|
||||
"可选编码": "2.A.LS009.001A、2.A.LS009.002A、2.A.LS009.003A、2.A.LS009.004A、2.A.LS120.003A、2.A.LS009.006A、2.A.LS009.007A、2.A.LS009.008A、2.A.LS009.009A",
|
||||
"参考单价": "¥0.096",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
{
|
||||
id: "shop-565",
|
||||
category: "舵盘配件",
|
||||
name: "17克舵机舵盘配件",
|
||||
code: "2.A.LS018.001A",
|
||||
image: "/catalog-products/steering-wheel/565.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅6.0x25T",
|
||||
"类别": "六叶舵盘",
|
||||
"产品名称": "六叶舵盘_花键直径∅6.0_25T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "31.10",
|
||||
"宽(mm)": "27.54",
|
||||
"高(mm)": "5.48",
|
||||
"重量": "1.1",
|
||||
"可选编码": "2.A.LS018.001A、2.A.LS018.002A、2.A.LS018.003A、2.A.LS018.004A、2.A.LS018.005A、2.A.LS018.006A、2.A.LS018.007A、2.A.LS018.008A",
|
||||
"参考单价": "¥0.124",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
{
|
||||
id: "shop-566",
|
||||
category: "舵盘配件",
|
||||
name: "3.7克舵机舵盘配件",
|
||||
code: "2.A.LS028.001A",
|
||||
image: "/catalog-products/steering-wheel/566.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅3.91x28T",
|
||||
"类别": "长二叶舵盘",
|
||||
"产品名称": "长二叶舵盘_花键直径∅4.0_28T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "26.79",
|
||||
"宽(mm)": "5.50",
|
||||
"高(mm)": "3.30",
|
||||
"重量": "0.18",
|
||||
"可选编码": "2.A.LS028.001A、2.A.LS028.002A、2.A.LS028.003A、2.A.LS028.004A、2.A.LS028.005A、2.A.LS120.004A",
|
||||
"参考单价": "¥0.089",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
{
|
||||
id: "shop-567",
|
||||
category: "舵盘配件",
|
||||
name: "37克舵机舵盘配件",
|
||||
code: "2.A.LS018.001A",
|
||||
image: "/catalog-products/steering-wheel/567.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅6.0x25T",
|
||||
"类别": "六叶舵盘",
|
||||
"产品名称": "六叶舵盘_花键直径∅6.0_25T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "31.10",
|
||||
"宽(mm)": "27.54",
|
||||
"高(mm)": "5.48",
|
||||
"重量": "1.1",
|
||||
"可选编码": "2.A.LS018.001A、2.A.LS018.002A、2.A.LS018.003A、2.A.LS018.004A、2.A.LS018.005A、2.A.LS018.006A、2.A.LS018.007A、2.A.LS018.008A、2.A.LS120.001A",
|
||||
"参考单价": "¥0.124",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
{
|
||||
id: "shop-568",
|
||||
category: "舵盘配件",
|
||||
name: "2克舵机舵盘配件",
|
||||
code: "2.A.LS028.001A",
|
||||
image: "/catalog-products/steering-wheel/568.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅3.91x28T",
|
||||
"类别": "长二叶舵盘",
|
||||
"产品名称": "长二叶舵盘_花键直径∅4.0_28T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "26.79",
|
||||
"宽(mm)": "5.50",
|
||||
"高(mm)": "3.30",
|
||||
"重量": "0.18",
|
||||
"可选编码": "2.A.LS028.001A、2.A.LS028.002A、2.A.LS028.003A、2.A.LS028.004A、2.A.LS028.005A、2.A.LS120.004A",
|
||||
"参考单价": "¥0.089",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
{
|
||||
id: "shop-572",
|
||||
category: "舵盘配件",
|
||||
name: "25克舵机舵盘配件",
|
||||
code: "2.A.LS018.001A",
|
||||
image: "/catalog-products/steering-wheel/572.png",
|
||||
page: 0,
|
||||
specs: {
|
||||
"花键大小": "∅6.0x25T",
|
||||
"类别": "六叶舵盘",
|
||||
"产品名称": "六叶舵盘_花键直径∅6.0_25T",
|
||||
"材质": "POM",
|
||||
"长(mm)": "31.10",
|
||||
"宽(mm)": "27.54",
|
||||
"高(mm)": "5.48",
|
||||
"重量": "1.1",
|
||||
"可选编码": "2.A.LS018.001A、2.A.LS018.002A、2.A.LS018.003A、2.A.LS018.004A、2.A.LS018.005A、2.A.LS018.006A、2.A.LS018.007A、2.A.LS018.008A",
|
||||
"参考单价": "¥0.124",
|
||||
},
|
||||
torqueValue: null,
|
||||
ratedVoltage: null,
|
||||
},
|
||||
];
|
||||
@@ -242,7 +242,7 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
||||
.section-heading > p { max-width: 480px; margin: 0; color: #6e7a8e; line-height: 1.8; font-size: 13px; }
|
||||
.catalog-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
grid-template-columns: repeat(8, 1fr);
|
||||
gap: 9px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
@@ -516,7 +516,7 @@ footer > span { color: #9aa4b2; font-size: 10px; }
|
||||
.capability-strip div:nth-child(2) { border-right: 0; }
|
||||
.section-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
|
||||
.catalog-summary { grid-template-columns: repeat(2, 1fr); }
|
||||
.catalog-summary button:last-child { grid-column: 1 / -1; }
|
||||
.catalog-summary button:last-child { grid-column: auto; }
|
||||
.catalog-toolbar { top: 64px; }
|
||||
.catalog-scale-filter { grid-template-columns: 1fr; align-items: stretch; }
|
||||
.catalog-grid { grid-template-columns: 1fr; gap: 15px; }
|
||||
|
||||
24
app/page.tsx
24
app/page.tsx
@@ -6,9 +6,10 @@ import {
|
||||
CATALOG_PRODUCTS as RAW_CATALOG_PRODUCTS,
|
||||
type CatalogProduct,
|
||||
} from "./catalog-data";
|
||||
import { STEERING_WHEEL_ACCESSORIES } from "./catalog-accessories";
|
||||
import { getCatalogProductImage } from "./catalog-image-map";
|
||||
|
||||
const CATALOG_PRODUCTS = RAW_CATALOG_PRODUCTS.map((product) => ({
|
||||
const CATALOG_PRODUCTS = [...RAW_CATALOG_PRODUCTS, ...STEERING_WHEEL_ACCESSORIES].map((product) => ({
|
||||
...product,
|
||||
image: getCatalogProductImage(product),
|
||||
}));
|
||||
@@ -46,6 +47,7 @@ const PRIMARY_CATALOG_CATEGORIES = [
|
||||
"积木舵机",
|
||||
"标准齿轮箱",
|
||||
"翻盖电机",
|
||||
"舵盘配件",
|
||||
];
|
||||
|
||||
const CATALOG_FILTER_CATEGORIES = ["全部产品", ...PRIMARY_CATALOG_CATEGORIES, "静音舵机"];
|
||||
@@ -72,6 +74,10 @@ const FEATURED_SPEC_ORDER = [
|
||||
"通讯方式",
|
||||
"齿轮比",
|
||||
"寿命",
|
||||
"花键大小",
|
||||
"类别",
|
||||
"材质",
|
||||
"重量",
|
||||
"产品尺寸",
|
||||
"外形尺寸",
|
||||
];
|
||||
@@ -111,7 +117,11 @@ function isSilentServo(product: CatalogProduct) {
|
||||
const SILENT_SERVO_COUNT = CATALOG_PRODUCTS.filter(isSilentServo).length;
|
||||
|
||||
function getCategoryCount(category: string) {
|
||||
return category === SILENT_SERVO_CATEGORY ? SILENT_SERVO_COUNT : CATALOG_COUNTS[category];
|
||||
return category === SILENT_SERVO_CATEGORY
|
||||
? SILENT_SERVO_COUNT
|
||||
: category === "舵盘配件"
|
||||
? STEERING_WHEEL_ACCESSORIES.length
|
||||
: CATALOG_COUNTS[category];
|
||||
}
|
||||
|
||||
type ProductScale = {
|
||||
@@ -906,9 +916,9 @@ export default function Home() {
|
||||
<div className="section-heading">
|
||||
<div>
|
||||
<p className="eyebrow"><span /> 官方产品目录 · 2026.06</p>
|
||||
<h2>完整收录280个产品型号</h2>
|
||||
<h2>完整收录{CATALOG_PRODUCTS.length}个产品型号</h2>
|
||||
</div>
|
||||
<p>官方目录按七个主分类收录280款产品;静音舵机作为特色子集筛选,不重复计入产品总数。</p>
|
||||
<p>官方目录按八个主分类收录{CATALOG_PRODUCTS.length}款产品;静音舵机作为特色子集筛选,不重复计入产品总数。</p>
|
||||
</div>
|
||||
|
||||
<div className="catalog-summary" aria-label="产品分类统计">
|
||||
@@ -927,7 +937,7 @@ export default function Home() {
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<p className="catalog-category-note">分类已按官方目录表头及业务规则复核 · 七个主分类合计280款 · 静音舵机11款为标准舵机特色子集</p>
|
||||
<p className="catalog-category-note">分类已按官方目录表头及业务规则复核 · 八个主分类合计{CATALOG_PRODUCTS.length}款 · 舵盘配件6款 · 静音舵机11款为标准舵机特色子集</p>
|
||||
|
||||
<div className="catalog-toolbar">
|
||||
<label className="catalog-search">
|
||||
@@ -1089,7 +1099,9 @@ export default function Home() {
|
||||
<p className="step-kicker">{selectedCatalogProduct.category}</p>
|
||||
<h2 id="catalog-modal-title">{selectedCatalogProduct.name}</h2>
|
||||
<code>{selectedCatalogProduct.code}</code>
|
||||
<p className="catalog-source-note">官方产品目录第 {selectedCatalogProduct.page} 页</p>
|
||||
<p className="catalog-source-note">
|
||||
{selectedCatalogProduct.page > 0 ? `官方产品目录第 ${selectedCatalogProduct.page} 页` : "商城产品资料 · 舵盘配件"}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="catalog-spec-table">
|
||||
|
||||
BIN
public/catalog-products/steering-wheel/563.png
Normal file
BIN
public/catalog-products/steering-wheel/563.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
public/catalog-products/steering-wheel/565.png
Normal file
BIN
public/catalog-products/steering-wheel/565.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
public/catalog-products/steering-wheel/566.png
Normal file
BIN
public/catalog-products/steering-wheel/566.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
public/catalog-products/steering-wheel/567.png
Normal file
BIN
public/catalog-products/steering-wheel/567.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
public/catalog-products/steering-wheel/568.png
Normal file
BIN
public/catalog-products/steering-wheel/568.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
public/catalog-products/steering-wheel/572.png
Normal file
BIN
public/catalog-products/steering-wheel/572.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user