|
|
@ -177,6 +177,7 @@ class OrderController extends Controller |
|
|
foreach ($spec as $v) { |
|
|
foreach ($spec as $v) { |
|
|
$order_price += $v['price'] * $formData['num']; |
|
|
$order_price += $v['price'] * $formData['num']; |
|
|
} |
|
|
} |
|
|
|
|
|
$order_price = round($order_price, 2); |
|
|
|
|
|
|
|
|
//0:旅游线路、1:酒店、2:景区、3:餐厅、4:车队、5:单项 => admin_trans('product.options.publish_type')
|
|
|
//0:旅游线路、1:酒店、2:景区、3:餐厅、4:车队、5:单项 => admin_trans('product.options.publish_type')
|
|
|
switch ($ap->product->type) { |
|
|
switch ($ap->product->type) { |
|
|
@ -285,11 +286,11 @@ class OrderController extends Controller |
|
|
//处理预付金额
|
|
|
//处理预付金额
|
|
|
if ($formData['pay_type'] == PayType::DEPOSIT_PAY) { |
|
|
if ($formData['pay_type'] == PayType::DEPOSIT_PAY) { |
|
|
//订金支付
|
|
|
//订金支付
|
|
|
$prepayPrice = count($spec) * $ap->deposit * $formData['num']; |
|
|
|
|
|
|
|
|
$prepayPrice = round(count($spec) * $ap->deposit * $formData['num'], 2); |
|
|
$prepayTimeout = $ap->deposit_timeout; |
|
|
$prepayTimeout = $ap->deposit_timeout; |
|
|
} else if($formData['pay_type'] == PayType::EARNEST_PAY) { |
|
|
} else if($formData['pay_type'] == PayType::EARNEST_PAY) { |
|
|
//定金支付
|
|
|
//定金支付
|
|
|
$prepayPrice = count($spec) * $ap->earnest * $formData['num']; |
|
|
|
|
|
|
|
|
$prepayPrice = round(count($spec) * $ap->earnest * $formData['num'], 2); |
|
|
$prepayTimeout = $ap->earnest_timeout; |
|
|
$prepayTimeout = $ap->earnest_timeout; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -449,6 +450,7 @@ class OrderController extends Controller |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$ap->final_price = round($ap->final_price, 2); |
|
|
$ap->num = $formData['num']; |
|
|
$ap->num = $formData['num']; |
|
|
|
|
|
|
|
|
return $this->success($ap); |
|
|
return $this->success($ap); |
|
|
|