等长度的数组,反写总数,未找到问题根源
作者:
追逐繁星的阿忠 | 来源:发表于
2020-08-31 16:50 被阅读0次
/*
for(let item of tempArr){
for(let item2 of oldCartList){ // 二次循环回显购物车添加的数量和计算对应的价格值
if(item2.id == item.id){
item['count'] = item2.num;
if (item.price > 0) {
item['price2'] = '¥' + ((item.price*item2.num) / 100).toFixed(2);
} else {
item['price2'] = '¥' + 0.00;
}
}
}
}*/
/*for(let item of oldCartList){
for(let item2 of tempArr){
if(item2.id == item.id){
item2['count'] = item.num;
if (item2.price > 0) {
item2['price2'] = '¥' + ((item2.price*item.num) / 100).toFixed(2);
} else {
item2['price2'] = '¥' + 0.00;
}
}
}
}*/
本文标题:等长度的数组,反写总数,未找到问题根源
本文链接:https://www.haomeiwen.com/subject/yaxpsktx.html
网友评论