|
@@ -117,7 +117,7 @@ class GoodsClass extends BaseClass
|
|
|
$sendCost = $data['sendCost'] ?? 0;
|
|
$sendCost = $data['sendCost'] ?? 0;
|
|
|
$shopImg = $data['shopImg'] ?? [];
|
|
$shopImg = $data['shopImg'] ?? [];
|
|
|
if ($sendCost > 0) {
|
|
if ($sendCost > 0) {
|
|
|
- $div = bcmul($sendCost, $num, 2);
|
|
|
|
|
|
|
+ $div = bcdiv($sendCost, $num, 2);
|
|
|
$cgPrice = bcadd($cgPrice, $div, 2);
|
|
$cgPrice = bcadd($cgPrice, $div, 2);
|
|
|
}
|
|
}
|
|
|
$cover = isset($shopImg[0]) ? $shopImg[0] : '';
|
|
$cover = isset($shopImg[0]) ? $shopImg[0] : '';
|
|
@@ -192,7 +192,7 @@ class GoodsClass extends BaseClass
|
|
|
$cover = $postGoods['cover'] ?? '';
|
|
$cover = $postGoods['cover'] ?? '';
|
|
|
$num = $postGoods['num'] ?? 0;
|
|
$num = $postGoods['num'] ?? 0;
|
|
|
$totalNum = bcadd($num, $totalNum);
|
|
$totalNum = bcadd($num, $totalNum);
|
|
|
- $cgPrice = $postGoods['cgPrice'] ?? 0;
|
|
|
|
|
|
|
+ $cgPrice = $postGoods['price'] ?? 0;
|
|
|
$salePrice = $postGoods['salePrice'] ?? 0;
|
|
$salePrice = $postGoods['salePrice'] ?? 0;
|
|
|
if (empty($salePrice)) {
|
|
if (empty($salePrice)) {
|
|
|
$salePrice = $goodsInfo[$goodsId]['price'] ?? 0;
|
|
$salePrice = $goodsInfo[$goodsId]['price'] ?? 0;
|