actions.js 200 B

12345678910
  1. import { getCart } from '../service/scrap/cart'
  2. export default {
  3. async updateCart(ctx) {
  4. const { data } = await getCart()
  5. ctx.commit('addCart', {
  6. count: data.length || 0
  7. })
  8. }
  9. }