|
|
@@ -347,14 +347,20 @@ class OrderController extends BaseController
|
|
|
$respond = OrderClass::getOrderList($where);
|
|
|
$respond['shop'] = $this->shop;
|
|
|
$respond['shopExt'] = $this->shopExt;
|
|
|
- $respond['shareInfo'] = [];
|
|
|
- if (!empty($mergeInfo)) {
|
|
|
- $respond['shareInfo'] = [
|
|
|
- 'id' => $mergeInfo->cgMergeId ?? 0,
|
|
|
- 'mergeId' => $mergeInfo->cgMergeId ?? 0,
|
|
|
- 'salt' => $mergeInfo->cgSalt ?? '',
|
|
|
- ];
|
|
|
- }
|
|
|
+ $totalPrice = 0;
|
|
|
+ if (!empty($respond['list'])) {
|
|
|
+ foreach ($respond['list'] as $order) {
|
|
|
+ $actPrice = $order['actPrice'] ?? 0;
|
|
|
+ $totalPrice = bcadd($totalPrice, $actPrice, 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $totalPrice = floatval($totalPrice);
|
|
|
+ $respond['shareInfo'] = [
|
|
|
+ 'id' => $mergeInfo->cgMergeId ?? 0,
|
|
|
+ 'mergeId' => $mergeInfo->cgMergeId ?? 0,
|
|
|
+ 'salt' => $mergeInfo->cgSalt ?? '',
|
|
|
+ 'totalPrice' => $totalPrice,
|
|
|
+ ];
|
|
|
util::success($respond);
|
|
|
}
|
|
|
|