wip
This commit is contained in:
parent
f06f71033e
commit
004cbf3d76
|
|
@ -34,4 +34,14 @@ class OrderController extends Controller
|
|||
|
||||
return view('account/order', $data);
|
||||
}
|
||||
|
||||
public function success(Request $request): View
|
||||
{
|
||||
$orders = OrderRepo::getListByCustomer(current_customer());
|
||||
$data = [
|
||||
'orders' => OrderList::collection($orders),
|
||||
];
|
||||
|
||||
return view('account/order_success', $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ Route::prefix('/')
|
|||
|
||||
Route::get('orders', [OrderController::class, 'index'])->name('account.order.index');
|
||||
});
|
||||
|
||||
Route::get('orders/{number}/success', [OrderController::class, 'success'])->name('account.order_success.index');
|
||||
});
|
||||
|
||||
Route::get('/{url_key}', [PagesController::class, 'show'])->name('pages.show');
|
||||
|
|
|
|||
|
|
@ -288,7 +288,8 @@
|
|||
|
||||
checkedBtnCheckoutConfirm() {
|
||||
$http.post('/checkout/confirm', this.form).then((res) => {
|
||||
{{-- location = '{{ shop_route("orders.index", [1]) }}' --}}
|
||||
|
||||
location = 'orders/' + res.number + '/success&type=create'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue