From 9a23eaf6201c9d8cfeedd7244e56f6234fbea4d7 Mon Sep 17 00:00:00 2001 From: yuanjunzhe <1374457292@qq.com> Date: Thu, 28 Mar 2024 14:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Layout-shop/index.vue | 89 +++++++++ src/api/product/info.js | 10 + src/router/index.js | 15 +- src/views/product/info/detail/index.vue | 243 ++++++++++++++++++++++++ src/views/product/info/index.vue | 15 +- 5 files changed, 367 insertions(+), 5 deletions(-) create mode 100644 src/Layout-shop/index.vue create mode 100644 src/views/product/info/detail/index.vue diff --git a/src/Layout-shop/index.vue b/src/Layout-shop/index.vue new file mode 100644 index 0000000..8ba6e89 --- /dev/null +++ b/src/Layout-shop/index.vue @@ -0,0 +1,89 @@ + + + + diff --git a/src/api/product/info.js b/src/api/product/info.js index 80b02c2..4db015d 100644 --- a/src/api/product/info.js +++ b/src/api/product/info.js @@ -17,6 +17,16 @@ export function getInfo(id) { }) } + +// 查询商品信息详细 +export function getDetailInfo(id) { + return request({ + url: '/product/info/detail/' + id, + method: 'get' + }) +} + + // 新增商品信息 export function addInfo(data) { return request({ diff --git a/src/router/index.js b/src/router/index.js index 2afac71..3cce363 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' /* Layout */ import Layout from '@/layout' - +import LayoutShop from '@/Layout-shop' Vue.use(Router) /** @@ -73,6 +73,19 @@ export const constantRoutes = [ } ] }, + { + path: '', + component: LayoutShop, + redirect: 'product-detail', + children: [ + { + path: 'product-detail/:detailId(\\d+)', + component: () => import('@/views/product/info/detail/index'), + name: 'Demo', + meta: {title: '商品详情', icon: 'dashboard', affix: true} + } + ] + }, { path: '/user', component: Layout, diff --git a/src/views/product/info/detail/index.vue b/src/views/product/info/detail/index.vue new file mode 100644 index 0000000..a6cde30 --- /dev/null +++ b/src/views/product/info/detail/index.vue @@ -0,0 +1,243 @@ + + + + diff --git a/src/views/product/info/index.vue b/src/views/product/info/index.vue index 4cef2ae..668f2b9 100644 --- a/src/views/product/info/index.vue +++ b/src/views/product/info/index.vue @@ -115,6 +115,9 @@