1
0
Files
lkafu/resources/views/orders/index.blade.php
2020-08-06 14:45:56 +08:00

56 lines
1.9 KiB
PHP

@extends('layouts.app')
@section('content')
<section>
<!-- 我的订单 -->
<nav class="nav orderNav" data-display="" data-selector="span" data-show-single="true" data-active-class="active" data-animate="false">
<span data-href="{{ route('orders.index') }}" @if(url()->current() == route('orders.index'))class="active" @endif>全部</span>
<span data-href="{{ route('orders.unpay') }}" @if(url()->current() == route('orders.unpay'))class="active" @endif>待付款</span>
<span data-href="{{ route('orders.paid') }}" @if(url()->current() == route('orders.paid'))class="active" @endif>待发货</span>
<span data-href="{{ route('orders.delivered') }}" @if(url()->current() == route('orders.delivered'))class="active" @endif>待收货</span>
</nav>
@if ($orders->isNotEmpty())
<div class="orderText">
@include('orders.item', ['orders' => $orders])
</div>
@else
<div class="noData">
<input type="image" src="/assets/index/img/no_data.png" />
<span style="padding-bottom: 30px">您还没有订单,现在就去下单吧!</span>
</div>
@endif
</section>
@endsection
@section('script')
<script type="text/javascript">
function orderDelete (url) {
layer.open({
content: '确定要取消订单吗?'
,btn: ['确认', '不取消']
,skin: 'footer'
,yes: function(index){
$.post(url + '?_token={{ csrf_token() }}', function(data){
if (data.status == 'SUCCESS') {
updateAlert(data.message, 'success');
setTimeout(function(){
location.reload();
},500);
}else{
updateAlert(data.message, 'error');
}
});
}
});
}
</script>
@endsection