diff --git a/api/api.js b/api/api.js index 061bea8..e8723cd 100644 --- a/api/api.js +++ b/api/api.js @@ -5,7 +5,7 @@ import utils from '../utils/utils.js' let limit = {} let debounce = {} -const models = ['login', 'index'] +const models = ['login', 'index', 'cart'] const config = { // 示例 diff --git a/api/model/cart.js b/api/model/cart.js new file mode 100644 index 0000000..16c83ce --- /dev/null +++ b/api/model/cart.js @@ -0,0 +1,34 @@ + + +// 登录相关接口 + +const api = { + // 获取购物车信息列表带分页 + getCartPageList: { + url: '/cat/getCartPageList', + method: 'GET', + limit : 500, + }, + // 加入购物车 + addCart: { + url: '/cat/addCart', + method: 'GET', + limit : 500, + }, + // 删除购物车信息 + deleteCart: { + url: '/cat/deleteCart', + method: 'POST', + auth: true, + }, + // 修改购物车信息数量 + updateCartNum: { + url: '/cat/updateCartNum', + method: 'POST', + auth: true, + limit : 500, + showLoading : true, + }, +} + +export default api \ No newline at end of file diff --git a/api/model/index.js b/api/model/index.js index 9fe5cdc..bf6a19b 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -32,6 +32,12 @@ const api = { method: 'POST', limit : 1000, }, + // 商城-加入购物车之后一次下多个订单 + createSumOrder: { + url: '/order/createSumOrder', + method: 'POST', + limit : 1000, + }, // 支付订单 payOrder: { url: '/index/payOrder', @@ -43,6 +49,12 @@ const api = { method: 'POST', limit : 1000, }, + // 取消快捷订单 + cancelOrderFast: { + url: '/index/cancelOrder', + method: 'POST', + limit : 1000, + }, // 获取快捷下单信息 getOrderInfo: { url: '/index/getOrderInfo', @@ -135,6 +147,7 @@ const api = { method: 'POST', limit : 1000, }, + } export default api \ No newline at end of file diff --git a/components/base/kefu.vue b/components/base/kefu.vue index 52cf33c..c4333b9 100644 --- a/components/base/kefu.vue +++ b/components/base/kefu.vue @@ -41,13 +41,14 @@