|
|
@@ -94,22 +94,20 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
$goodsPrice = $unitPrice * $goodsNum;
|
|
|
$totalGoodsPrice = stringUtil::calcAdd($totalGoodsPrice, $goodsPrice);
|
|
|
- $currentCover = isset($goodsInfo['shortImgList']) && !empty($currentGoodsInfo['shortImgList']) ? current($currentGoodsInfo['shortImgList']) : '';
|
|
|
- if (!empty($goodsStyleId) && isset($goodsStyleList[$goodsStyleId]['picture']) && !empty($goodsStyleList[$goodsStyleId]['picture'])) {
|
|
|
- $currentCover = $goodsStyleList[$goodsStyleId]['picture'];
|
|
|
- }
|
|
|
+
|
|
|
$orderGoods[] = [
|
|
|
'goodsId' => $currentGoodsId,
|
|
|
'userId' => $this->adminId,
|
|
|
'sjId' => $this->sjId,
|
|
|
'title' => $currentGoodsInfo['goodsName'],
|
|
|
- 'cover' => $currentCover,
|
|
|
+ 'cover' => isset($goodsInfo['shortImgList']) && !empty($currentGoodsInfo['shortImgList']) ? current($currentGoodsInfo['shortImgList']) : '',
|
|
|
'unitPrice' => $unitPrice,
|
|
|
'num' => $goodsNum,
|
|
|
'goodsStyleName' => isset($currentGoodsInfo['goodsStyleList'][$goodsStyleId]['title']) ? $currentGoodsInfo['goodsStyleList'][$goodsStyleId]['title'] : '',
|
|
|
'goodsStyleId' => $goodsStyleId,
|
|
|
'createTime' => date("Y-m-d H:i:s"),
|
|
|
];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
$user = $this->custom;
|
|
|
@@ -161,10 +159,10 @@ class OrderController extends BaseController
|
|
|
if (empty($product)) {
|
|
|
util::fail('请选择花材');
|
|
|
}
|
|
|
- $actPrice = $post['packingFee'] ?? 0; //包装费
|
|
|
+ $actPrice = $post['packingFee']??0; //包装费
|
|
|
$orderProduct = [];
|
|
|
$productInfo = ProductClass::formatProductInfo($product);
|
|
|
- $actPrice = bcadd($actPrice, $productInfo['price'], 2);
|
|
|
+ $actPrice = bcadd($actPrice,$productInfo['price'],2);
|
|
|
foreach ($product as $key => $val) {
|
|
|
$productId = $val['productId'];
|
|
|
$bigNum = $val['bigNum'];
|