|
|
@ -100,8 +100,6 @@ class OrderOnlineController extends BaseController |
|
|
$res['store_list'] = $this->shopCartService->getGoodsByShopcartId($shopcartIds); |
|
|
$res['store_list'] = $this->shopCartService->getGoodsByShopcartId($shopcartIds); |
|
|
//获取用户优惠券
|
|
|
//获取用户优惠券
|
|
|
$res['coupon'] = $this->couponRecService->allForOnlineOrderAvailable($userId, $marketId); |
|
|
$res['coupon'] = $this->couponRecService->allForOnlineOrderAvailable($userId, $marketId); |
|
|
//获取配送费
|
|
|
|
|
|
$res['distribution_price'] = '5.0'; |
|
|
|
|
|
//增值服务接口
|
|
|
//增值服务接口
|
|
|
$res['value_added_service'] = [ |
|
|
$res['value_added_service'] = [ |
|
|
'select' => 1, |
|
|
'select' => 1, |
|
|
@ -110,10 +108,10 @@ class OrderOnlineController extends BaseController |
|
|
$total = 0; |
|
|
$total = 0; |
|
|
foreach ($res['store_list'] as $store) |
|
|
foreach ($res['store_list'] as $store) |
|
|
{ |
|
|
{ |
|
|
$total+= $store['subtotal']; |
|
|
|
|
|
|
|
|
$total = bcadd($total,$store['subtotal'],2); |
|
|
} |
|
|
} |
|
|
$total+= $res['value_added_service']['price']; |
|
|
|
|
|
$total+= $res['distribution_price']; |
|
|
|
|
|
|
|
|
$total = bcadd($total,$res['value_added_service']['price'],2); |
|
|
|
|
|
$total = bcadd($total,$res['location']['distribution_price'],2); |
|
|
$res['total'] = $total; |
|
|
$res['total'] = $total; |
|
|
return $this->success($res); |
|
|
return $this->success($res); |
|
|
} |
|
|
} |
|
|
|