diff --git a/web/src/components/topup/SubscriptionPlansCard.jsx b/web/src/components/topup/SubscriptionPlansCard.jsx
index 0395cffb9..88483269c 100644
--- a/web/src/components/topup/SubscriptionPlansCard.jsx
+++ b/web/src/components/topup/SubscriptionPlansCard.jsx
@@ -55,6 +55,22 @@ function formatDuration(plan, t) {
return `${value} ${unitLabels[unit] || unit}`;
}
+function formatResetPeriod(plan, t) {
+ const period = plan?.quota_reset_period || 'never';
+ if (period === 'never') return t('不重置');
+ if (period === 'daily') return t('每天');
+ if (period === 'weekly') return t('每周');
+ if (period === 'monthly') return t('每月');
+ if (period === 'custom') {
+ const seconds = Number(plan?.quota_reset_custom_seconds || 0);
+ if (seconds >= 86400) return `${Math.floor(seconds / 86400)} ${t('天')}`;
+ if (seconds >= 3600) return `${Math.floor(seconds / 3600)} ${t('小时')}`;
+ if (seconds >= 60) return `${Math.floor(seconds / 60)} ${t('分钟')}`;
+ return `${seconds} ${t('秒')}`;
+ }
+ return t('不重置');
+}
+
// 过滤易支付方式
function getEpayMethods(payMethods = []) {
return (payMethods || []).filter(
@@ -497,6 +513,9 @@ const SubscriptionPlansCard = ({
{formatDuration(plan, t)}
+
+ {t('重置')}: {formatResetPeriod(plan, t)}
+
diff --git a/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx b/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx
index a9adcec6e..4b9c4bde7 100644
--- a/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx
+++ b/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx
@@ -54,6 +54,22 @@ function formatDuration(plan, t) {
return `${value} ${unitLabels[unit] || unit}`;
}
+function formatResetPeriod(plan, t) {
+ const period = plan?.quota_reset_period || 'never';
+ if (period === 'never') return t('不重置');
+ if (period === 'daily') return t('每天');
+ if (period === 'weekly') return t('每周');
+ if (period === 'monthly') return t('每月');
+ if (period === 'custom') {
+ const seconds = Number(plan?.quota_reset_custom_seconds || 0);
+ if (seconds >= 86400) return `${Math.floor(seconds / 86400)} ${t('天')}`;
+ if (seconds >= 3600) return `${Math.floor(seconds / 3600)} ${t('小时')}`;
+ if (seconds >= 60) return `${Math.floor(seconds / 60)} ${t('分钟')}`;
+ return `${seconds} ${t('秒')}`;
+ }
+ return t('不重置');
+}
+
// 获取货币符号
function getCurrencySymbol(currency) {
const symbols = { USD: '$', EUR: '€', CNY: '¥', GBP: '£', JPY: '¥' };
@@ -129,6 +145,14 @@ const SubscriptionPurchaseModal = ({
+