两种商品总量计算规则

This commit is contained in:
jqtmviyu@gmail.com 2021-03-05 01:39:11 +08:00
parent f7411ecf55
commit 11ff80ec4c

View File

@ -94,11 +94,14 @@ export default {
//
totalCount(){
let totalCount = 0
this.cartList.forEach(item => {
if(item.goods_select){
totalCount += item.goods_count
}
})
//
// this.cartList.forEach(item => {
// if(item.goods_select){
// totalCount += item.goods_count
// }
// })
//
totalCount = this.cartList.filter(item=>item.goods_select).length
return totalCount
}
}