Compare commits
2
Commits
0d617d88c9
...
b375fcc55c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b375fcc55c | ||
|
|
32e76b440f |
No files matched your search
@@ -6314,20 +6314,6 @@ body.aksrt-body-scroll .aksrt-show-on-scroll {
|
||||
border-color: var(--color-primary, var(--color-primary));
|
||||
}
|
||||
|
||||
.uc-signin-calendar__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0 0 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--color-ink-2);
|
||||
}
|
||||
|
||||
.uc-signin-calendar__title i {
|
||||
color: var(--color-primary, var(--color-primary));
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 19. VIP 等级标识
|
||||
* ============================================================ */
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
:root{--color-primary: #f04494;--color-primary-hover: #e0307e;--color-primary-active: #c9206d;--color-primary-soft: rgba(240, 68, 148, .1);--color-primary-softer: rgba(240, 68, 148, .05);--color-on-primary: #FFFFFF;--color-ink: #333333;--color-ink-2: #4e5358;--color-ink-3: #777777;--color-ink-4: #999999;--surface-page: #f5f6f7;--surface-1: #FFFFFF;--surface-2: #eeeeee;--surface-3: #e9ecef;--surface-4: #f8f8f8;--color-line: rgba(50, 50, 50, .06);--color-line-soft: rgba(0, 0, 0, .03);--color-line-stronger: rgba(50, 50, 50, .12);--color-success: #10B981;--color-warning: #F59E0B;--color-error: #EF4444;--color-info: #3B82F6;--color-accent: #18a058;--color-accent-soft: rgba(24, 160, 88, .12);--color-accent-shadow: rgba(24, 160, 88, .28);--font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--text-xs: .75rem;--text-sm: .875rem;--text-base: 1rem;--text-md: 1.125rem;--text-lg: 1.25rem;--text-xl: 1.5rem;--text-2xl: 1.875rem;--text-3xl: 2.25rem;--text-4xl: 3rem;--text-5xl: 3.75rem;--leading-tight: 1.2;--leading-snug: 1.4;--leading-normal: 1.6;--leading-relaxed: 1.6;--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-7: 32px;--space-8: 40px;--space-9: 48px;--space-10: 64px;--space-11: 80px;--space-12: 96px;--radius-xs: 3px;--radius-sm: 4px;--radius: 8px;--radius-lg: 8px;--radius-xl: 12px;--radius-2xl: 16px;--radius-pill: 100px;--radius-avatar: 50%;--shadow-xs: 0 1px 2px rgba(0, 0, 0, .03);--shadow-sm: 0 0 10px rgba(116, 116, 116, .08);--shadow: 0 0 10px rgba(116, 116, 116, .12);--shadow-lg: 0 12px 32px rgba(18, 18, 18, .1);--shadow-drawer: 0 18px 60px rgba(0, 0, 0, .2);--nav-height: 60px;--container: 1200px;--container-wide: 1440px;--container-read: 760px;--container-page: 880px;--sidebar-width: 311px;--content-gap: 24px;--section-gap: 24px;--sidebar-bp: 992px;--ease: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-spring: cubic-bezier(.34, 1.56, .64, 1);--dur-fast: .15s;--dur: .25s;--dur-slow: .4s;--focus-ring: 0 0 2px 3px rgba(253, 83, 161, .4);--z-dropdown: 100;--z-sticky: 200;--z-fixed: 300;--z-overlay: 400;--z-modal: 500;--z-popover: 600;--z-toast: 700;--z-tooltip: 800;--radius-btn: 4px;--btn-sm-h: 28px;--btn-md-h: 34px;--btn-lg-h: 44px;--card-padding: 15px;--card-padding-sm: 10px;--card-gap: 16px;--card-gap-lg: 20px;--skeleton-base: var(--surface-2);--skeleton-shine: var(--surface-1);--color-primary-light: var(--color-primary-soft);--color-surface: var(--surface-1);--color-line-strong: var(--color-line);--color-bg-hover: var(--surface-2);--color-border-light: var(--color-line-soft);--color-fill: var(--surface-2);--color-warning-bg: #fffbe6;--color-warning-text: #ad6800;--text-secondary: var(--color-ink-3);--text-tertiary: var(--color-ink-4);--surface-active: var(--surface-2);--surface-card: var(--surface-1);--surface-hover: var(--surface-2);--surface-secondary: var(--surface-2);--radius-code: var(--radius);--radius-full: 100px;--shadow-xl: 0 0 10px rgba(116, 116, 116, .12);--space-16: 64px;--z-floating: 900;--transition-fast: .15s ease;--transition-base: .25s ease;--header-bg: var(--blur-bg);--header-color: var(--color-ink-2);--footer-bg: var(--surface-1);--footer-color: var(--color-ink-4);--blur-bg: rgba(255, 255, 255, .8);--float-btn-bg: rgba(200, 200, 200, .4);--content-max: var(--container);--font-heading: var(--font-ui);--radius-card: var(--radius);--radius-md: var(--radius);--color-primary-50: var(--color-primary-soft);--color-primary-dark: var(--color-primary-active);--shadow-md: var(--shadow);--mini-radius: calc(var(--radius) / 1.4);--aksrt-avatar-size-xs: 24px;--aksrt-avatar-size-sm: 32px;--aksrt-avatar-size: 40px;--aksrt-avatar-size-lg: 56px;--aksrt-avatar-size-xl: 80px;--aksrt-card-thumb-scale: 56.25%;--aksrt-rose: #f43f5e;--aksrt-rose-soft: rgba(244, 63, 94, .12);--aksrt-blue: #3b82f6;--aksrt-blue-soft: rgba(59, 130, 246, .12);--aksrt-green: #10b981;--aksrt-green-soft: rgba(16, 185, 129, .12);--aksrt-orange: #f97316;--aksrt-orange-soft:rgba(249, 115, 22, .12);--aksrt-purple: #8b5cf6;--aksrt-purple-soft:rgba(139, 92, 246, .12);--aksrt-cyan: #06b6d4;--aksrt-cyan-soft: rgba(6, 182, 212, .12);--aksrt-yellow: #eab308;--aksrt-yellow-soft:rgba(234, 179, 8, .12);--aksrt-red: #ef4444;--aksrt-red-soft: rgba(239, 68, 68, .12);--aksrt-teal: #14b8a6;--aksrt-teal-soft: rgba(20, 184, 166, .12);--aksrt-indigo: #6366f1;--aksrt-indigo-soft:rgba(99, 102, 241, .12);--aksrt-pink: #ec4899;--aksrt-pink-soft: rgba(236, 72, 153, .12);--aksrt-vip-gold-1: #f6d365;--aLine truncated
|
||||
:root{--color-primary: #f04494;--color-primary-hover: #e0307e;--color-primary-active: #c9206d;--color-primary-soft: rgba(240, 68, 148, .1);--color-primary-softer: rgba(240, 68, 148, .05);--color-on-primary: #FFFFFF;--color-ink: #333333;--color-ink-2: #4e5358;--color-ink-3: #777777;--color-ink-4: #999999;--surface-page: #f5f6f7;--surface-1: #FFFFFF;--surface-2: #eeeeee;--surface-3: #e9ecef;--surface-4: #f8f8f8;--color-line: rgba(50, 50, 50, .06);--color-line-soft: rgba(0, 0, 0, .03);--color-line-stronger: rgba(50, 50, 50, .12);--color-success: #10B981;--color-warning: #F59E0B;--color-error: #EF4444;--color-info: #3B82F6;--color-accent: #18a058;--color-accent-soft: rgba(24, 160, 88, .12);--color-accent-shadow: rgba(24, 160, 88, .28);--font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;--text-xs: .75rem;--text-sm: .875rem;--text-base: 1rem;--text-md: 1.125rem;--text-lg: 1.25rem;--text-xl: 1.5rem;--text-2xl: 1.875rem;--text-3xl: 2.25rem;--text-4xl: 3rem;--text-5xl: 3.75rem;--leading-tight: 1.2;--leading-snug: 1.4;--leading-normal: 1.6;--leading-relaxed: 1.6;--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-7: 32px;--space-8: 40px;--space-9: 48px;--space-10: 64px;--space-11: 80px;--space-12: 96px;--radius-xs: 3px;--radius-sm: 4px;--radius: 8px;--radius-lg: 8px;--radius-xl: 12px;--radius-2xl: 16px;--radius-pill: 100px;--radius-avatar: 50%;--shadow-xs: 0 1px 2px rgba(0, 0, 0, .03);--shadow-sm: 0 0 10px rgba(116, 116, 116, .08);--shadow: 0 0 10px rgba(116, 116, 116, .12);--shadow-lg: 0 12px 32px rgba(18, 18, 18, .1);--shadow-drawer: 0 18px 60px rgba(0, 0, 0, .2);--nav-height: 60px;--container: 1200px;--container-wide: 1440px;--container-read: 760px;--container-page: 880px;--sidebar-width: 311px;--content-gap: 24px;--section-gap: 24px;--sidebar-bp: 992px;--ease: cubic-bezier(.4, 0, .2, 1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-spring: cubic-bezier(.34, 1.56, .64, 1);--dur-fast: .15s;--dur: .25s;--dur-slow: .4s;--focus-ring: 0 0 2px 3px rgba(253, 83, 161, .4);--z-dropdown: 100;--z-sticky: 200;--z-fixed: 300;--z-overlay: 400;--z-modal: 500;--z-popover: 600;--z-toast: 700;--z-tooltip: 800;--radius-btn: 4px;--btn-sm-h: 28px;--btn-md-h: 34px;--btn-lg-h: 44px;--card-padding: 15px;--card-padding-sm: 10px;--card-gap: 16px;--card-gap-lg: 20px;--skeleton-base: var(--surface-2);--skeleton-shine: var(--surface-1);--color-primary-light: var(--color-primary-soft);--color-surface: var(--surface-1);--color-line-strong: var(--color-line);--color-bg-hover: var(--surface-2);--color-border-light: var(--color-line-soft);--color-fill: var(--surface-2);--color-warning-bg: #fffbe6;--color-warning-text: #ad6800;--text-secondary: var(--color-ink-3);--text-tertiary: var(--color-ink-4);--surface-active: var(--surface-2);--surface-card: var(--surface-1);--surface-hover: var(--surface-2);--surface-secondary: var(--surface-2);--radius-code: var(--radius);--radius-full: 100px;--shadow-xl: 0 0 10px rgba(116, 116, 116, .12);--space-16: 64px;--z-floating: 900;--transition-fast: .15s ease;--transition-base: .25s ease;--header-bg: var(--blur-bg);--header-color: var(--color-ink-2);--footer-bg: var(--surface-1);--footer-color: var(--color-ink-4);--blur-bg: rgba(255, 255, 255, .8);--float-btn-bg: rgba(200, 200, 200, .4);--content-max: var(--container);--font-heading: var(--font-ui);--radius-card: var(--radius);--radius-md: var(--radius);--color-primary-50: var(--color-primary-soft);--color-primary-dark: var(--color-primary-active);--shadow-md: var(--shadow);--mini-radius: calc(var(--radius) / 1.4);--aksrt-avatar-size-xs: 24px;--aksrt-avatar-size-sm: 32px;--aksrt-avatar-size: 40px;--aksrt-avatar-size-lg: 56px;--aksrt-avatar-size-xl: 80px;--aksrt-card-thumb-scale: 56.25%;--aksrt-rose: #f43f5e;--aksrt-rose-soft: rgba(244, 63, 94, .12);--aksrt-blue: #3b82f6;--aksrt-blue-soft: rgba(59, 130, 246, .12);--aksrt-green: #10b981;--aksrt-green-soft: rgba(16, 185, 129, .12);--aksrt-orange: #f97316;--aksrt-orange-soft:rgba(249, 115, 22, .12);--aksrt-purple: #8b5cf6;--aksrt-purple-soft:rgba(139, 92, 246, .12);--aksrt-cyan: #06b6d4;--aksrt-cyan-soft: rgba(6, 182, 212, .12);--aksrt-yellow: #eab308;--aksrt-yellow-soft:rgba(234, 179, 8, .12);--aksrt-red: #ef4444;--aksrt-red-soft: rgba(239, 68, 68, .12);--aksrt-teal: #14b8a6;--aksrt-teal-soft: rgba(20, 184, 166, .12);--aksrt-indigo: #6366f1;--aksrt-indigo-soft:rgba(99, 102, 241, .12);--aksrt-pink: #ec4899;--aksrt-pink-soft: rgba(236, 72, 153, .12);--aksrt-vip-gold-1: #f6d365;--aLine truncated
|
||||
@@ -390,20 +390,6 @@
|
||||
border-color: var(--color-primary, var(--color-primary));
|
||||
}
|
||||
|
||||
.uc-signin-calendar__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0 0 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--color-ink-2);
|
||||
}
|
||||
|
||||
.uc-signin-calendar__title i {
|
||||
color: var(--color-primary, var(--color-primary));
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 19. VIP 等级标识
|
||||
* ============================================================ */
|
||||
|
||||
@@ -526,12 +526,6 @@ body.uc-modal-open {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.uc-transactions__remark {
|
||||
font-size: 12px;
|
||||
color: var(--color-ink-4);
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.uc-transactions__time {
|
||||
font-size: 12px;
|
||||
color: var(--color-ink-4);
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* User center credits: sign-in captcha + recent calendar.
|
||||
*
|
||||
* Expects extracted $context vars.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$credits_enabled = !empty($credits_enabled);
|
||||
if (!$credits_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
$signin_dates = [];
|
||||
if (class_exists('\AKSRT\Credits\Signin')) {
|
||||
$signin_log = \AKSRT\Credits\Signin::get_instance()->get_recent_signins($user_id, 30);
|
||||
$signin_dates = array_filter(array_map(static function ($entry) {
|
||||
return $entry['signin_date'] ?? '';
|
||||
}, $signin_log));
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="uc-signin-calendar" style="margin-bottom:16px;">
|
||||
<h4 class="uc-signin-calendar__title">
|
||||
<i class="fa fas fa-calendar" aria-hidden="true"></i>
|
||||
<?php esc_html_e('最近 30 天签到', 'aksrt'); ?>
|
||||
</h4>
|
||||
<div data-aksrt-signin-calendar='<?php echo esc_attr(wp_json_encode(array_values($signin_dates))); ?>'></div>
|
||||
</div>
|
||||
@@ -28,9 +28,6 @@ defined('ABSPATH') || exit;
|
||||
<?php foreach ($log['items'] as $row) :
|
||||
$delta = (int) $row['delta_minor'];
|
||||
$delta_class = $delta >= 0 ? 'is-positive' : 'is-negative';
|
||||
$record_note = (string) $row['reason'] === 'points_exchange'
|
||||
? (string) $row['ref_key']
|
||||
: (string) $row['remark'];
|
||||
?>
|
||||
<div class="uc-transactions__item">
|
||||
<div class="uc-transactions__icon <?php echo esc_attr($delta_class); ?>">
|
||||
@@ -39,9 +36,6 @@ defined('ABSPATH') || exit;
|
||||
<div class="uc-transactions__info">
|
||||
<div class="uc-transactions__reason">
|
||||
<?php echo esc_html(aksrt_asset_reason_label((string) $row['reason'])); ?>
|
||||
<?php if ($record_note !== '') : ?>
|
||||
<span class="uc-transactions__remark">(<?php echo esc_html($record_note); ?>)</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="uc-transactions__time">
|
||||
<?php echo esc_html(get_date_from_gmt((string) $row['created_at'], 'Y-m-d H:i')); ?>
|
||||
|
||||
@@ -33,12 +33,6 @@ $wlog = \AKSRT\Ledger\LedgerQuery::get_instance()->history([
|
||||
$delta = (int) $row['delta_minor'];
|
||||
$delta_class = $delta >= 0 ? 'is-positive' : 'is-negative';
|
||||
$delta_txt = ($delta > 0 ? '+' : '-') . \AKSRT\Ledger\AssetAmount::from_minor(\AKSRT\Ledger\AssetType::BALANCE, abs($delta))->formatted();
|
||||
$record_note = (string) $row['reason'] === 'points_exchange'
|
||||
? (string) $row['ref_key']
|
||||
: (string) ($row['remark'] ?? '');
|
||||
if (in_array((string) $row['reason'], ['withdraw_hold', 'withdraw_refund'], true)) {
|
||||
$record_note = (string) ($row['withdrawal_number'] ?? '');
|
||||
}
|
||||
?>
|
||||
<div class="uc-transactions__item">
|
||||
<div class="uc-transactions__icon <?php echo esc_attr($delta_class); ?>">
|
||||
@@ -47,9 +41,6 @@ $wlog = \AKSRT\Ledger\LedgerQuery::get_instance()->history([
|
||||
<div class="uc-transactions__info">
|
||||
<div class="uc-transactions__reason">
|
||||
<?php echo esc_html(aksrt_asset_reason_label((string) $row['reason'])); ?>
|
||||
<?php if ($record_note !== '') : ?>
|
||||
<span class="uc-transactions__remark">(<?php echo esc_html($record_note); ?>)</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="uc-transactions__time"><?php echo esc_html(get_date_from_gmt((string) $row['created_at'], 'Y-m-d H:i')); ?></div>
|
||||
</div>
|
||||
|
||||
@@ -243,7 +243,3 @@ endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (empty($skip_wallet_ledger)) : ?>
|
||||
<?php require __DIR__ . '/credits-wallet-ledger.php'; ?>
|
||||
<?php endif; ?>
|
||||
@@ -22,11 +22,7 @@ if ($show_wallet || $show_credits) :
|
||||
<div class="uc-assets-row<?php echo ($show_wallet && $show_credits) ? ' uc-assets-row--dual' : ''; ?>">
|
||||
<?php if ($show_wallet) : ?>
|
||||
<div class="uc-assets-col">
|
||||
<?php
|
||||
// Ledger moved to tab section below.
|
||||
$skip_wallet_ledger = true;
|
||||
require $dir . '/credits-wallet.php';
|
||||
?>
|
||||
<?php require $dir . '/credits-wallet.php'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($show_credits) : ?>
|
||||
|
||||
@@ -42,7 +42,6 @@ final class LedgerQuery {
|
||||
|
||||
$entry_table = \AKSRT\Core\DBMigrator::table('asset_entry');
|
||||
$transaction_table = \AKSRT\Core\DBMigrator::table('asset_transaction');
|
||||
$flow_table = \AKSRT\Core\DBMigrator::table('financial_flow');
|
||||
$where = ['1=1'];
|
||||
$params = [];
|
||||
if ($user_id > 0) {
|
||||
@@ -108,10 +107,9 @@ final class LedgerQuery {
|
||||
$entry_params[] = $asset;
|
||||
}
|
||||
$rows = $wpdb->get_results($wpdb->prepare(
|
||||
"SELECT e.*, t.operation_key, t.reason, t.ref_type, t.ref_key, t.actor_user_id, t.metadata, t.created_at transaction_created_at, f.withdrawal_number
|
||||
"SELECT e.*, t.operation_key, t.reason, t.ref_type, t.ref_key, t.actor_user_id, t.metadata, t.created_at transaction_created_at
|
||||
FROM {$entry_table} e
|
||||
INNER JOIN {$transaction_table} t ON t.id = e.transaction_id
|
||||
LEFT JOIN {$flow_table} f ON f.ledger_transaction_id = t.id
|
||||
WHERE " . implode(' AND ', $entry_where) . ' ORDER BY e.transaction_id DESC, e.line_no ASC',
|
||||
$entry_params
|
||||
), ARRAY_A);
|
||||
@@ -126,7 +124,6 @@ final class LedgerQuery {
|
||||
'reason' => (string) $row['reason'],
|
||||
'ref_type' => (string) ($row['ref_type'] ?? ''),
|
||||
'ref_key' => (string) ($row['ref_key'] ?? ''),
|
||||
'withdrawal_number' => (string) ($row['withdrawal_number'] ?? ''),
|
||||
'actor_user_id' => (int) ($row['actor_user_id'] ?? 0),
|
||||
'metadata' => json_decode((string) ($row['metadata'] ?? ''), true) ?: [],
|
||||
'created_at' => (string) $row['transaction_created_at'],
|
||||
|
||||
@@ -78,10 +78,12 @@ test('user asset submissions send idempotency keys', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test('profile asset records show order references and only the changed amount', () => {
|
||||
test('profile asset records show only the reason label and the changed amount', () => {
|
||||
for (const file of ['credits-transactions.php', 'credits-wallet-ledger.php']) {
|
||||
const source = fs.readFileSync(path.join(root, 'inc', 'helpers', 'user-center-renderers', file), 'utf8')
|
||||
assert.match(source, /\$record_note\s*=\s*\(string\) \$row\['reason'\] === 'points_exchange'[\s\S]*?\(string\) \$row\['ref_key'\]/)
|
||||
assert.match(source, /aksrt_asset_reason_label\(\(string\) \$row\['reason'\]\)/)
|
||||
// 记录名称后不再拼接(引用键 / 备注 / 提现单号)。
|
||||
assert.doesNotMatch(source, /\$record_note|uc-transactions__remark|\$row\['ref_key'\]|\$row\['remark'\]|withdrawal_number/)
|
||||
assert.doesNotMatch(source, /uc-transactions__balance|交易 #%d|\$row\['fee_minor'\]|\$row\['ref_id'\]/)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -63,19 +63,18 @@ test('native and front-end surfaces expose immutable business numbers', () => {
|
||||
assert.match(read('assets/js/order-center.js'), /\["流水号", order\.order_number\]/)
|
||||
assert.doesNotMatch(read('assets/js/order-center.js'), /flow_number|账本流水号/)
|
||||
assert.doesNotMatch(read('src/Payment/UserOrders.php'), /\$view\['flow_number'\]/)
|
||||
assert.match(read('inc/helpers/user-center-renderers/credits-wallet-ledger.php'), /withdrawal_number/)
|
||||
})
|
||||
|
||||
test('balance history renders withdrawal numbers from the committed flow', () => {
|
||||
test('ledger history carries no financial flow coupling', () => {
|
||||
const query = read('src/Ledger/LedgerQuery.php')
|
||||
const profile = read('inc/helpers/user-center-renderers/credits-wallet-ledger.php')
|
||||
const wallet = read('inc/helpers/user-center-renderers/credits-wallet.php') + read('inc/helpers/user-center-renderers/credits-wallet-ledger.php')
|
||||
assert.match(query, /LEFT JOIN \{\$flow_table\} f ON f\.ledger_transaction_id = t\.id/)
|
||||
assert.match(query, /'withdrawal_number'\s*=>\s*\(string\)/)
|
||||
for (const source of [profile, wallet]) {
|
||||
assert.match(source, /\['withdraw_hold', 'withdraw_refund'\]/)
|
||||
assert.match(source, /\$row\['withdrawal_number'\]/)
|
||||
}
|
||||
const records = [
|
||||
read('inc/helpers/user-center-renderers/credits-transactions.php'),
|
||||
read('inc/helpers/user-center-renderers/credits-wallet-ledger.php'),
|
||||
].join('\n')
|
||||
// 前台余额/积分记录只展示中文变动原因与变动额:提现单号既不查询也不下发,
|
||||
// 账本历史不再为了它 LEFT JOIN financial_flow。
|
||||
assert.doesNotMatch(query, /financial_flow|withdrawal_number/)
|
||||
assert.doesNotMatch(records, /\$row\['ref_key'\]|\$row\['remark'\]|withdrawal_number|uc-transactions__remark/)
|
||||
})
|
||||
|
||||
test('user withdrawal history uses one paginated ten-item endpoint', () => {
|
||||
|
||||
@@ -460,6 +460,11 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
|
||||
assert.match(userCenterCreditsCss, /#panel-credits\.dashboard-panel\s*\{[^}]*background:\s*transparent;[^}]*box-shadow:\s*none;/);
|
||||
assert.match(userCenterCreditsCss, /\.uc-asset-tabs\s*\{[^}]*background:\s*var\(--surface-1,\s*#fff\);[^}]*border:[^;}]+;[^}]*box-shadow:[^;}]+;/);
|
||||
assert.doesNotMatch(profileCredits, /credits-signin\.php|data-aksrt-signin-calendar/);
|
||||
// 签到日历只存在于签到弹窗(src/Credits/Signin.php + enhancements2.js),
|
||||
// 用户中心里的孤儿渲染器已整包移除。
|
||||
assert.equal(fs.existsSync(path.join(root, 'inc/helpers/user-center-renderers/credits-signin.php')), false);
|
||||
assert.doesNotMatch(userCenterCreditsCss + read('assets/css/frontend/enhancements/components/custom-amount.css'), /uc-signin-calendar/);
|
||||
assert.match(read('src/Credits/Signin.php'), /data-aksrt-signin-calendar/);
|
||||
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden/);
|
||||
assert.doesNotMatch(profileOrders, /\$_GET|add_query_arg|name="order_(?:status|type|number|page)"/);
|
||||
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden[\s\S]*?aksrt-orders-page__status-filters[\s\S]*?aksrt-orders-page__type-filters/);
|
||||
|
||||
@@ -204,7 +204,6 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
const header = read('inc/helpers/user-center-renderers/profile-header.php');
|
||||
const headerUserbox = read('inc/helpers/aksrt-header-userbox.php');
|
||||
const signinService = read('src/Credits/Signin.php');
|
||||
const signin = read('inc/helpers/user-center-renderers/credits-signin.php');
|
||||
const context = read('inc/helpers/aksrt-user-center.php');
|
||||
const renderers = [
|
||||
'inc/helpers/user-center-renderers/credits-balance.php',
|
||||
@@ -256,7 +255,6 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
assert.match(headerUserbox, /data-signin-captcha[\s\S]*?aksrt_render_captcha\('signin'\)/);
|
||||
assert.match(signinService, /aksrt-checkin-modal__btn[^>]+data-signin-btn/);
|
||||
assert.doesNotMatch(headerUserbox + signinService, /data-aksrt-checkin/);
|
||||
assert.doesNotMatch(signin, /data-signin-captcha|aksrt_render_captcha/);
|
||||
assert.match(context, /'signin_enabled'\s*=>\s*\$signin_enabled/);
|
||||
assert.match(context, /'signin_signed_today'\s*=>\s*\$signin_signed_today/);
|
||||
assert.match(shell, /\.uc-header__actions\s*\{[^}]*display:\s*flex;[^}]*gap:\s*6px;/s);
|
||||
|
||||
Reference in new issue
Block a user