Import full product catalog
This commit is contained in:
7180
app/catalog-data.ts
Normal file
7180
app/catalog-data.ts
Normal file
File diff suppressed because it is too large
Load Diff
212
app/globals.css
212
app/globals.css
@@ -215,14 +215,195 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
||||
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 60px; margin-bottom: 36px; }
|
||||
.section-heading h2 { margin: 10px 0 0; font-size: 39px; letter-spacing: -.04em; }
|
||||
.section-heading > p { max-width: 480px; margin: 0; color: #6e7a8e; line-height: 1.8; font-size: 13px; }
|
||||
.product-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
|
||||
.product-band article { min-height: 380px; border: 1px solid #dbe2ec; border-radius: 16px; overflow: hidden; background: white; transition: transform .25s, box-shadow .25s; }
|
||||
.product-band article:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(30,53,91,.12); }
|
||||
.product-band img { width: 100%; height: 245px; object-fit: cover; background: #eef2f8; }
|
||||
.product-band article div { padding: 21px; }
|
||||
.product-band span { color: var(--blue); font-size: 11px; font-weight: 750; }
|
||||
.product-band h3 { margin: 4px 0; font-size: 25px; }
|
||||
.product-band p { margin: 0; color: #8490a3; font-size: 11px; }
|
||||
.catalog-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 9px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.catalog-summary button {
|
||||
min-height: 76px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
gap: 5px;
|
||||
border: 1px solid #dbe2ec;
|
||||
border-radius: 12px;
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
transition: border-color .2s, background .2s, transform .2s;
|
||||
}
|
||||
.catalog-summary button:hover { transform: translateY(-2px); border-color: #aac5f4; }
|
||||
.catalog-summary button.active { border-color: var(--blue); background: var(--blue-soft); }
|
||||
.catalog-summary strong { color: var(--blue); font-size: 19px; }
|
||||
.catalog-summary span { color: #748196; font-size: 10px; }
|
||||
.catalog-toolbar {
|
||||
position: sticky;
|
||||
top: 74px;
|
||||
z-index: 20;
|
||||
margin-bottom: 25px;
|
||||
padding: 14px;
|
||||
border: 1px solid #dbe2ec;
|
||||
border-radius: 15px;
|
||||
background: rgba(255,255,255,.95);
|
||||
box-shadow: 0 9px 25px rgba(30,53,91,.07);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
.catalog-search { position: relative; display: flex; align-items: center; }
|
||||
.catalog-search > span {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 9px;
|
||||
color: var(--blue);
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
transform: rotate(-18deg);
|
||||
}
|
||||
.catalog-search input { width: 100%; height: 48px; padding: 0 46px; background: #f7f9fc; }
|
||||
.catalog-search > button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
color: #7f8a9d;
|
||||
background: #e9edf3;
|
||||
cursor: pointer;
|
||||
}
|
||||
.category-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
|
||||
.category-pills button {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #dce3ed;
|
||||
border-radius: 999px;
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
color: #68758a;
|
||||
font-size: 10px;
|
||||
}
|
||||
.category-pills button.active { border-color: var(--blue); color: white; background: var(--blue); }
|
||||
.catalog-result-count { margin: 11px 2px 0; color: #8792a3; font-size: 10px; }
|
||||
.catalog-result-count strong { color: var(--blue); font-size: 12px; }
|
||||
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
|
||||
.catalog-card {
|
||||
min-width: 0;
|
||||
border: 1px solid #dce3ed;
|
||||
border-radius: 14px;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
transition: transform .22s, border-color .22s, box-shadow .22s;
|
||||
}
|
||||
.catalog-card:hover { transform: translateY(-3px); border-color: #b7c9e7; box-shadow: 0 15px 34px rgba(30,53,91,.1); }
|
||||
.catalog-image-button {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 190px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #edf0f4;
|
||||
background: linear-gradient(145deg, #f8fafe, #eef3fa);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
.catalog-image-button img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
|
||||
.catalog-image-button small {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
padding: 5px 8px;
|
||||
border-radius: 6px;
|
||||
color: #315686;
|
||||
background: rgba(255,255,255,.9);
|
||||
box-shadow: 0 2px 8px rgba(31,56,93,.08);
|
||||
font-size: 8px;
|
||||
font-weight: 750;
|
||||
}
|
||||
.catalog-placeholder { color: #9eb3d3; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
|
||||
.catalog-card-body { padding: 16px; }
|
||||
.catalog-card-body > p { margin: 0 0 5px; color: #8793a5; font-size: 9px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
||||
.catalog-card-body h3 { height: 42px; margin: 0 0 12px; overflow: hidden; font-size: 14px; line-height: 1.5; }
|
||||
.catalog-card-body dl { min-height: 83px; margin: 0; padding: 10px; border-radius: 9px; background: #f6f8fb; }
|
||||
.catalog-card-body dl div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 9px; }
|
||||
.catalog-card-body dt { color: #8a95a7; }
|
||||
.catalog-card-body dd { max-width: 58%; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-weight: 650; }
|
||||
.catalog-card-body > button {
|
||||
width: 100%;
|
||||
margin-top: 12px;
|
||||
padding: 10px 0 2px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border: 0;
|
||||
color: var(--blue);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.catalog-empty { padding: 60px 20px; text-align: center; border: 1px dashed #cbd5e3; border-radius: 15px; background: white; }
|
||||
.catalog-empty p { color: #8792a4; font-size: 12px; }
|
||||
.catalog-empty button { border: 0; color: var(--blue); background: transparent; cursor: pointer; font-weight: 700; }
|
||||
.load-more-wrap { display: flex; justify-content: center; margin-top: 34px; }
|
||||
.load-more-wrap button {
|
||||
min-width: 240px;
|
||||
padding: 14px 22px;
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
border: 1px solid #cbd6e6;
|
||||
border-radius: 11px;
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
.load-more-wrap button:hover { border-color: var(--blue); color: var(--blue); }
|
||||
.load-more-wrap span { color: #8c97a8; font-size: 8px; font-weight: 500; }
|
||||
.catalog-modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 100;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 24px;
|
||||
background: rgba(7,14,29,.7);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
.catalog-modal {
|
||||
position: relative;
|
||||
width: min(760px, 100%);
|
||||
max-height: min(820px, 92vh);
|
||||
padding: 28px;
|
||||
overflow-y: auto;
|
||||
border-radius: 18px;
|
||||
background: white;
|
||||
box-shadow: 0 30px 90px rgba(0,0,0,.3);
|
||||
}
|
||||
.catalog-modal-close {
|
||||
position: absolute;
|
||||
right: 17px;
|
||||
top: 15px;
|
||||
z-index: 2;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
color: #627086;
|
||||
background: #eef2f7;
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
}
|
||||
.catalog-modal-product { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 28px; }
|
||||
.catalog-modal-image { height: 180px; display: grid; place-items: center; border-radius: 13px; overflow: hidden; background: #f2f5fa; }
|
||||
.catalog-modal-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
|
||||
.catalog-modal-product h2 { margin: 4px 0 10px; font-size: 27px; line-height: 1.3; letter-spacing: -.025em; }
|
||||
.catalog-modal-product code { color: #5d6b81; font-size: 11px; }
|
||||
.catalog-source-note { color: #96a0af; font-size: 9px; }
|
||||
.catalog-spec-table { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 25px; overflow: hidden; border: 1px solid #e0e5ed; border-radius: 11px; background: #e0e5ed; }
|
||||
.catalog-spec-table div { min-height: 48px; padding: 10px 12px; display: grid; align-content: center; gap: 4px; background: white; }
|
||||
.catalog-spec-table span { color: #8b96a7; font-size: 9px; }
|
||||
.catalog-spec-table strong { font-size: 11px; }
|
||||
.catalog-modal-actions { display: flex; align-items: center; gap: 18px; margin-top: 20px; }
|
||||
.catalog-modal-actions .panel-primary { flex: 0 0 auto; }
|
||||
.catalog-modal-actions p { margin: 0; color: #8b95a5; font-size: 9px; line-height: 1.6; }
|
||||
.how-section { padding: 100px max(32px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; color: white; background: linear-gradient(135deg, #0c1528, #14284e); }
|
||||
.eyebrow.light { color: #77a5ff; }
|
||||
.how-copy h2 { margin: 18px 0; font-size: 42px; line-height: 1.15; letter-spacing: -.04em; }
|
||||
@@ -264,7 +445,20 @@ footer > span { color: #9aa4b2; font-size: 10px; }
|
||||
.capability-strip { grid-template-columns: 1fr 1fr; gap: 24px 0; padding: 28px 16px; }
|
||||
.capability-strip div:nth-child(2) { border-right: 0; }
|
||||
.section-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
|
||||
.product-band { grid-template-columns: 1fr; }
|
||||
.catalog-summary { grid-template-columns: repeat(2, 1fr); }
|
||||
.catalog-summary button:last-child { grid-column: 1 / -1; }
|
||||
.catalog-toolbar { top: 64px; }
|
||||
.catalog-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.catalog-image-button { height: 150px; }
|
||||
.catalog-card-body { padding: 12px; }
|
||||
.catalog-card-body h3 { height: 60px; font-size: 13px; }
|
||||
.catalog-card-body dl { min-height: 90px; }
|
||||
.catalog-modal-backdrop { padding: 10px; }
|
||||
.catalog-modal { padding: 22px 16px; }
|
||||
.catalog-modal-product { grid-template-columns: 1fr; gap: 16px; }
|
||||
.catalog-modal-image { height: 220px; }
|
||||
.catalog-spec-table { grid-template-columns: 1fr; }
|
||||
.catalog-modal-actions { align-items: stretch; flex-direction: column; }
|
||||
.products-section { padding: 75px 16px; }
|
||||
.how-section { grid-template-columns: 1fr; padding: 75px 20px; }
|
||||
footer { grid-template-columns: 1fr; justify-items: center; gap: 15px; }
|
||||
|
||||
@@ -11,10 +11,10 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
return {
|
||||
metadataBase,
|
||||
title: "高徳乐 AI 舵机选型助手",
|
||||
description: "3分钟获得高徳乐舵机候选型号、匹配理由与样品申请方案。",
|
||||
description: "高徳乐280个产品型号完整目录,支持搜索筛选、AI舵机初选与样品申请。",
|
||||
openGraph: {
|
||||
title: "高徳乐 AI 舵机选型助手",
|
||||
description: "3分钟,找到适合你的舵机。AI初选,工程师复核。",
|
||||
description: "280个型号完整目录。3分钟找到适合你的舵机,AI初选,工程师复核。",
|
||||
images: [{ url: new URL("/og.png", metadataBase).toString(), width: 1200, height: 630 }],
|
||||
type: "website",
|
||||
},
|
||||
|
||||
237
app/page.tsx
237
app/page.tsx
@@ -1,6 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import { FormEvent, useMemo, useState } from "react";
|
||||
import {
|
||||
CATALOG_COUNTS,
|
||||
CATALOG_PRODUCTS,
|
||||
type CatalogProduct,
|
||||
} from "./catalog-data";
|
||||
|
||||
type Gear = "塑料齿" | "半金属齿" | "金属齿";
|
||||
|
||||
@@ -252,6 +257,36 @@ const APPLICATIONS = [
|
||||
{ name: "工业设备", note: "控制机构与定制传动组件" },
|
||||
];
|
||||
|
||||
const CATALOG_CATEGORIES = [
|
||||
"全部产品",
|
||||
"标准舵机",
|
||||
"异形舵机",
|
||||
"全金属舵机",
|
||||
"大扭矩舵机",
|
||||
"积木舵机",
|
||||
"标准齿轮箱",
|
||||
"翻盖电机",
|
||||
];
|
||||
|
||||
const FEATURED_SPEC_ORDER = [
|
||||
"堵转扭矩",
|
||||
"额定电压",
|
||||
"电压范围",
|
||||
"信号类型",
|
||||
"通讯方式",
|
||||
"齿轮比",
|
||||
"寿命",
|
||||
"产品尺寸",
|
||||
"外形尺寸",
|
||||
];
|
||||
|
||||
function getFeaturedSpecs(product: CatalogProduct) {
|
||||
return FEATURED_SPEC_ORDER
|
||||
.filter((label) => product.specs[label])
|
||||
.slice(0, 3)
|
||||
.map((label) => [label, product.specs[label]] as const);
|
||||
}
|
||||
|
||||
const DEFAULT_REQUIREMENTS: Requirements = {
|
||||
application: "",
|
||||
torque: 2,
|
||||
@@ -333,10 +368,34 @@ export default function Home() {
|
||||
const [showSampleForm, setShowSampleForm] = useState(false);
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
const [leadId, setLeadId] = useState("");
|
||||
const [catalogQuery, setCatalogQuery] = useState("");
|
||||
const [catalogCategory, setCatalogCategory] = useState("全部产品");
|
||||
const [catalogLimit, setCatalogLimit] = useState(24);
|
||||
const [selectedCatalogProduct, setSelectedCatalogProduct] = useState<CatalogProduct | null>(null);
|
||||
|
||||
const matches = useMemo(() => getMatches(requirements), [requirements]);
|
||||
const topMatches = matches.slice(0, 3);
|
||||
const top = topMatches[0];
|
||||
const filteredCatalog = useMemo(() => {
|
||||
const query = catalogQuery.trim().toLowerCase();
|
||||
return CATALOG_PRODUCTS.filter((product) => {
|
||||
const matchesCategory =
|
||||
catalogCategory === "全部产品" || product.category === catalogCategory;
|
||||
if (!matchesCategory) return false;
|
||||
if (!query) return true;
|
||||
const haystack = [
|
||||
product.name,
|
||||
product.code,
|
||||
product.category,
|
||||
...Object.keys(product.specs),
|
||||
...Object.values(product.specs),
|
||||
]
|
||||
.join(" ")
|
||||
.toLowerCase();
|
||||
return haystack.includes(query);
|
||||
});
|
||||
}, [catalogCategory, catalogQuery]);
|
||||
const visibleCatalog = filteredCatalog.slice(0, catalogLimit);
|
||||
const needsEngineer =
|
||||
top.score < 60 ||
|
||||
requirements.annualVolume === "50000件以上" ||
|
||||
@@ -374,7 +433,7 @@ export default function Home() {
|
||||
</a>
|
||||
<nav aria-label="主导航">
|
||||
<a href="#selector">AI选型</a>
|
||||
<a href="#products">产品能力</a>
|
||||
<a href="#products">完整目录</a>
|
||||
<a href="#how">服务流程</a>
|
||||
</nav>
|
||||
<button className="header-cta" type="button" onClick={() => setStage(1)}>
|
||||
@@ -400,8 +459,8 @@ export default function Home() {
|
||||
<a href="#products" className="text-action">查看能力范围</a>
|
||||
</div>
|
||||
<div className="trust-row">
|
||||
<span><b>13</b> 款标准样品</span>
|
||||
<span><b>0.09–24</b> kgf·cm</span>
|
||||
<span><b>280</b> 个产品型号</span>
|
||||
<span><b>0.09–920</b> kgf·cm</span>
|
||||
<span><b>48h</b> 方案响应</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -692,25 +751,171 @@ export default function Home() {
|
||||
<section className="products-section" id="products">
|
||||
<div className="section-heading">
|
||||
<div>
|
||||
<p className="eyebrow"><span /> 标准样品范围</p>
|
||||
<h2>从超微型到24kgf·cm</h2>
|
||||
<p className="eyebrow"><span /> 官方产品目录 · 2026.06</p>
|
||||
<h2>完整收录280个产品型号</h2>
|
||||
</div>
|
||||
<p>原型首批接入13款标准舵机。定制协议、特殊尺寸和更大扭矩项目将自动转入工程师方案。</p>
|
||||
<p>覆盖标准、异形、全金属、大扭矩和积木舵机,以及标准齿轮箱与翻盖电机。参数来自高徳乐官方产品型号表。</p>
|
||||
</div>
|
||||
<div className="product-band">
|
||||
{[
|
||||
{ name: "微型轻量", range: "1.7g–3.7g", note: "AI毛绒 · 微型机构", image: "/products/servo-2g.jpg" },
|
||||
{ name: "通用标准", range: "9g–17g", note: "玩具 · 教育 · 航模", image: "/products/servo-9g-hybrid.jpg" },
|
||||
{ name: "中等负载", range: "25g–37g", note: "机器人 · 工业机构", image: "/products/servo-37g-metal.jpg" },
|
||||
].map((item) => (
|
||||
<article key={item.name}>
|
||||
<img src={item.image} alt={item.name} />
|
||||
<div><span>{item.name}</span><h3>{item.range}</h3><p>{item.note}</p></div>
|
||||
</article>
|
||||
|
||||
<div className="catalog-summary" aria-label="产品分类统计">
|
||||
{CATALOG_CATEGORIES.slice(1).map((category) => (
|
||||
<button
|
||||
type="button"
|
||||
key={category}
|
||||
className={catalogCategory === category ? "active" : ""}
|
||||
onClick={() => {
|
||||
setCatalogCategory(category);
|
||||
setCatalogLimit(24);
|
||||
}}
|
||||
>
|
||||
<strong>{CATALOG_COUNTS[category]}</strong>
|
||||
<span>{category}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="catalog-toolbar">
|
||||
<label className="catalog-search">
|
||||
<span>⌕</span>
|
||||
<input
|
||||
value={catalogQuery}
|
||||
onChange={(event) => {
|
||||
setCatalogQuery(event.target.value);
|
||||
setCatalogLimit(24);
|
||||
}}
|
||||
placeholder="搜索型号、编码、扭矩、协议或参数"
|
||||
aria-label="搜索产品目录"
|
||||
/>
|
||||
{catalogQuery && (
|
||||
<button type="button" onClick={() => setCatalogQuery("")} aria-label="清空搜索">×</button>
|
||||
)}
|
||||
</label>
|
||||
<div className="category-pills" aria-label="产品类别筛选">
|
||||
{CATALOG_CATEGORIES.map((category) => (
|
||||
<button
|
||||
type="button"
|
||||
key={category}
|
||||
className={catalogCategory === category ? "active" : ""}
|
||||
onClick={() => {
|
||||
setCatalogCategory(category);
|
||||
setCatalogLimit(24);
|
||||
}}
|
||||
>{category}</button>
|
||||
))}
|
||||
</div>
|
||||
<p className="catalog-result-count">
|
||||
找到 <strong>{filteredCatalog.length}</strong> 个型号
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{visibleCatalog.length > 0 ? (
|
||||
<div className="catalog-grid">
|
||||
{visibleCatalog.map((product) => (
|
||||
<article className="catalog-card" key={product.id}>
|
||||
<button
|
||||
type="button"
|
||||
className="catalog-image-button"
|
||||
onClick={() => setSelectedCatalogProduct(product)}
|
||||
aria-label={`查看${product.name}详情`}
|
||||
>
|
||||
{product.image ? (
|
||||
<img src={product.image} alt={product.name} loading="lazy" />
|
||||
) : (
|
||||
<span className="catalog-placeholder">GAUDELOT</span>
|
||||
)}
|
||||
<small>{product.category}</small>
|
||||
</button>
|
||||
<div className="catalog-card-body">
|
||||
<p>{product.code}</p>
|
||||
<h3>{product.name}</h3>
|
||||
<dl>
|
||||
{getFeaturedSpecs(product).map(([label, value]) => (
|
||||
<div key={label}><dt>{label}</dt><dd>{value}</dd></div>
|
||||
))}
|
||||
</dl>
|
||||
<button type="button" onClick={() => setSelectedCatalogProduct(product)}>
|
||||
查看完整参数 <span>→</span>
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="catalog-empty">
|
||||
<strong>没有找到匹配型号</strong>
|
||||
<p>可以尝试减少关键词,或切换到“全部产品”。</p>
|
||||
<button type="button" onClick={() => { setCatalogQuery(""); setCatalogCategory("全部产品"); }}>
|
||||
清除筛选
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{catalogLimit < filteredCatalog.length && (
|
||||
<div className="load-more-wrap">
|
||||
<button type="button" onClick={() => setCatalogLimit((current) => current + 24)}>
|
||||
加载更多产品 <span>已显示 {visibleCatalog.length} / {filteredCatalog.length}</span>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{selectedCatalogProduct && (
|
||||
<div
|
||||
className="catalog-modal-backdrop"
|
||||
role="presentation"
|
||||
onMouseDown={() => setSelectedCatalogProduct(null)}
|
||||
>
|
||||
<section
|
||||
className="catalog-modal"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="catalog-modal-title"
|
||||
onMouseDown={(event) => event.stopPropagation()}
|
||||
>
|
||||
<button
|
||||
className="catalog-modal-close"
|
||||
type="button"
|
||||
onClick={() => setSelectedCatalogProduct(null)}
|
||||
aria-label="关闭产品详情"
|
||||
>×</button>
|
||||
<div className="catalog-modal-product">
|
||||
<div className="catalog-modal-image">
|
||||
{selectedCatalogProduct.image ? (
|
||||
<img src={selectedCatalogProduct.image} alt={selectedCatalogProduct.name} />
|
||||
) : (
|
||||
<span className="catalog-placeholder">GAUDELOT</span>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div className="catalog-spec-table">
|
||||
{Object.entries(selectedCatalogProduct.specs).map(([label, value]) => (
|
||||
<div key={label}><span>{label}</span><strong>{value}</strong></div>
|
||||
))}
|
||||
</div>
|
||||
<div className="catalog-modal-actions">
|
||||
<button
|
||||
className="panel-primary"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setSelectedCatalogProduct(null);
|
||||
setStage(1);
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
}}
|
||||
>
|
||||
用AI继续确认需求 <span>→</span>
|
||||
</button>
|
||||
<p>具体价格、交期及最终适配结果以工程师确认和正式文件为准。</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<section className="how-section" id="how">
|
||||
<div className="how-copy">
|
||||
<p className="eyebrow light"><span /> 无人销售边界</p>
|
||||
|
||||
Reference in New Issue
Block a user