作者 jinglong
1 个管道 的构建 通过 耗费 0 秒

修改购物车库存

... ... @@ -137,6 +137,9 @@ class Cars extends Api
$value['goods_number'] = $value['stock'];
}
$s_index = array_search($value['style'],Common::salePrice($value['g_style']));
$stock = Common::salePrice($value['stock'])[$s_index];
$value['stock'] = $stock;
}
// $total_price = array_sum(array_map(function ($product_row) {
// return $product_row['price'] * $product_row['goods_number'];
... ...