diff --git a/src/pages/details/details.vue b/src/pages/details/details.vue index b55cb88..b2c2e73 100644 --- a/src/pages/details/details.vue +++ b/src/pages/details/details.vue @@ -420,8 +420,8 @@ export default { }) }, // 加入购物车 - addCart (mpId, num, checkedSKU, skId,price) { - const addCartList = {} + addCart (mpId, num, checkedSKU, skId, price) { + const addCartList = {} addCartList.mp_id = mpId addCartList.sk_id = skId addCartList.num = num @@ -437,9 +437,7 @@ export default { }) } // 再次请求购物车接口,实现实时更新 - store.dispatch('cart/getCartList', { - uid: this.$store.state.user.userInfo.uid, - }) + store.dispatch('details/getCartNumber') }) }, },