feat(user-center): redesign sidebar and wallet tips
This commit is contained in:
1 parent
82e71d1bf9
commit
a7f3caec59
24 files changed
+895
-528
No files matched your search
@@ -25,27 +25,20 @@ $section = sanitize_key((string) ($_GET['section'] ?? ''));
|
||||
if ($tab === '' && isset($_GET['tab']) && sanitize_key((string) $_GET['tab']) !== 'orders') {
|
||||
// When rendered as standalone legacy include, outer tab may be status.
|
||||
$maybe = sanitize_key((string) $_GET['tab']);
|
||||
if (in_array($maybe, ['pending', 'shipped', 'received', 'review', 'after', 'wait-pay', 'wait-shipped', 'wait-receive', 'wait-evaluate', 'after-sale', 'all'], true)) {
|
||||
if (in_array($maybe, ['pending', 'to-ship', 'shipped', 'received', 'review', 'after'], true)) {
|
||||
$tab = $maybe;
|
||||
}
|
||||
}
|
||||
|
||||
$tab_aliases = [
|
||||
'wait-pay' => 'pending',
|
||||
'wait-shipped' => 'shipped',
|
||||
'wait-receive' => 'shipped',
|
||||
'wait-evaluate' => 'review',
|
||||
'after-sale' => 'after',
|
||||
'all' => '',
|
||||
];
|
||||
$tab_aliases = [];
|
||||
if (isset($tab_aliases[$tab])) {
|
||||
$tab = $tab_aliases[$tab];
|
||||
}
|
||||
|
||||
$tab_status_map = [
|
||||
'pending' => \AKSRT\Payment\Order::STATUS_PENDING,
|
||||
'to-ship' => \AKSRT\Payment\Order::STATUS_PAID,
|
||||
'shipped' => \AKSRT\Payment\Order::STATUS_DELIVERED,
|
||||
'received' => \AKSRT\Payment\Order::STATUS_COMPLETED,
|
||||
'review' => \AKSRT\Payment\Order::STATUS_PENDING_REVIEW,
|
||||
'after' => \AKSRT\Payment\Order::STATUS_REFUNDING,
|
||||
];
|
||||
@@ -70,6 +63,7 @@ $shop = class_exists('\AKSRT\Shop\Shop') ? \AKSRT\Shop\Shop::get_instance() : nu
|
||||
$tabs = [
|
||||
'' => __('全部', 'aksrt'),
|
||||
'pending' => __('待支付', 'aksrt'),
|
||||
'to-ship' => __('待发货', 'aksrt'),
|
||||
'shipped' => __('待收货', 'aksrt'),
|
||||
'review' => __('待评价', 'aksrt'),
|
||||
'after' => __('售后', 'aksrt'),
|
||||
|
||||
Reference in new issue
Block a user