|
@@ -57,8 +57,8 @@ class OrderService extends CrudService {
|
|
|
*/
|
|
|
computedShopTotal(list) {
|
|
|
for (const i of list) {
|
|
|
- i.goods_total = i.goods.reduce((p, n) => p + (n.money || 0), 0);
|
|
|
- i.freight_total = i.goods.reduce((p, n) => p + (n.freight || 0), 0);
|
|
|
+ i.goods_total = i.goods.reduce((p, n) => p + (n.money || 0) * (n.num || 0), 0);
|
|
|
+ i.freight_total = i.goods.reduce((p, n) => p + (n.freight || 0) * (n.num || 0), 0);
|
|
|
}
|
|
|
return list;
|
|
|
}
|