diff --git a/resources/views/admin/site_subscriptions/show.blade.php b/resources/views/admin/site_subscriptions/show.blade.php index 59f75a4..f7ae22a 100644 --- a/resources/views/admin/site_subscriptions/show.blade.php +++ b/resources/views/admin/site_subscriptions/show.blade.php @@ -50,8 +50,9 @@
diff --git a/tests/Feature/AdminSiteSubscriptionShowIndexLinkKeepsContextTest.php b/tests/Feature/AdminSiteSubscriptionShowIndexLinkKeepsContextTest.php index 656c551..24f75e3 100644 --- a/tests/Feature/AdminSiteSubscriptionShowIndexLinkKeepsContextTest.php +++ b/tests/Feature/AdminSiteSubscriptionShowIndexLinkKeepsContextTest.php @@ -66,5 +66,13 @@ class AdminSiteSubscriptionShowIndexLinkKeepsContextTest extends TestCase $res->assertSee('返回订阅列表(保留上下文)'); $res->assertSee($expectedIndexUrl, false); + + // 当传入有效 back 时,应优先显示“返回上一页”并隐藏该兜底按钮(避免重复入口噪音) + $res2 = $this->get('/admin/site-subscriptions/' . $sub->id . '?' . Arr::query([ + 'back' => '/admin', + ])); + $res2->assertOk(); + $res2->assertSee('返回上一页(保留上下文)'); + $res2->assertDontSee('返回订阅列表(保留上下文)'); } }