Preserve platform order list context via back param links
This commit is contained in:
@@ -738,7 +738,7 @@
|
||||
@forelse($orders as $order)
|
||||
<tr>
|
||||
<td>{{ $order->id }}</td>
|
||||
<td><a href="/admin/platform-orders/{{ $order->id }}">{{ $order->order_no }}</a></td>
|
||||
<td><a href="/admin/platform-orders/{{ $order->id }}?back={{ urlencode(request()->getRequestUri()) }}">{{ $order->order_no }}</a></td>
|
||||
<td>
|
||||
@if($order->merchant)
|
||||
<a href="{!! request()->fullUrlWithQuery(['merchant_id' => $order->merchant->id, 'page' => null]) !!}" class="link">{{ $order->merchant->name }}</a>
|
||||
|
||||
@@ -544,6 +544,16 @@
|
||||
</div>
|
||||
|
||||
<div class="mb-20" style="margin-top:16px;">
|
||||
@php
|
||||
$back = (string) request()->query('back', '');
|
||||
$safeBack = str_starts_with($back, '/') ? $back : '';
|
||||
@endphp
|
||||
|
||||
@if($safeBack)
|
||||
<a href="{{ $safeBack }}" class="muted">← 返回上一页(保留上下文)</a>
|
||||
<span class="muted">|</span>
|
||||
@endif
|
||||
|
||||
<a href="/admin/platform-orders">← 返回平台订单列表</a>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user