From 047ace5ebedc284db91ca8ccf3ccc4a3cb0fdb8e Mon Sep 17 00:00:00 2001 From: shenlan Date: Fri, 21 Nov 2025 22:58:58 +0800 Subject: [PATCH] Polish scan payment layout (#690) --- .../account/BillingOptionsPanel.tsx | 187 +++++++++--------- .../user-center/routes/subscription.tsx | 19 +- 2 files changed, 113 insertions(+), 93 deletions(-) diff --git a/dashboard/src/modules/extensions/builtin/user-center/account/BillingOptionsPanel.tsx b/dashboard/src/modules/extensions/builtin/user-center/account/BillingOptionsPanel.tsx index 2c33e61..d2f07a5 100644 --- a/dashboard/src/modules/extensions/builtin/user-center/account/BillingOptionsPanel.tsx +++ b/dashboard/src/modules/extensions/builtin/user-center/account/BillingOptionsPanel.tsx @@ -45,6 +45,11 @@ const methodHints: Record = { export default function BillingOptionsPanel() { const [statusMessage, setStatusMessage] = useState(null) const [selected, setSelected] = useState(null) + const primaryButtonClass = + 'inline-flex w-full items-center justify-center rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-[var(--color-primary-strong)]' + const qrClassName = 'mx-auto h-56 w-56 object-contain' + const paymentCardClass = + 'flex h-full flex-col gap-4 rounded-2xl border border-[color:var(--color-surface-border)] bg-[color:var(--color-surface)] p-5 shadow-sm' const products = useMemo( () => PRODUCT_LIST.filter((item) => item.billing && (item.billing.paygo || item.billing.saas)), @@ -150,32 +155,33 @@ export default function BillingOptionsPanel() { const qrCode = method.qrCode?.trim() return ( -
+

{method.label || method.type}

-

{method.type === 'ethereum' ? 'ETH 扫码支付' : 'USDT(TRC20)扫码'}

-

{methodHints[method.type]}

+

{method.type === 'ethereum' ? 'ETH(ERC20)' : 'USDT(TRC20)'}

+

{methodHints[method.type]}

{qrCode ? ( -
- {`${method.label +
+ {`${method.label
) : null} {address ? ( -
-
-
- 钱包地址 - - {address} +
+
+ 钱包地址 + {network ? ( + + {network} - {network ? 网络 / Network:{network} : null} -
+ ) : null} +
+
+ + {address} + @@ -192,11 +198,7 @@ export default function BillingOptionsPanel() { ) : null}
-
@@ -208,16 +210,16 @@ export default function BillingOptionsPanel() { if (!selected) return null return ( -
+

PayPal

-

PayPal 扫码

-

{methodHints.paypal}

+

PayPal 扫码

+

{methodHints.paypal}

{method.qrCode ? ( -
- PayPal QR +
+ PayPal QR
) : null} @@ -265,7 +267,7 @@ export default function BillingOptionsPanel() {
-
+

{description}

+

+ {option.plan.currency} {option.plan.price.toFixed(0)} + {isSubscription && option.plan.interval ? ` / ${option.plan.interval}` : ''} +

- ) - })} -
+
+ +
+
+ ) + })}
{selected ? ( -
+
-

选择支付方式

-

支付后系统自动识别并开通

+

Payment

+

三种扫码支付并列,统一卡片结构

- 扫码支付 → 系统识别付款 → 订单自动激活或续订。PayPal 无需地址,ETH/USDT 展示钱包地址与复制按钮。 + 标准流程:扫码支付 → 系统自动识别付款 → 自动激活 / 续订订单。二维码统一尺寸,地址区使用等宽字体并提供复制按钮。

diff --git a/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx b/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx index 01bee33..a8e39bf 100644 --- a/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx +++ b/dashboard/src/modules/extensions/builtin/user-center/routes/subscription.tsx @@ -8,11 +8,22 @@ export default function UserCenterSubscriptionRoute() {

支付与订阅

- 支持 PayPal / 以太坊 ETH / USDT(TRC20)扫码支付。完成后系统会自动识别订单并开通或续订。 -

-

- 流程:先选择产品模式(PAYG / SaaS),再选择支付方式,扫码支付 → 自动识别到账。 + 支持 PayPal / ETH(ERC20)/ USDT(TRC20)扫码支付。支付成功后系统将自动识别并开通或续订服务。

+
+
+

步骤 1:选择产品模式

+

PAYG(流量包)或 SaaS(订阅),两种模式分区展示,避免混淆。

+
+
+

步骤 2:选择支付方式

+

PayPal / ETH / USDT 三种扫码方式并列,二维码统一尺寸,信息层级一致。

+
+
+

步骤 3:自动识别到账

+

扫码支付 → 系统自动识别付款 → 自动激活或续订订单,全程无需手工确认。

+
+