Compare commits
26 Commits
master
...
feature/we
| Author | SHA1 | Date |
|---|---|---|
|
|
7f37dd6193 | 1 week ago |
|
|
677a2504c4 | 2 weeks ago |
|
|
40e7910b05 | 2 weeks ago |
|
|
bffeb925a0 | 2 weeks ago |
|
|
12f43f65a2 | 3 weeks ago |
|
|
532eaa047f | 3 weeks ago |
|
|
2f0a31b53b | 3 weeks ago |
|
|
fef3e6aa4c | 3 weeks ago |
|
|
8dae75f5d2 | 3 weeks ago |
|
|
ac102c01de | 3 weeks ago |
|
|
bcc6e149c8 | 3 weeks ago |
|
|
597a367b20 | 3 weeks ago |
|
|
d0b5087bd2 | 3 weeks ago |
|
|
254097e026 | 3 weeks ago |
|
|
f3cb140c9b | 3 weeks ago |
|
|
69dc8bab68 | 3 weeks ago |
|
|
6ac8075ba7 | 3 weeks ago |
|
|
7e98cddf91 | 4 weeks ago |
|
|
e5094931c1 | 4 weeks ago |
|
|
1c2cb34f9f | 4 weeks ago |
|
|
1d83d835d6 | 1 month ago |
|
|
3efd27da99 | 1 month ago |
|
|
3b04f55ffe | 1 month ago |
|
|
3d6755cd84 | 1 month ago |
|
|
23f38c7c79 | 1 month ago |
|
|
a8a253a047 | 1 month ago |
428 changed files with 19073 additions and 1584 deletions
@ -1,70 +1 @@ |
|||
## Docker 发布配置 |
|||
|
|||
- 新增:`site/Dockerfile` - 多阶段构建配置,基于 node:20-alpine,优化镜像体积 |
|||
- 新增:`site/.dockerignore` - Docker 构建忽略文件,排除不必要的文件 |
|||
- 新增:`site/docker-compose.yml` - Docker Compose 配置文件,便于本地和服务器部署 |
|||
- 新增:`DOCKER.md` - Docker 发布完整指南,包含构建、运行、发布到 Docker Hub 等步骤 |
|||
- 更新:`site/next.config.mjs` - 添加 `output: 'standalone'` 配置,支持独立输出模式,优化 Docker 部署 |
|||
- 修复:`site/Dockerfile` - 添加复制 `data` 目录到容器,修复运行时找不到 JSON 数据文件的错误(ENOENT: no such file or directory) |
|||
|
|||
## 移动端导航修复 |
|||
|
|||
- 修复:`site/components/MainNav.tsx` - 添加移动端汉堡菜单,解决手机端导航菜单不显示的问题 |
|||
- 将组件改为客户端组件("use client"),使用 useState 管理菜单状态 |
|||
- 添加移动端菜单按钮(汉堡图标),点击展开/收起菜单 |
|||
- 移动端菜单包含搜索框和所有导航项 |
|||
- PC 端保持原有横向导航布局不变 |
|||
|
|||
## 功能更新 |
|||
|
|||
- About 轮播统一比例:`BannerCarousel` 支持 `aspectClass`,在 About 页固定为 `aspect-[16/6]`,保证三张图一致大小(object-cover 填充)。 |
|||
- 轮播增强:`BannerCarousel` 新增左右切换按钮(Prev/Next),悬浮可见;保持自动轮播与指示点。 |
|||
- 导航新增:在 `mainnav.json` 与 `data/en/mainnav.json` 首位添加“公司介绍/About”,链接 `/about`。 |
|||
- 新增页面:`app/[locale]/about/page.tsx`,上方轮播(手机/家电/智能),下方“公司产品介绍”段落。 |
|||
- 新增数据:`data/about.json` 与 `data/en/about.json`。 |
|||
- 修复:横幅链接指向不存在的 `flagship`,改为现有产品 `p1`(中/英 `banners.json`)。 |
|||
- 本地化:产品详情页根据 `locale` 切换文案(未找到/返回/首页/加入购物车)。 |
|||
- 视觉优化:`ProductCard` 提升观感(白底圆角阴影、居中等比展示、标题/描述固定高度、悬浮上浮)。 |
|||
- 布局优化:`ProductGrid` 增大断点间距与列数回落,频道页头部增加标题与返回入口。 |
|||
- 修复:本地化引入后样式与布局错乱的根因(双层布局)。 |
|||
- 根级 `app/layout.tsx` 改为只渲染 `{children}`,不再包含 Header/Footer。 |
|||
- 根首页 `app/page.tsx` 改为重定向到 `/zh-CN`,所有实际页面只使用 `app/[locale]/layout.tsx` 的单一布局。 |
|||
- 多语言:取消 Next 内置 i18n 配置,统一使用 `app/[locale]/*` 路由前缀,避免与布局冲突。 |
|||
- 链接前缀:为组件增加 `basePath/locale` 支持,确保所有链接都指向带语言前缀的路径。 |
|||
- 更新 `MainNav`、`BannerCarousel`、`PromoGrid`、`ProductCard`、`ProductGrid`、`FloorSection` 接口并在页面传入 `basePath`。 |
|||
- 新增本地化路由:`app/[locale]/layout.tsx`、`app/[locale]/page.tsx`、`app/[locale]/channel/[slug]/page.tsx`、`app/[locale]/product/[id]/page.tsx`。 |
|||
- 数据按语言读取:`lib/data.ts` 增加 locale 感知,优先读取 `data/<locale>/*.json`,否则回退 `data/*.json`。 |
|||
- 英文示例数据:`data/en/{mainnav,banners,promos,products,services}.json`。 |
|||
- 语言开关:新增 `components/LangSwitch.tsx`,在 `MainNav` 右侧切换中英文(在路径前添加/切换 `/en` 或 `/zh-CN`)。 |
|||
- 新增:频道页 `app/channel/[slug]/page.tsx`(从 `data/products.json` 匹配 floor,显示横幅与产品网格),避免手机/家电等频道 404。 |
|||
- 新增:产品详情页 `app/product/[id]/page.tsx`(从数据集中查找产品,含面包屑与占位购买按钮),避免产品链接 404。 |
|||
- 新增:`app/not-found.tsx` 全局 404 友好页。 |
|||
- 新增:批量 SVG 占位图到 `site/public/`(hero/floors/products/promos/icons),并将 `data/*.json` 的图片扩展名改为 `.svg` 对应路径,确保本地即刻有图可用。 |
|||
- 修复:`site/public/products/a2.svg` 的 `xmlns` 写法错误,改为 `http://www.w3.org/2000/svg`,解决“净化器”图片不显示。 |
|||
## 2025-10-30 |
|||
|
|||
- 新增:项目任务清单(初始化 10 项),当前进行中:建立 data/ 与类型定义。 |
|||
- 新增:`site/types.ts` 类型定义(NavItem/Banner/Promo/Product/Floor/ServiceLink)。 |
|||
- 新增:`site/data/` 示例数据文件(`nav.json`、`banners.json`、`products.json`)。 |
|||
|
|||
- 新增:基础 UI 组件 `site/components/TopBar.tsx`、`MainNav.tsx`、`Footer.tsx`;组件以 props 驱动,后续由页面注入数据。 |
|||
|
|||
- 变更:取消 TopBar 登录/注册入口,仅保留帮助中心链接。 |
|||
- 新增:数据读取工具 `site/lib/data.ts`(从 `data/*.json` 读取)。 |
|||
- 新增:首页所需组件 `BannerCarousel`、`PromoGrid`、`ProductCard`、`ProductGrid`、`FloorSection`、`ServiceLinks`。 |
|||
- 新增:`app/layout.tsx`、`app/page.tsx`、`app/globals.css`,完成首页骨架接线(TopBar→MainNav→Hero→Promos→楼层→服务→Footer)。 |
|||
|
|||
- 新增与配置:Next.js + TypeScript + Tailwind 环境 |
|||
- 更新 `site/package.json`:添加脚本(dev/build/start)与依赖(next/react/react-dom)及 devDependencies(typescript/@types/node/@types/react/tailwindcss/postcss/autoprefixer 等)。 |
|||
- 新增 `site/tsconfig.json`:启用严格模式、ES2020、Bundler 解析、引入 Node/React 类型。 |
|||
- 新增 `site/next.config.ts`、`site/postcss.config.mjs`、`site/tailwind.config.ts`,Tailwind 扫描 `app/` `components/`。 |
|||
- 将 Next.js 配置从 `next.config.ts` 改为 `next.config.mjs`(Next 14 不支持 `.ts` 配置)。 |
|||
- 移除 TopBar:删除 `site/components/TopBar.tsx` 与 `site/data/topbar.json`,`app/layout.tsx` 不再引用;`site/lib/data.ts` 移除 `getTopbarNav`。 |
|||
- Windows 终端设 UTF-8(`chcp 65001` + `$OutputEncoding`)后执行 `yarn install` 和依赖安装以避免中文乱码。 |
|||
- 为避免 Tailwind v4 与现有配置不兼容,暂将 Tailwind 固定为 3.4.10,并将 React/Next 与类型依赖固定到兼容版本。 |
|||
|
|||
变更原因:为实现基于 Next.js + Tailwind 的官网首页布局,先行搭建数据与类型骨架,保证后续内容可替换。 |
|||
|
|||
|
|||
|
|||
- 新增:`PLAN.md` 实施计划与步骤(目标/范围/架构/步骤/部署/替换指南/里程碑)。 |
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,27 @@ |
|||
{ |
|||
"polyfillFiles": [ |
|||
"static/chunks/polyfills.js" |
|||
], |
|||
"devFiles": [ |
|||
"static/chunks/fallback/react-refresh.js" |
|||
], |
|||
"ampDevFiles": [ |
|||
"static/chunks/fallback/webpack.js", |
|||
"static/chunks/fallback/amp.js" |
|||
], |
|||
"lowPriorityFiles": [], |
|||
"rootMainFiles": [], |
|||
"pages": { |
|||
"/_app": [ |
|||
"static/chunks/fallback/webpack.js", |
|||
"static/chunks/fallback/main.js", |
|||
"static/chunks/fallback/pages/_app.js" |
|||
], |
|||
"/_error": [ |
|||
"static/chunks/fallback/webpack.js", |
|||
"static/chunks/fallback/main.js", |
|||
"static/chunks/fallback/pages/_error.js" |
|||
] |
|||
}, |
|||
"ampFirstPages": [] |
|||
} |
|||
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@ |
|||
"use strict"; |
|||
/* |
|||
* ATTENTION: An "eval-source-map" devtool has been used. |
|||
* This devtool is neither made for production nor for readable output files. |
|||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. |
|||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|||
* or disable the default devtool with "devtool: false". |
|||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|||
*/ |
|||
exports.id = "_rsc_components_ProductCarouselSection_tsx"; |
|||
exports.ids = ["_rsc_components_ProductCarouselSection_tsx"]; |
|||
exports.modules = { |
|||
|
|||
/***/ "(rsc)/./components/ProductCarouselSection.tsx": |
|||
/*!***********************************************!*\ |
|||
!*** ./components/ProductCarouselSection.tsx ***! |
|||
\***********************************************/ |
|||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
|||
|
|||
__webpack_require__.r(__webpack_exports__); |
|||
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
|||
/* harmony export */ ProductCarouselSection: () => (/* binding */ e0) |
|||
/* harmony export */ }); |
|||
/* harmony import */ var next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/build/webpack/loaders/next-flight-loader/module-proxy */ "(rsc)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js"); |
|||
|
|||
const proxy = (0,next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(String.raw`D:\Desktop\qa\web\X1_Site\site\components\ProductCarouselSection.tsx`) |
|||
|
|||
// Accessing the __esModule property and exporting $$typeof are required here.
|
|||
// The __esModule getter forces the proxy target to create the default export
|
|||
// and the $$typeof value is for rendering logic to determine if the module
|
|||
// is a client boundary.
|
|||
const { __esModule, $$typeof } = proxy; |
|||
const __default__ = proxy.default; |
|||
|
|||
const e0 = (0,next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(String.raw`D:\Desktop\qa\web\X1_Site\site\components\ProductCarouselSection.tsx#ProductCarouselSection`); |
|||
|
|||
|
|||
/***/ }) |
|||
|
|||
}; |
|||
; |
|||
@ -0,0 +1,41 @@ |
|||
"use strict"; |
|||
/* |
|||
* ATTENTION: An "eval-source-map" devtool has been used. |
|||
* This devtool is neither made for production nor for readable output files. |
|||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. |
|||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|||
* or disable the default devtool with "devtool: false". |
|||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|||
*/ |
|||
exports.id = "_rsc_components_SolutionsCarousel_tsx"; |
|||
exports.ids = ["_rsc_components_SolutionsCarousel_tsx"]; |
|||
exports.modules = { |
|||
|
|||
/***/ "(rsc)/./components/SolutionsCarousel.tsx": |
|||
/*!******************************************!*\ |
|||
!*** ./components/SolutionsCarousel.tsx ***! |
|||
\******************************************/ |
|||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
|||
|
|||
__webpack_require__.r(__webpack_exports__); |
|||
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
|||
/* harmony export */ SolutionsCarousel: () => (/* binding */ e0) |
|||
/* harmony export */ }); |
|||
/* harmony import */ var next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/build/webpack/loaders/next-flight-loader/module-proxy */ "(rsc)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js"); |
|||
|
|||
const proxy = (0,next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(String.raw`D:\Desktop\qa\web\X1_Site\site\components\SolutionsCarousel.tsx`) |
|||
|
|||
// Accessing the __esModule property and exporting $$typeof are required here.
|
|||
// The __esModule getter forces the proxy target to create the default export
|
|||
// and the $$typeof value is for rendering logic to determine if the module
|
|||
// is a client boundary.
|
|||
const { __esModule, $$typeof } = proxy; |
|||
const __default__ = proxy.default; |
|||
|
|||
const e0 = (0,next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(String.raw`D:\Desktop\qa\web\X1_Site\site\components\SolutionsCarousel.tsx#SolutionsCarousel`); |
|||
|
|||
|
|||
/***/ }) |
|||
|
|||
}; |
|||
; |
|||
@ -1,4 +1,6 @@ |
|||
{ |
|||
"/page": "app/page.js", |
|||
"/[locale]/page": "app/[locale]/page.js" |
|||
"/[locale]/page": "app/[locale]/page.js", |
|||
"/[locale]/solutions/page": "app/[locale]/solutions/page.js", |
|||
"/[locale]/about/page": "app/[locale]/about/page.js", |
|||
"/[locale]/products/page": "app/[locale]/products/page.js" |
|||
} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue