From 8ce5f99a246f864dc472ef297fb4e2f918a44f89 Mon Sep 17 00:00:00 2001 From: Eamon-meng <17516219072@163.com> Date: Tue, 31 Mar 2026 16:11:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=85=85=E5=80=BC=E5=92=8C?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=E6=94=AF=E4=BB=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/(dashboard)/_client/userCenter.tsx | 4 +- src/components/composites/extract/index.tsx | 189 +++++++++--------- .../composites/payment/payment-modal.tsx | 6 +- .../composites/purchase/long/form.tsx | 2 +- .../composites/purchase/long/right.tsx | 2 +- .../purchase/shared/field-payment.tsx | 23 ++- .../composites/purchase/short/form.tsx | 2 +- .../composites/purchase/short/right.tsx | 2 +- 8 files changed, 121 insertions(+), 109 deletions(-) diff --git a/src/app/admin/(dashboard)/_client/userCenter.tsx b/src/app/admin/(dashboard)/_client/userCenter.tsx index e1c0adc..748807f 100644 --- a/src/app/admin/(dashboard)/_client/userCenter.tsx +++ b/src/app/admin/(dashboard)/_client/userCenter.tsx @@ -59,7 +59,7 @@ export default async function UserCenter() { )} - {/*
+

账户余额

@@ -68,7 +68,7 @@ export default async function UserCenter() {

-
*/} +

快捷入口

diff --git a/src/components/composites/extract/index.tsx b/src/components/composites/extract/index.tsx index 2a48ecc..1998f98 100644 --- a/src/components/composites/extract/index.tsx +++ b/src/components/composites/extract/index.tsx @@ -382,102 +382,103 @@ function SelectResource() { 暂无可用套餐
- ) : resources.map((resource, i) => ( + ) : ( <> - -
- {resource.type === 1 && resource.short.type === 1 && ( - <> -
- - {name(resource)} -
-
- {resource.resource_no} -
-
- - 到期时间: - {format(resource.short.expire_at, 'yyyy-MM-dd HH:mm')} - - {intlFormatDistance(resource.short.expire_at, new Date())} -
- - )} - {resource.type === 1 && resource.short.type === 2 && ( - <> -
- - {name(resource)} -
-
- {resource.resource_no} -
-
- - 提取数量: - {resource.short.used} - {' '} - / - {resource.short.quota} - - - 剩余 - {resource.short.quota - resource.short.used} - -
- - )} - {resource.type === 2 && resource.long.type === 1 && ( - <> -
- - {name(resource)} -
-
- {resource.resource_no} -
-
- - 到期时间: - {format(resource.long.expire_at, 'yyyy-MM-dd HH:mm')} - - {intlFormatDistance(resource.long.expire_at, new Date())} -
- - )} - {resource.type === 2 && resource.long.type === 2 && ( - <> -
- - {name(resource)} -
-
- {resource.resource_no} -
-
- - 提取数量: - {resource.long.used} - {' '} - / - {resource.long.quota} - - - 剩余 - {resource.long.quota - resource.long.used} - -
- - )} -
-
- {i < resources.length - 1 && } + {resources.map(resource => ( + +
+ {resource.type === 1 && resource.short.type === 1 && ( + <> +
+ + {name(resource)} +
+
+ {resource.resource_no} +
+
+ + 到期时间: + {format(resource.short.expire_at, 'yyyy-MM-dd HH:mm')} + + {intlFormatDistance(resource.short.expire_at, new Date())} +
+ + )} + {resource.type === 1 && resource.short.type === 2 && ( + <> +
+ + {name(resource)} +
+
+ {resource.resource_no} +
+
+ + 提取数量: + {resource.short.used} + {' '} + / + {resource.short.quota} + + + 剩余 + {resource.short.quota - resource.short.used} + +
+ + )} + {resource.type === 2 && resource.long.type === 1 && ( + <> +
+ + {name(resource)} +
+
+ {resource.resource_no} +
+
+ + 到期时间: + {format(resource.long.expire_at, 'yyyy-MM-dd HH:mm')} + + {intlFormatDistance(resource.long.expire_at, new Date())} +
+ + )} + {resource.type === 2 && resource.long.type === 2 && ( + <> +
+ + {name(resource)} +
+
+ {resource.resource_no} +
+
+ + 提取数量: + {resource.long.used} + {' '} + / + {resource.long.quota} + + + 剩余 + {resource.long.quota - resource.long.used} + +
+ + )} +
+
+ ))} - ))} + )} )} diff --git a/src/components/composites/payment/payment-modal.tsx b/src/components/composites/payment/payment-modal.tsx index 9d8920b..aa1bac7 100644 --- a/src/components/composites/payment/payment-modal.tsx +++ b/src/components/composites/payment/payment-modal.tsx @@ -62,12 +62,12 @@ export function PaymentModal(props: PaymentModalProps) { if (!open) handleClose() }}> - {/* {props.platform === TradePlatform.Mobile + {props.platform === TradePlatform.Mobile ? : - } */} + } - + {/* */} ) } diff --git a/src/components/composites/purchase/long/form.tsx b/src/components/composites/purchase/long/form.tsx index f41df10..ce9d86a 100644 --- a/src/components/composites/purchase/long/form.tsx +++ b/src/components/composites/purchase/long/form.tsx @@ -28,7 +28,7 @@ export default function LongForm() { quota: 500, expire: '30', // 天 daily_limit: 100, - pay_type: 'wechat', // 余额支付 + pay_type: 'balance', // 余额支付 }, }) diff --git a/src/components/composites/purchase/long/right.tsx b/src/components/composites/purchase/long/right.tsx index ac25717..91a4111 100644 --- a/src/components/composites/purchase/long/right.tsx +++ b/src/components/composites/purchase/long/right.tsx @@ -164,7 +164,7 @@ function BalanceOrLogin(props: { const profile = use(useProfileStore(store => store.profile)) return profile ? ( <> - {/* */} + store.profile)) + + return profile ? ( {({id, field}) => ( - {/*
+

余额icon 账户余额 @@ -24,16 +32,15 @@ export function FieldPayment() { {profile.balance}

-
*/} - - {/* + 余额 icon 余额 - */} + )} + ) : ( + + 登录后支付 + ) } diff --git a/src/components/composites/purchase/short/form.tsx b/src/components/composites/purchase/short/form.tsx index dee7532..3cb54fb 100644 --- a/src/components/composites/purchase/short/form.tsx +++ b/src/components/composites/purchase/short/form.tsx @@ -28,7 +28,7 @@ export default function ShortForm() { quota: 10_000, // >= 10000 expire: '30', // 天 daily_limit: 2_000, // >= 2000 - pay_type: 'wechat', // 余额支付 + pay_type: 'balance', // 余额支付 }, }) diff --git a/src/components/composites/purchase/short/right.tsx b/src/components/composites/purchase/short/right.tsx index 91fdf22..5ccb334 100644 --- a/src/components/composites/purchase/short/right.tsx +++ b/src/components/composites/purchase/short/right.tsx @@ -165,7 +165,7 @@ function BalanceOrLogin(props: { const profile = use(useProfileStore(store => store.profile)) return profile ? ( <> - {/* */} +