fix(pay): 测试页状态改中文标签(消歧义)

pending/paid/expired 显示层映射为 等待付款/付款完成/已过期,徽章字体改 sans。
枚举值不变(程序仍用英文);发货/开通属门面(独角数卡),不在收款服务里。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-09 19:08:41 +08:00
parent e421f03790
commit bced7b35e0
+4 -2
View File
@@ -80,7 +80,7 @@ const testPageHTML = `<!doctype html>
.addrblock .k{color:var(--fg2);font-size:12px;margin-bottom:6px}
.addr{font-family:var(--font-mono);font-size:14px;background:var(--surface-2);border:1px solid var(--border);
border-radius:var(--radius-md);padding:12px 14px;word-break:break-all;line-height:1.5;color:var(--fg1)}
.badge{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600;font-family:var(--font-mono)}
.badge{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600;font-family:var(--font-sans)}
.b-pending{background:var(--warning-subtle);color:#9A6B1F}
.b-paid{background:var(--success-subtle);color:#3E6B3D}
.b-expired{background:var(--danger-subtle);color:#8F3826}
@@ -167,9 +167,11 @@ const testPageHTML = `<!doctype html>
function fmtUSDT(micro){ return (micro/1e6).toFixed(6).replace(/0+$/,'').replace(/\.$/,''); }
// pay-server 只有 pending/paid/expired 三态;显示层映射为中文(发货/开通归门面,不在此服务)。
var STATUS_LABEL = { pending:'等待付款', paid:'付款完成', expired:'已过期' };
function setStatus(s){
var el = $('o-status');
el.textContent = s;
el.textContent = STATUS_LABEL[s] || s;
el.className = 'badge b-' + s;
}