From 3e1d77988de483d2b24db777496710d9945bfb35 Mon Sep 17 00:00:00 2001 From: qiube <18969599531@163.com> Date: Mon, 22 Dec 2025 10:19:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(router):=20=E6=B7=BB=E5=8A=A0=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E5=92=8C=E5=95=86=E5=93=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 App.vue 中添加商品详情和商品管理菜单项 - 配置商品详情页路由,支持动态参数 id - 添加创建订单页面的新路由路径 /create-order - 引入并配置商品管理页面路由 /manage/product - 更新首页路由指向商品详情组件 - 动态导入商品管理组件以优化性能 --- src/App.vue | 6 ++++-- src/router/index.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index e754ebc..3487bc0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,14 +2,16 @@
-

MT Pay - PingPong支付系统

+

MT Pay

- 创建订单 + 商品详情 + 创建订单 订单查询 + 商品管理
diff --git a/src/router/index.js b/src/router/index.js index d5264c4..814b1c0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,10 +3,21 @@ import CreateOrder from '../views/CreateOrder.vue' import Checkout from '../views/Checkout.vue' import PaymentResult from '../views/PaymentResult.vue' import OrderQuery from '../views/OrderQuery.vue' +import ProductDetail from '../views/ProductDetail.vue' const routes = [ { path: '/', + name: 'Home', + component: ProductDetail + }, + { + path: '/product/:id', + name: 'ProductDetail', + component: ProductDetail + }, + { + path: '/create-order', name: 'CreateOrder', component: CreateOrder }, @@ -24,6 +35,11 @@ const routes = [ path: '/query', name: 'OrderQuery', component: OrderQuery + }, + { + path: '/manage/product', + name: 'ProductManage', + component: () => import('../views/ProductManage.vue') } ]