PlatformOrder create: add jump to subscriptions link when require_subscription
This commit is contained in:
@@ -135,6 +135,29 @@
|
||||
</select>
|
||||
@if(! $canRenew)
|
||||
<small class="muted">提示:续费单必须绑定订阅。请从「订阅管理」列表/详情进入“续费下单”,系统会自动带入订阅ID。</small>
|
||||
|
||||
@php
|
||||
$jumpQuery = [];
|
||||
if ((int) ($defaults['merchant_id'] ?? 0) > 0) {
|
||||
$jumpQuery['merchant_id'] = (int) ($defaults['merchant_id'] ?? 0);
|
||||
}
|
||||
if ((int) ($defaults['plan_id'] ?? 0) > 0) {
|
||||
$jumpQuery['plan_id'] = (int) ($defaults['plan_id'] ?? 0);
|
||||
}
|
||||
|
||||
$jumpBase = '/admin/site-subscriptions';
|
||||
if (count($jumpQuery) > 0) {
|
||||
$jumpBase .= '?' . \Illuminate\Support\Arr::query($jumpQuery);
|
||||
}
|
||||
|
||||
$jumpUrl = \App\Support\BackUrl::withBack($jumpBase, \App\Support\BackUrl::selfWithoutBack());
|
||||
@endphp
|
||||
|
||||
@if(($requireSubscription ?? false) && $jumpUrl)
|
||||
<div class="mt-6 actions">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $jumpUrl !!}">去订阅管理选择订阅</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user