From 02bf14a8f4bbc6d62bc1aa1ab6925ce673a93026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Mon, 16 Mar 2026 11:48:14 +0800 Subject: [PATCH] feat(platform-orders): surface renew create CTA in header when subscription locked --- .../admin/platform_orders/index.blade.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 62a1ac3..9710272 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -76,6 +76,27 @@ } $createOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($createQuery); + + // 订阅锁定场景:提供更贴近 SOP 的“一键续费下单”(放在页面右上角主动作区,避免用户在页面中部寻找) + $currentSubscription = $currentSubscription ?? null; + $renewCreateUrl = ''; + if ($currentSubscription && (int) ($currentSubscription->id ?? 0) > 0) { + $renewRemarkPrefix = (string) config('saasshop.platform_orders.renewal_order_remark_prefix', '来自订阅:'); + $renewCreateQuery = [ + 'order_type' => 'renewal', + 'site_subscription_id' => $currentSubscription->id, + 'merchant_id' => $currentSubscription->merchant_id, + 'plan_id' => $currentSubscription->plan_id, + 'require_subscription' => '1', + 'quantity' => 1, + 'remark' => $renewRemarkPrefix . $currentSubscription->subscription_no, + 'back' => $selfWithoutBack, + ]; + if (! (int) ($currentSubscription->plan_id ?? 0)) { + unset($renewCreateQuery['plan_id']); + } + $renewCreateUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($renewCreateQuery); + } @endphp