fix(user-center): 1:1 port reference sidebar statistics row and icon box line-height

- Rewrite sidebar stats as a single zib-widget row (user-statistics-item, em14 / em09 opacity5 mt6), drop legacy .uc-stats styles
- Restore reference body line-height (1.42857143) on stats and service/settings boxes
- Move 我的订单 to the front of 我的服务 to match reference order

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-28 22:48:54 +08:00
1 parent 6ded62df92
commit c152e00501
5 files changed
+53 -124

No files matched your search

@@ -19,26 +19,26 @@ $orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
$tickets_available = isset($dashboard_tabs['tickets']);
$tickets_url = $tickets_available ? aksrt_get_user_center_tab_url('tickets') : '';
// 参考主题由 zibpay 把「我的订单」前插到按钮组最前,其后才是等级 / 认证。
$services = array_values(array_filter([
[
'label' => __('我的订单', 'aksrt'),
'icon' => 'order-color',
'url' => $orders_url,
'tab' => 'orders',
],
[
'label' => __('我的等级', 'aksrt'),
'icon' => 'trend-color',
'url' => $level_url,
'tab' => 'level',
],
[
'label' => __('官方认证', 'aksrt'),
'icon' => 'user-auth',
'url' => $auth_url,
'tab' => 'auth',
],
[
'label' => __('我的订单', 'aksrt'),
'icon' => 'order-color',
'url' => $orders_url,
'tab' => 'orders',
],
[
'label' => __('工单中心', 'aksrt'),
'icon' => 'manual-service',
@@ -34,13 +34,9 @@ $stats = [
],
];
?>
<div class="uc-sidebar__section uc-sidebar__section--stats" aria-label="<?php esc_attr_e('账号统计', 'aksrt'); ?>">
<div class="uc-stats">
<?php foreach ($stats as $stat) : ?>
<a class="uc-stats__item" href="<?php echo esc_url((string) $stat['url']); ?>"<?php if (!empty($stat['tab'])) : ?> data-tab="<?php echo esc_attr((string) $stat['tab']); ?>"<?php endif; ?>>
<span class="uc-stats__value"><?php echo esc_html(number_format_i18n((int) $stat['value'])); ?></span>
<span class="uc-stats__label"><?php echo esc_html((string) $stat['label']); ?></span>
</a>
<?php endforeach; ?>
</div>
<?php // 1:1 参考主题 zib_user_center_page_sidebar_statistics():单张 zib-widget,四项 space-around 平铺。 ?>
<div class="uc-sidebar-statistics mb10-sm mb20 flex ac jsa zib-widget padding-10 text-center" aria-label="<?php esc_attr_e('账号统计', 'aksrt'); ?>">
<?php foreach ($stats as $stat) : ?>
<a class="user-statistics-item" href="<?php echo esc_url((string) $stat['url']); ?>"<?php if (!empty($stat['tab'])) : ?> data-tab="<?php echo esc_attr((string) $stat['tab']); ?>"<?php endif; ?>><div class="em14"><?php echo esc_html(aksrt_cut_count((int) $stat['value'])); ?></div><div class="em09 opacity5 mt6"><?php echo esc_html((string) $stat['label']); ?></div></a>
<?php endforeach; ?>
</div>