refactor: BackUrl::selfWithoutBack 统一 selfWithoutBack 构造并修复 currentQuery 依赖

This commit is contained in:
萝卜
2026-03-14 18:52:28 +00:00
parent b759a87a57
commit 956e177544
6 changed files with 24 additions and 26 deletions

View File

@@ -17,12 +17,7 @@
: '';
// back 参数用于“返回上一页(保留上下文)”,但 back 本身不应再包含 back避免无限嵌套导致 URL 膨胀)
$currentQuery = request()->query();
unset($currentQuery['back']);
$selfWithoutBack = '/' . ltrim(request()->path(), '/');
if (count($currentQuery) > 0) {
$selfWithoutBack .= '?' . \Illuminate\Support\Arr::query($currentQuery);
}
$selfWithoutBack = \App\Support\BackUrl::selfWithoutBack();
// 从线索直达“创建平台订单”入口:预填 plan_id/remark并带 back 回到当前线索列表(保留筛选)
// 备注:如果线索 meta 中包含 merchant_id也会一并预填用于“已存在站点但需补单/续费”的场景)