后台订单列表页和详情页新增hook

This commit is contained in:
songliang 2023-02-02 15:16:38 +08:00 committed by Edward Yang
parent 7100d83d61
commit 8be5c71871
4 changed files with 10 additions and 2 deletions

View File

@ -11,8 +11,8 @@
namespace Beike\Admin\View\DesignBuilders;
use Illuminate\View\Component;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Product extends Component
{

View File

@ -179,7 +179,8 @@ class DesignService
private static function handleProducts($content): array
{
$content['products'] = ProductRepo::getProductsByIds($content['products'])->jsonSerialize();
$content['title'] = $content['title'][locale()] ?? '';
$content['title'] = $content['title'][locale()] ?? '';
return $content;
}

View File

@ -2,6 +2,10 @@
@section('title', __('admin/common.order'))
@section('page-title-right')
@hook('order.detail.title.right')
@endsection
@section('content')
<div class="card mb-4">
<div class="card-header"><h6 class="card-title">{{ __('admin/common.order') }}</h6></div>

View File

@ -89,6 +89,7 @@
<td>{{ $order->updated_at }}</td>
<td><a href="{{ admin_route('orders.show', [$order->id]) }}"
class="btn btn-outline-secondary btn-sm">{{ __('common.view') }}</a>
@hook('admin.order.list.action')
</td>
</tr>
@endforeach
@ -110,6 +111,8 @@
</div>
@endsection
@hook('admin.order.list.content.footer')
@push('footer')
<script>
new Vue({