From e2ba742b7638d1eae5d6b6c3b8316fd90cf94335 Mon Sep 17 00:00:00 2001 From: DongZeLiang <2746733890@qq.com> Date: Mon, 8 Apr 2024 20:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shopCart/Info.js | 7 ++ src/router/index.js | 4 +- src/views/shopCart/detail/index.vue | 104 ++++++++++++++++++---------- 3 files changed, 77 insertions(+), 38 deletions(-) diff --git a/src/api/shopCart/Info.js b/src/api/shopCart/Info.js index e2675f3..6eb4c49 100644 --- a/src/api/shopCart/Info.js +++ b/src/api/shopCart/Info.js @@ -33,6 +33,13 @@ export function addInfo(data) { data: data }) } +export function cartInfoIsSelected(data) { + return request({ + url: '/shopCart/Info/selected', + method: 'post', + data: data + }) +} // 修改购物车 export function updateInfo(data) { diff --git a/src/router/index.js b/src/router/index.js index 20b2aaa..ffd7807 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -82,7 +82,7 @@ export const constantRoutes = [ { path: 'product-detail/:detailId(\\d+)', component: () => import('@/views/product/info/detail/index'), - name: 'Demo', + name: 'productDetail', meta: {title: '商品详情', icon: 'dashboard', affix: true} } ] @@ -95,7 +95,7 @@ export const constantRoutes = [ { path: '/cart/detail', component: () => import('@/views/shopCart/detail/index'), - name: 'Demo', + name: 'myCart', meta: {title: '我的购物车', icon: 'dashboard', affix: true} } ] diff --git a/src/views/shopCart/detail/index.vue b/src/views/shopCart/detail/index.vue index 5789fe2..b59a730 100644 --- a/src/views/shopCart/detail/index.vue +++ b/src/views/shopCart/detail/index.vue @@ -1,8 +1,9 @@