mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: rename order/detail api
This commit is contained in:
parent
4305e3a246
commit
adc9e9e241
@ -47,7 +47,7 @@ class OrderController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function details(Request $request)
|
public function detail(Request $request)
|
||||||
{
|
{
|
||||||
$order = Order::where('user_id', $request->session()->get('id'))
|
$order = Order::where('user_id', $request->session()->get('id'))
|
||||||
->where('trade_no', $request->input('trade_no'))
|
->where('trade_no', $request->input('trade_no'))
|
||||||
@ -60,6 +60,9 @@ class OrderController extends Controller
|
|||||||
if (!$order['plan']) {
|
if (!$order['plan']) {
|
||||||
abort(500, __('Subscription plan does not exist'));
|
abort(500, __('Subscription plan does not exist'));
|
||||||
}
|
}
|
||||||
|
if ($order->surplus_order_ids) {
|
||||||
|
$order['surplus_orders'] = Order::whereIn(id, $order->surplus_order_ids)->get();
|
||||||
|
}
|
||||||
return response([
|
return response([
|
||||||
'data' => $order
|
'data' => $order
|
||||||
]);
|
]);
|
||||||
|
@ -25,7 +25,7 @@ class UserRoute
|
|||||||
$router->post('/order/save', 'User\\OrderController@save');
|
$router->post('/order/save', 'User\\OrderController@save');
|
||||||
$router->post('/order/checkout', 'User\\OrderController@checkout');
|
$router->post('/order/checkout', 'User\\OrderController@checkout');
|
||||||
$router->get ('/order/check', 'User\\OrderController@check');
|
$router->get ('/order/check', 'User\\OrderController@check');
|
||||||
$router->get ('/order/details', 'User\\OrderController@details');
|
$router->get ('/order/detail', 'User\\OrderController@detail');
|
||||||
$router->get ('/order/fetch', 'User\\OrderController@fetch');
|
$router->get ('/order/fetch', 'User\\OrderController@fetch');
|
||||||
$router->get ('/order/getPaymentMethod', 'User\\OrderController@getPaymentMethod');
|
$router->get ('/order/getPaymentMethod', 'User\\OrderController@getPaymentMethod');
|
||||||
$router->post('/order/cancel', 'User\\OrderController@cancel');
|
$router->post('/order/cancel', 'User\\OrderController@cancel');
|
||||||
|
2
public/theme/v2board/assets/umi.js
vendored
2
public/theme/v2board/assets/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user