AirShelf/app/products/page.tsx
iye f420af2069
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 6s
chore: 全量推送 · 累积页面改动 + Next.js 工程骨架 + v1/ 归档 + 文档
页面 (电商AI平台/)
- account / team / settings / index / products / projects: 累积迭代
- restraint.css: 设计 token 补充
- login.html / register.html: 新增登录注册页
- _ARCHIVE.md: 归档说明

Next.js 工程骨架
- app/ + components/: 新一代 SPA 雏形 (page / layout / sidebar / topbar / GridBg / Icon)
- package.json / package-lock.json / next.config.mjs / tsconfig.json / postcss.config.mjs / next-env.d.ts

历史归档 / 文档
- v1/: 原 V1 静态稿镜像 (含 mockup-A/B/C)
- PRD.md / deployment-guide.md / _check.html
- ui参考/ / screenshots/

杂项
- .gitignore 调整
- 删除根 README.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 21:16:46 +08:00

94 lines
3.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Topbar from "@/components/Topbar";
import Icon from "@/components/Icon";
interface Product {
name: string;
cat: string;
imgs: number;
tags: string[];
thumb: string;
}
const PRODUCTS: Product[] = [
{ name: "透真玻尿酸补水面膜", cat: "美妆个护", imgs: 3, tags: ["熬夜党", "敏感肌", "¥39.9/盒"], thumb: "补水面膜 · 1200×800" },
{ name: "南卡 Lite Pro 蓝牙耳机", cat: "数码 3C", imgs: 5, tags: ["通勤", "运动", "¥199"], thumb: "蓝牙耳机 · 1200×800" },
{ name: "滋啦速食牛肉面 · 6 桶装", cat: "食品饮料", imgs: 4, tags: ["加班", "独居", "¥49.9"], thumb: "速食牛肉面 · 1200×800" },
{ name: "透真清透物理防晒霜", cat: "美妆个护", imgs: 4, tags: ["SPF50", "通勤", "¥69"], thumb: "防晒霜 · 1200×800" },
{ name: "三顿半同款冻干咖啡粉", cat: "食品饮料", imgs: 6, tags: ["提神", "早八", "¥89/24 颗"], thumb: "咖啡冻干粉 · 1200×800" },
{ name: "小熊 4L 可视空气炸锅", cat: "家电", imgs: 5, tags: ["小户型", "健康", "¥159"], thumb: "空气炸锅 · 1200×800" },
{ name: "露露同款裸感瑜伽裤", cat: "服饰", imgs: 8, tags: ["健身房", "通勤", "¥119"], thumb: "瑜伽裤 · 1200×800" },
];
const FILTERS = ["全部", "美妆个护", "数码 3C", "食品饮料", "服饰", "家电"];
export default function ProductsPage() {
return (
<>
<Topbar crumbs={[{ label: "工作台", href: "/" }, { label: "商品库" }]} />
<section className="content">
<div className="page-head">
<div>
<h1></h1>
<div className="sub">
<span>12 </span>
<span className="mono-sub">· SKU</span>
<span>· </span>
</div>
</div>
<div className="actions">
<button className="btn btn-primary">
<Icon name="plus" size={14} />
</button>
</div>
</div>
<div className="toolbar">
<div className="toolbar-search">
<Icon name="search" />
<input className="input" placeholder="搜索商品名称、品牌" />
</div>
{FILTERS.map((f, i) => (
<button key={f} className={`filter-chip${i === 0 ? " active" : ""}`}>
{f}
{i === 0 && <span className="count-mini">12</span>}
</button>
))}
<span className="spacer" />
<button className="filter-chip"></button>
</div>
<div className="product-grid">
{PRODUCTS.map((p) => (
<div className="product-card" key={p.name}>
<div className="placeholder product-thumb">
<span className="ph-frame">{p.thumb}</span>
</div>
<div className="product-body">
<div className="product-name">{p.name}</div>
<div className="product-meta">
<span>{p.cat}</span>
<span className="dot-sep">·</span>
<span>{p.imgs} </span>
</div>
<div className="product-tags">
{p.tags.map((t) => (
<span key={t} className="tag-sm">{t}</span>
))}
</div>
</div>
</div>
))}
<div className="product-card add">
<div className="plus-circle">
<Icon name="plus" size={20} />
</div>
<div></div>
</div>
</div>
</section>
</>
);
}