From bced7b35e0faa30ff88ea5f7ffd61c7196aaf6d1 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 9 Jul 2026 19:08:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(pay):=20=E6=B5=8B=E8=AF=95=E9=A1=B5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=94=B9=E4=B8=AD=E6=96=87=E6=A0=87=E7=AD=BE?= =?UTF-8?q?(=E6=B6=88=E6=AD=A7=E4=B9=89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pending/paid/expired 显示层映射为 等待付款/付款完成/已过期,徽章字体改 sans。 枚举值不变(程序仍用英文);发货/开通属门面(独角数卡),不在收款服务里。 Co-Authored-By: Claude Opus 4.8 --- pay/internal/httpapi/testpage.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pay/internal/httpapi/testpage.go b/pay/internal/httpapi/testpage.go index ebf4dbc..0345a59 100644 --- a/pay/internal/httpapi/testpage.go +++ b/pay/internal/httpapi/testpage.go @@ -80,7 +80,7 @@ const testPageHTML = ` .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 = ` 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; }