平台订单列表:BMPA失败原因卡片长原因入口链接显式带 bmpa_failed_only=1

This commit is contained in:
萝卜
2026-03-14 15:03:05 +00:00
parent b73e686e48
commit 5aefc14750
2 changed files with 8 additions and 3 deletions

View File

@@ -532,7 +532,7 @@
<span class="muted"></span>
<span class="muted">原因过长,请复制到筛选框</span>
<span class="muted"></span>
<a class="link" href="{!! $safeFullUrlWithQuery(['bmpa_error_keyword' => null, 'page' => null]) !!}">进入失败集合</a>
<a class="link" href="{!! $safeFullUrlWithQuery(['bmpa_failed_only' => '1', 'bmpa_error_keyword' => null, 'page' => null]) !!}">进入失败集合</a>
@else
<a class="link" title="{{ $reason }}" href="{!! $safeFullUrlWithQuery(['bmpa_error_keyword' => $reason, 'page' => null]) !!}">{{ $reasonText }}</a>
<span class="muted">{{ $count }}</span>

View File

@@ -74,7 +74,12 @@ class AdminPlatformOrderBmpaFailedReasonTop5LongReasonNoLinkTest extends TestCas
// 不应渲染 bmpa_error_keyword= 的链接(避免 URL 过长/特殊字符问题)
$page->assertDontSee('bmpa_error_keyword=', false);
// 仍应给一个“进入失败集合”的入口
$page->assertSee('进入失败集合');
// 仍应给一个“进入失败集合”的入口,且应显式带 bmpa_failed_only=1进入失败集合口径更明确
$html = (string) $page->getContent();
$this->assertSame(
1,
preg_match('/<a[^>]+href="[^"]*bmpa_failed_only=1[^"]*"[^>]*>\s*进入失败集合\s*<\/a>/', $html),
'应渲染带 bmpa_failed_only=1 的「进入失败集合」链接'
);
}
}