From 26c236041f750fd08f7cbc4e521905e782fa4cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Thu, 29 Jan 2026 15:30:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(pages):=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=92=8C=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B9=B6=E9=87=8D=E6=9E=84=E9=A1=B5=E9=9D=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 app/pages/article/[id].vue 页面实现文章列表功能 - 新增 app/pages/goods-item/[id].vue 页面实现商品详情功能 - 重构 app/pages/page/[id].vue 页面样式和SEO配置 - 重命名 app/pages/product/[id].vue 为 app/pages/goods/[navigationId].vue - 新增 app/pages/product/[navigationId].vue 保留产品分类页面路由 - 新增 app/components/shop/GoodsCategoryPage.vue 商品分类组件 - 更新 API 类型定义修复 shopGoods 接口响应类型 - 实现商品分类页面的商品网格布局和分页功能 - 添加面包屑导航、搜索功能和图片懒加载支持 - 优化页面SEO元数据和链接规范化配置 - 统一页面错误处理和加载状态显示样式 --- app/api/shop/shopGoods/index.ts | 2 +- app/components/shop/GoodsCategoryPage.vue | 441 ++++++++++++++++++++++ app/pages/article/[id].vue | 382 +++++++++++++++++++ app/pages/goods-item/[id].vue | 399 ++++++++++++++++++++ app/pages/goods/[navigationId].vue | 10 + app/pages/page/[id].vue | 234 ++++++++++-- app/pages/product/[id].vue | 11 - app/pages/product/[navigationId].vue | 8 + 8 files changed, 1437 insertions(+), 50 deletions(-) create mode 100644 app/components/shop/GoodsCategoryPage.vue create mode 100644 app/pages/article/[id].vue create mode 100644 app/pages/goods-item/[id].vue create mode 100644 app/pages/goods/[navigationId].vue delete mode 100644 app/pages/product/[id].vue create mode 100644 app/pages/product/[navigationId].vue diff --git a/app/api/shop/shopGoods/index.ts b/app/api/shop/shopGoods/index.ts index 580cd69..5cc3e2a 100644 --- a/app/api/shop/shopGoods/index.ts +++ b/app/api/shop/shopGoods/index.ts @@ -106,7 +106,7 @@ export async function getShopGoods(id: number) { } export async function getCount(params: ShopGoodsParam) { - const res = await request.get(MODULES_API_URL + '/shop/shop-goods/data', { + const res = await request.get>(MODULES_API_URL + '/shop/shop-goods/data', { params }); if (res.data.code === 0) { diff --git a/app/components/shop/GoodsCategoryPage.vue b/app/components/shop/GoodsCategoryPage.vue new file mode 100644 index 0000000..dd52645 --- /dev/null +++ b/app/components/shop/GoodsCategoryPage.vue @@ -0,0 +1,441 @@ + + + + + diff --git a/app/pages/article/[id].vue b/app/pages/article/[id].vue new file mode 100644 index 0000000..f2f77d2 --- /dev/null +++ b/app/pages/article/[id].vue @@ -0,0 +1,382 @@ + + + + + diff --git a/app/pages/goods-item/[id].vue b/app/pages/goods-item/[id].vue new file mode 100644 index 0000000..3d96553 --- /dev/null +++ b/app/pages/goods-item/[id].vue @@ -0,0 +1,399 @@ + + + + + + diff --git a/app/pages/goods/[navigationId].vue b/app/pages/goods/[navigationId].vue new file mode 100644 index 0000000..7caefbc --- /dev/null +++ b/app/pages/goods/[navigationId].vue @@ -0,0 +1,10 @@ + + + + + diff --git a/app/pages/page/[id].vue b/app/pages/page/[id].vue index 0c650a9..7162ce8 100644 --- a/app/pages/page/[id].vue +++ b/app/pages/page/[id].vue @@ -1,48 +1,84 @@ + diff --git a/app/pages/product/[id].vue b/app/pages/product/[id].vue deleted file mode 100644 index 85af715..0000000 --- a/app/pages/product/[id].vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/app/pages/product/[navigationId].vue b/app/pages/product/[navigationId].vue new file mode 100644 index 0000000..c2bf16a --- /dev/null +++ b/app/pages/product/[navigationId].vue @@ -0,0 +1,8 @@ + + + +