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]: ''