diff --git a/themes/default/account/order_info.blade.php b/themes/default/account/order_info.blade.php index 42971412..2020a2cd 100644 --- a/themes/default/account/order_info.blade.php +++ b/themes/default/account/order_info.blade.php @@ -17,7 +17,7 @@
@if ($order->status == 'unpaid') {{ __('shop/account.order.order_info.to_pay') }} - {{ __('shop/account.order.order_info.cancel') }} + @endif @if ($order->status == 'shipped') @@ -146,5 +146,12 @@ window.location.reload() }) }); + + $('.cancel-order').click(function(event) { + $http.post('orders/{{ $order->number }}/cancel').then((res) => { + layer.msg(res.message) + window.location.reload() + }) + }); @endpush