fix: improve promotion tabs and referral layout

This commit is contained in:
2026-08-16 21:33:45 +08:00
parent 853114a9f9
commit 7a2319a9a9
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ if (!function_exists('aksrt_get_user_center_render_context')) {
'orders_url' => isset($tabs['tabs']['orders']) ? aksrt_get_user_center_tab_url('orders') : '', 'orders_url' => isset($tabs['tabs']['orders']) ? aksrt_get_user_center_tab_url('orders') : '',
'show_vip' => !empty($vip_settings['enabled']), 'show_vip' => !empty($vip_settings['enabled']),
'show_credit_tabs' => $show_credit_tabs, 'show_credit_tabs' => $show_credit_tabs,
'affiliate_enabled' => $show_credit_tabs && !empty($affiliate_settings['enabled']), 'affiliate_enabled' => !empty($affiliate_settings['enabled']),
'currency_name' => $currency_name, 'currency_name' => $currency_name,
'credit_balance' => (float) ($dashboard['credit_balance'] ?? 0.0), 'credit_balance' => (float) ($dashboard['credit_balance'] ?? 0.0),
'credits_enabled' => $show_credit_tabs, 'credits_enabled' => $show_credit_tabs,
@@ -13,6 +13,8 @@ $level_url = isset($dashboard_tabs['level'])
$auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : ''; $auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : '';
$orders_available = isset($dashboard_tabs['orders']); $orders_available = isset($dashboard_tabs['orders']);
$orders_url = $orders_available ? (string) ($orders_url ?? '') : ''; $orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
$revenue_available = isset($dashboard_tabs['revenue']);
$revenue_url = $revenue_available ? aksrt_get_user_center_tab_url('revenue') : '';
$services = array_values(array_filter([ $services = array_values(array_filter([
[ [
@@ -36,6 +38,13 @@ $services = array_values(array_filter([
'url' => $orders_url, 'url' => $orders_url,
'tab' => 'orders', 'tab' => 'orders',
], ],
[
'label' => __('推广收益', 'aksrt'),
'icon' => 'chart-line',
'tone' => 'revenue',
'url' => $revenue_url,
'tab' => 'revenue',
],
], static fn(array $item): bool => (string) $item['url'] !== '')); ], static fn(array $item): bool => (string) $item['url'] !== ''));
$settings = array_values(array_filter([ $settings = array_values(array_filter([