diff --git a/api/api.js b/api/api.js index 2d975d2..7794465 100644 --- a/api/api.js +++ b/api/api.js @@ -236,7 +236,7 @@ const config = { // 添加购物车 addShopcar: { url: '/wares/addShopcar', - method: 'POST', + method: 'GET', showLoading: true, }, // 获取购物车列表 @@ -245,6 +245,18 @@ const config = { method: 'GET', showLoading: true, }, + // 取消购物车 + deleteShopcar: { + url: '/wares/deleteShopcar', + method: 'GET', + showLoading: true, + }, + // 修改购物车信息 + updateShopcar: { + url: '/wares/updateShopcar', + method: 'GET', + showLoading: true, + }, } diff --git a/pages/index/center.vue b/pages/index/center.vue index c0d5718..68ba6b2 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -64,7 +64,7 @@ - + + + + + @@ -98,6 +107,9 @@ show: false, } }, + onShow() { + this.$store.commit('getUserInfo') + }, methods: { } diff --git a/pages_order/components/product/cartAction.vue b/pages_order/components/product/cartAction.vue index 9b062c5..85ccc4c 100644 --- a/pages_order/components/product/cartAction.vue +++ b/pages_order/components/product/cartAction.vue @@ -38,7 +38,7 @@ let price = 0 this.cartList.forEach(n => { if (this.cartCheckboxValue.includes(n.id)) { - price += n.price * n.num + price += n.waresPrice * (n.num || 1) } }) return price diff --git a/pages_order/components/product/submit.vue b/pages_order/components/product/submit.vue index ec4d274..d1c7922 100644 --- a/pages_order/components/product/submit.vue +++ b/pages_order/components/product/submit.vue @@ -13,6 +13,18 @@ + + +