var a = i.data.main;
a.cartList.total = t.total, a.cartList.totalprice = t.totalprice, a.cartList.list = [ 1 ],
s[i.data.goodsid] = t.goodstotal,
console.log(s);
var nusa = Object.values(s);
var nus = 0; //这里开始,求和的计算方式
nus = nusa.reduce(function(prev, cur, index, arr) {
return prev + cur;
})
console.log(nusa, nus);
|
请发表评论