收口个人中心扫码支付面板
迁移 Native 支付二维码确认面板到 PlatformSubpanel 保留二维码生成展示和确认支付流程 补充扫码支付面板公共子面板断言并更新文档和 Hermes
This commit is contained in:
@@ -1332,7 +1332,12 @@ test('profile recharge modal shows native qr code on desktop web by default', as
|
||||
'wechat_native',
|
||||
);
|
||||
});
|
||||
expect(await screen.findByText('微信扫码支付')).toBeTruthy();
|
||||
const nativePaymentTitle = await screen.findByText('微信扫码支付');
|
||||
const nativePaymentPanel = nativePaymentTitle.closest(
|
||||
'.platform-subpanel',
|
||||
) as HTMLElement;
|
||||
expect(nativePaymentPanel.className).toContain('rounded-[1rem]');
|
||||
expect(nativePaymentPanel.className).toContain('p-4');
|
||||
await waitFor(() => {
|
||||
expect(screen.getByAltText('微信 Native 支付二维码')).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -3226,7 +3226,12 @@ function ProfileRechargeModal({
|
||||
)}
|
||||
|
||||
{nativePayment ? (
|
||||
<div className="platform-subpanel mt-4 rounded-2xl px-4 py-4 text-center">
|
||||
<PlatformSubpanel
|
||||
as="div"
|
||||
radius="sm"
|
||||
padding="md"
|
||||
className="mt-4 text-center"
|
||||
>
|
||||
<div className="text-sm font-black">微信扫码支付</div>
|
||||
<div className="mx-auto mt-3 flex h-[180px] w-[180px] items-center justify-center rounded-xl bg-white p-2">
|
||||
{nativeQrImageUrl ? (
|
||||
@@ -3250,7 +3255,7 @@ function ProfileRechargeModal({
|
||||
>
|
||||
{nativePayment.isConfirming ? '确认中' : '我已支付'}
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
</PlatformSubpanel>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user