From b900aeb7fb006cf13d3f9443379bbb0777082bed Mon Sep 17 00:00:00 2001
From: sunshine7058 <2564255161@qq.com>
Date: Tue, 9 Apr 2024 09:34:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E9=85=8D=E7=BD=AE=E8=BF=9B=E8=A1=8C?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/product/info.js | 6 -
src/api/shopCart/info.js | 44 +++++
src/views/shopCart/info/index.vue | 310 ++++++++++++++++++++++++++++++
vue.config.js | 2 +-
4 files changed, 355 insertions(+), 7 deletions(-)
create mode 100644 src/api/shopCart/info.js
create mode 100644 src/views/shopCart/info/index.vue
diff --git a/src/api/product/info.js b/src/api/product/info.js
index 1f5a19d..acc621a 100644
--- a/src/api/product/info.js
+++ b/src/api/product/info.js
@@ -51,9 +51,3 @@ export function delInfo(id) {
})
}
-export function getDetailInfo(id){
- return request({
- url: '/product/info/detail/' + id,
- method: 'get'
- })
-}
diff --git a/src/api/shopCart/info.js b/src/api/shopCart/info.js
new file mode 100644
index 0000000..789708f
--- /dev/null
+++ b/src/api/shopCart/info.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询购物车列表
+export function listInfo(query) {
+ return request({
+ url: '/shopCart/info/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询购物车详细
+export function getInfo(id) {
+ return request({
+ url: '/shopCart/info/' + id,
+ method: 'get'
+ })
+}
+
+// 新增购物车
+export function addInfo(data) {
+ return request({
+ url: '/shopCart/info',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改购物车
+export function updateInfo(data) {
+ return request({
+ url: '/shopCart/info/'+data.id,
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除购物车
+export function delInfo(id) {
+ return request({
+ url: '/shopCart/info/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/views/shopCart/info/index.vue b/src/views/shopCart/info/index.vue
new file mode 100644
index 0000000..4eec922
--- /dev/null
+++ b/src/views/shopCart/info/index.vue
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index 92405cd..17d9a1d 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://10.1.123.97:8080`,
+ target: `http://127.0.0.1:8080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''