chore(billing-ui): align renewal defaults and tighten sync error keyword links

This commit is contained in:
萝卜
2026-03-17 05:16:40 +08:00
parent 313c6cfd5e
commit 2ac9c51ce4
6 changed files with 29 additions and 21 deletions

View File

@@ -40,6 +40,12 @@
</div>
@if(($siteSubscription ?? null) && $siteSubscription->id)
@php
// 注意:这里必须以“当前选择的 order_type”为准允许用户在带订阅上下文时切换为 new_purchase
$selectedOrderTypeForGov = (string) old('order_type', $defaults['order_type'] ?? 'new_purchase');
$canRenewForGov = ((int) ($defaults['site_subscription_id'] ?? 0) > 0) && (($siteSubscription ?? null) && ($siteSubscription->id ?? 0));
@endphp
<div class="mt-10">
<div class="muted">本订单将关联订阅:</div>
<div>
@@ -47,7 +53,7 @@
<span class="muted">订阅ID{{ $siteSubscription->id }}</span>
</div>
@if((string) ($defaults['order_type'] ?? '') === 'renewal')
@if($canRenewForGov && $selectedOrderTypeForGov === 'renewal')
<div class="muted muted-xs mt-6">
提示:该订单类型为「续费」。在订单完成「标记支付并生效 同步订阅」后,将会对该订阅执行续期/延长到期时间(以系统同步结果为准)。
</div>

View File

@@ -745,7 +745,7 @@
// 避免 URL 过长/特殊字符破坏 query失败原因过长时不生成 keyword 链接
// 与列表页/仪表盘保持一致:由 config 统一控制阈值。
$SYNC_REASON_KEYWORD_MAX_LEN = (int) config('saasshop.platform_orders.sync_error_keyword_link_max_len', 200);
$SYNC_REASON_KEYWORD_MAX_LEN = (int) config('saasshop.platform_orders.sync_error_keyword_link_max_len', 100);
$syncReasonUrl = '';
if ($syncMsg !== '' && mb_strlen($syncMsg) <= $SYNC_REASON_KEYWORD_MAX_LEN) {
$syncReasonUrl = $makePlatformOrderIndexUrl([
@@ -796,7 +796,7 @@
// 避免 URL 过长/特殊字符破坏 query失败原因过长时不生成 keyword 链接
// 与列表页/仪表盘保持一致:由 config 统一控制阈值。
$BMPA_REASON_KEYWORD_MAX_LEN = (int) config('saasshop.platform_orders.sync_error_keyword_link_max_len', 200);
$BMPA_REASON_KEYWORD_MAX_LEN = (int) config('saasshop.platform_orders.sync_error_keyword_link_max_len', 100);
$bmpaReasonUrl = '';
if ($bmpaMsg !== '' && mb_strlen($bmpaMsg) <= $BMPA_REASON_KEYWORD_MAX_LEN) {
$bmpaReasonUrl = $makePlatformOrderIndexUrl([