Preserve platform order list context via back param links

This commit is contained in:
萝卜
2026-03-13 17:23:36 +00:00
parent d080c74f09
commit 8a06237005
4 changed files with 175 additions and 1 deletions

View File

@@ -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>

View File

@@ -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