export default function computedTotalShopCar(list) {
  // 存储购物车到本地
  // await setShopCar(list)

  let totalCount = 0

  if (list.length !== 0) {
    totalCount = list.map(item => item.count).reduce((prev, cur) => prev + cur)
  }
  // #ifndef MP-TOUTIAO || APP-PLUS
  // 设置购物车底部菜单数量
  // #endif

  // console.log('计算购物车数量', totalCount)
  return totalCount
}