✨ refactor(wallet): Top-up layout to embed subscription plans into the recharge card tabs
- Defaulting to subscriptions when available and avoiding initial flash when no plans exist. - Adjust the wide-screen layout to place wallet and invite sections side by side, simplify the subscription header and controls, and add padding to prevent card borders from clipping. - Update related i18n strings by adding the new tab label and removing the obsolete subscription blurb.
This commit is contained in:
@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
For commercial licensing, please contact support@quantumnous.com
|
For commercial licensing, please contact support@quantumnous.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useRef } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Typography,
|
Typography,
|
||||||
@@ -32,6 +32,8 @@ import {
|
|||||||
Col,
|
Col,
|
||||||
Spin,
|
Spin,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
|
Tabs,
|
||||||
|
TabPane,
|
||||||
} from '@douyinfe/semi-ui';
|
} from '@douyinfe/semi-ui';
|
||||||
import { SiAlipay, SiWechat, SiStripe } from 'react-icons/si';
|
import { SiAlipay, SiWechat, SiStripe } from 'react-icons/si';
|
||||||
import {
|
import {
|
||||||
@@ -41,10 +43,12 @@ import {
|
|||||||
BarChart2,
|
BarChart2,
|
||||||
TrendingUp,
|
TrendingUp,
|
||||||
Receipt,
|
Receipt,
|
||||||
|
Sparkles,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { IconGift } from '@douyinfe/semi-icons';
|
import { IconGift } from '@douyinfe/semi-icons';
|
||||||
import { useMinimumLoadingTime } from '../../hooks/common/useMinimumLoadingTime';
|
import { useMinimumLoadingTime } from '../../hooks/common/useMinimumLoadingTime';
|
||||||
import { getCurrencyConfig } from '../../helpers/render';
|
import { getCurrencyConfig } from '../../helpers/render';
|
||||||
|
import SubscriptionPlansCard from './SubscriptionPlansCard';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
@@ -83,40 +87,35 @@ const RechargeCard = ({
|
|||||||
statusLoading,
|
statusLoading,
|
||||||
topupInfo,
|
topupInfo,
|
||||||
onOpenHistory,
|
onOpenHistory,
|
||||||
|
subscriptionLoading = false,
|
||||||
|
subscriptionPlans = [],
|
||||||
|
billingPreference,
|
||||||
|
onChangeBillingPreference,
|
||||||
|
activeSubscriptions = [],
|
||||||
|
allSubscriptions = [],
|
||||||
|
reloadSubscriptionSelf,
|
||||||
}) => {
|
}) => {
|
||||||
const onlineFormApiRef = useRef(null);
|
const onlineFormApiRef = useRef(null);
|
||||||
const redeemFormApiRef = useRef(null);
|
const redeemFormApiRef = useRef(null);
|
||||||
|
const initialTabSetRef = useRef(false);
|
||||||
const showAmountSkeleton = useMinimumLoadingTime(amountLoading);
|
const showAmountSkeleton = useMinimumLoadingTime(amountLoading);
|
||||||
console.log(
|
const [activeTab, setActiveTab] = useState('topup');
|
||||||
' enabled screem ?',
|
const shouldShowSubscription =
|
||||||
enableCreemTopUp,
|
!subscriptionLoading && subscriptionPlans.length > 0;
|
||||||
' products ?',
|
|
||||||
creemProducts,
|
|
||||||
);
|
|
||||||
return (
|
|
||||||
<Card className='!rounded-2xl shadow-sm border-0'>
|
|
||||||
{/* 卡片头部 */}
|
|
||||||
<div className='flex items-center justify-between mb-4'>
|
|
||||||
<div className='flex items-center'>
|
|
||||||
<Avatar size='small' color='blue' className='mr-3 shadow-md'>
|
|
||||||
<CreditCard size={16} />
|
|
||||||
</Avatar>
|
|
||||||
<div>
|
|
||||||
<Typography.Text className='text-lg font-medium'>
|
|
||||||
{t('账户充值')}
|
|
||||||
</Typography.Text>
|
|
||||||
<div className='text-xs'>{t('多种充值方式,安全便捷')}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
icon={<Receipt size={16} />}
|
|
||||||
theme='solid'
|
|
||||||
onClick={onOpenHistory}
|
|
||||||
>
|
|
||||||
{t('账单')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (initialTabSetRef.current) return;
|
||||||
|
if (subscriptionLoading) return;
|
||||||
|
setActiveTab(shouldShowSubscription ? 'subscription' : 'topup');
|
||||||
|
initialTabSetRef.current = true;
|
||||||
|
}, [shouldShowSubscription, subscriptionLoading]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!shouldShowSubscription && activeTab !== 'topup') {
|
||||||
|
setActiveTab('topup');
|
||||||
|
}
|
||||||
|
}, [shouldShowSubscription, activeTab]);
|
||||||
|
const topupContent = (
|
||||||
<Space vertical style={{ width: '100%' }}>
|
<Space vertical style={{ width: '100%' }}>
|
||||||
{/* 统计数据 */}
|
{/* 统计数据 */}
|
||||||
<Card
|
<Card
|
||||||
@@ -294,8 +293,7 @@ const RechargeCard = ({
|
|||||||
{payMethods && payMethods.length > 0 ? (
|
{payMethods && payMethods.length > 0 ? (
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
{payMethods.map((payMethod) => {
|
{payMethods.map((payMethod) => {
|
||||||
const minTopupVal =
|
const minTopupVal = Number(payMethod.min_topup) || 0;
|
||||||
Number(payMethod.min_topup) || 0;
|
|
||||||
const isStripe = payMethod.type === 'stripe';
|
const isStripe = payMethod.type === 'stripe';
|
||||||
const disabled =
|
const disabled =
|
||||||
(!enableOnlineTopUp && !isStripe) ||
|
(!enableOnlineTopUp && !isStripe) ||
|
||||||
@@ -391,9 +389,7 @@ const RechargeCard = ({
|
|||||||
<div className='grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2'>
|
<div className='grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2'>
|
||||||
{presetAmounts.map((preset, index) => {
|
{presetAmounts.map((preset, index) => {
|
||||||
const discount =
|
const discount =
|
||||||
preset.discount ||
|
preset.discount || topupInfo?.discount?.[preset.value] || 1.0;
|
||||||
topupInfo?.discount?.[preset.value] ||
|
|
||||||
1.0;
|
|
||||||
const originalPrice = preset.value * priceRatio;
|
const originalPrice = preset.value * priceRatio;
|
||||||
const discountedPrice = originalPrice * discount;
|
const discountedPrice = originalPrice * discount;
|
||||||
const hasDiscount = discount < 1.0;
|
const hasDiscount = discount < 1.0;
|
||||||
@@ -409,7 +405,7 @@ const RechargeCard = ({
|
|||||||
const s = JSON.parse(statusStr);
|
const s = JSON.parse(statusStr);
|
||||||
usdRate = s?.usd_exchange_rate || 7;
|
usdRate = s?.usd_exchange_rate || 7;
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) { }
|
||||||
|
|
||||||
let displayValue = preset.value; // 显示的数量
|
let displayValue = preset.value; // 显示的数量
|
||||||
let displayActualPay = actualPay;
|
let displayActualPay = actualPay;
|
||||||
@@ -460,10 +456,7 @@ const RechargeCard = ({
|
|||||||
{hasDiscount && (
|
{hasDiscount && (
|
||||||
<Tag style={{ marginLeft: 4 }} color='green'>
|
<Tag style={{ marginLeft: 4 }} color='green'>
|
||||||
{t('折').includes('off')
|
{t('折').includes('off')
|
||||||
? (
|
? ((1 - parseFloat(discount)) * 100).toFixed(1)
|
||||||
(1 - parseFloat(discount)) *
|
|
||||||
100
|
|
||||||
).toFixed(1)
|
|
||||||
: (discount * 10).toFixed(1)}
|
: (discount * 10).toFixed(1)}
|
||||||
{t('折')}
|
{t('折')}
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -583,6 +576,76 @@ const RechargeCard = ({
|
|||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
</Space>
|
</Space>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className='!rounded-2xl shadow-sm border-0'>
|
||||||
|
{/* 卡片头部 */}
|
||||||
|
<div className='flex items-center justify-between mb-4'>
|
||||||
|
<div className='flex items-center'>
|
||||||
|
<Avatar size='small' color='blue' className='mr-3 shadow-md'>
|
||||||
|
<CreditCard size={16} />
|
||||||
|
</Avatar>
|
||||||
|
<div>
|
||||||
|
<Typography.Text className='text-lg font-medium'>
|
||||||
|
{t('账户充值')}
|
||||||
|
</Typography.Text>
|
||||||
|
<div className='text-xs'>{t('多种充值方式,安全便捷')}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
icon={<Receipt size={16} />}
|
||||||
|
theme='solid'
|
||||||
|
onClick={onOpenHistory}
|
||||||
|
>
|
||||||
|
{t('账单')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{shouldShowSubscription ? (
|
||||||
|
<Tabs type='card' activeKey={activeTab} onChange={setActiveTab}>
|
||||||
|
<TabPane
|
||||||
|
tab={
|
||||||
|
<div className='flex items-center gap-2'>
|
||||||
|
<Sparkles size={16} />
|
||||||
|
{t('订阅套餐')}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
itemKey='subscription'
|
||||||
|
>
|
||||||
|
<div className='py-2'>
|
||||||
|
<SubscriptionPlansCard
|
||||||
|
t={t}
|
||||||
|
loading={subscriptionLoading}
|
||||||
|
plans={subscriptionPlans}
|
||||||
|
payMethods={payMethods}
|
||||||
|
enableOnlineTopUp={enableOnlineTopUp}
|
||||||
|
enableStripeTopUp={enableStripeTopUp}
|
||||||
|
enableCreemTopUp={enableCreemTopUp}
|
||||||
|
billingPreference={billingPreference}
|
||||||
|
onChangeBillingPreference={onChangeBillingPreference}
|
||||||
|
activeSubscriptions={activeSubscriptions}
|
||||||
|
allSubscriptions={allSubscriptions}
|
||||||
|
reloadSubscriptionSelf={reloadSubscriptionSelf}
|
||||||
|
withCard={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane
|
||||||
|
tab={
|
||||||
|
<div className='flex items-center gap-2'>
|
||||||
|
<Wallet size={16} />
|
||||||
|
{t('额度充值')}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
itemKey='topup'
|
||||||
|
>
|
||||||
|
<div className='py-2'>{topupContent}</div>
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
) : (
|
||||||
|
topupContent
|
||||||
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ For commercial licensing, please contact support@quantumnous.com
|
|||||||
|
|
||||||
import React, { useMemo, useState } from 'react';
|
import React, { useMemo, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
Avatar,
|
|
||||||
Badge,
|
Badge,
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
@@ -33,7 +32,7 @@ import {
|
|||||||
} from '@douyinfe/semi-ui';
|
} from '@douyinfe/semi-ui';
|
||||||
import { API, showError, showSuccess, renderQuota } from '../../helpers';
|
import { API, showError, showSuccess, renderQuota } from '../../helpers';
|
||||||
import { getCurrencyConfig } from '../../helpers/render';
|
import { getCurrencyConfig } from '../../helpers/render';
|
||||||
import { Crown, RefreshCw, Sparkles } from 'lucide-react';
|
import { RefreshCw, Sparkles } from 'lucide-react';
|
||||||
import SubscriptionPurchaseModal from './modals/SubscriptionPurchaseModal';
|
import SubscriptionPurchaseModal from './modals/SubscriptionPurchaseModal';
|
||||||
import {
|
import {
|
||||||
formatSubscriptionDuration,
|
formatSubscriptionDuration,
|
||||||
@@ -83,6 +82,7 @@ const SubscriptionPlansCard = ({
|
|||||||
activeSubscriptions = [],
|
activeSubscriptions = [],
|
||||||
allSubscriptions = [],
|
allSubscriptions = [],
|
||||||
reloadSubscriptionSelf,
|
reloadSubscriptionSelf,
|
||||||
|
withCard = true,
|
||||||
}) => {
|
}) => {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [selectedPlan, setSelectedPlan] = useState(null);
|
const [selectedPlan, setSelectedPlan] = useState(null);
|
||||||
@@ -241,33 +241,9 @@ const SubscriptionPlansCard = ({
|
|||||||
return Math.round((used / total) * 100);
|
return Math.round((used / total) * 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
const cardContent = (
|
||||||
<Card className='!rounded-2xl shadow-sm border-0'>
|
<>
|
||||||
{/* 卡片头部 */}
|
{/* 卡片头部 */}
|
||||||
<div className='flex items-center justify-between mb-3'>
|
|
||||||
<div className='flex items-center'>
|
|
||||||
<Avatar size='small' color='violet' className='mr-3 shadow-md'>
|
|
||||||
<Crown size={16} />
|
|
||||||
</Avatar>
|
|
||||||
<div>
|
|
||||||
<Text className='text-lg font-medium'>{t('订阅套餐')}</Text>
|
|
||||||
<div className='text-xs'>{t('购买订阅获得模型额度/次数')}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/* 扣费策略 - 右上角 */}
|
|
||||||
<Select
|
|
||||||
value={billingPreference}
|
|
||||||
onChange={onChangeBillingPreference}
|
|
||||||
size='small'
|
|
||||||
optionList={[
|
|
||||||
{ value: 'subscription_first', label: t('优先订阅') },
|
|
||||||
{ value: 'wallet_first', label: t('优先钱包') },
|
|
||||||
{ value: 'subscription_only', label: t('仅用订阅') },
|
|
||||||
{ value: 'wallet_only', label: t('仅用钱包') },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className='space-y-4'>
|
<div className='space-y-4'>
|
||||||
{/* 我的订阅骨架屏 */}
|
{/* 我的订阅骨架屏 */}
|
||||||
@@ -281,7 +257,7 @@ const SubscriptionPlansCard = ({
|
|||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
{/* 套餐列表骨架屏 */}
|
{/* 套餐列表骨架屏 */}
|
||||||
<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-5 w-full'>
|
<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-5 w-full px-1'>
|
||||||
{[1, 2, 3].map((i) => (
|
{[1, 2, 3].map((i) => (
|
||||||
<Card
|
<Card
|
||||||
key={i}
|
key={i}
|
||||||
@@ -317,8 +293,8 @@ const SubscriptionPlansCard = ({
|
|||||||
<Space vertical style={{ width: '100%' }} spacing={8}>
|
<Space vertical style={{ width: '100%' }} spacing={8}>
|
||||||
{/* 当前订阅状态 */}
|
{/* 当前订阅状态 */}
|
||||||
<Card className='!rounded-xl w-full' bodyStyle={{ padding: '12px' }}>
|
<Card className='!rounded-xl w-full' bodyStyle={{ padding: '12px' }}>
|
||||||
<div className='flex items-center justify-between mb-2'>
|
<div className='flex items-center justify-between mb-2 gap-3'>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2 flex-1 min-w-0'>
|
||||||
<Text strong>{t('我的订阅')}</Text>
|
<Text strong>{t('我的订阅')}</Text>
|
||||||
{hasActiveSubscription ? (
|
{hasActiveSubscription ? (
|
||||||
<Tag
|
<Tag
|
||||||
@@ -341,6 +317,18 @@ const SubscriptionPlansCard = ({
|
|||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div className='flex items-center gap-2'>
|
||||||
|
<Select
|
||||||
|
value={billingPreference}
|
||||||
|
onChange={onChangeBillingPreference}
|
||||||
|
size='small'
|
||||||
|
optionList={[
|
||||||
|
{ value: 'subscription_first', label: t('优先订阅') },
|
||||||
|
{ value: 'wallet_first', label: t('优先钱包') },
|
||||||
|
{ value: 'subscription_only', label: t('仅用订阅') },
|
||||||
|
{ value: 'wallet_only', label: t('仅用钱包') },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
<Button
|
<Button
|
||||||
size='small'
|
size='small'
|
||||||
theme='light'
|
theme='light'
|
||||||
@@ -355,6 +343,7 @@ const SubscriptionPlansCard = ({
|
|||||||
loading={refreshing}
|
loading={refreshing}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{hasAnySubscription ? (
|
{hasAnySubscription ? (
|
||||||
<>
|
<>
|
||||||
@@ -451,7 +440,7 @@ const SubscriptionPlansCard = ({
|
|||||||
|
|
||||||
{/* 可购买套餐 - 标准定价卡片 */}
|
{/* 可购买套餐 - 标准定价卡片 */}
|
||||||
{plans.length > 0 ? (
|
{plans.length > 0 ? (
|
||||||
<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-5 w-full'>
|
<div className='grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-5 w-full px-1'>
|
||||||
{plans.map((p, index) => {
|
{plans.map((p, index) => {
|
||||||
const plan = p?.plan;
|
const plan = p?.plan;
|
||||||
const totalAmount = Number(plan?.total_amount || 0);
|
const totalAmount = Number(plan?.total_amount || 0);
|
||||||
@@ -493,8 +482,7 @@ const SubscriptionPlansCard = ({
|
|||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={plan?.id}
|
key={plan?.id}
|
||||||
className={`!rounded-xl transition-all hover:shadow-lg w-full h-full ${
|
className={`!rounded-xl transition-all hover:shadow-lg w-full h-full ${isPopular ? 'ring-2 ring-purple-500' : ''
|
||||||
isPopular ? 'ring-2 ring-purple-500' : ''
|
|
||||||
}`}
|
}`}
|
||||||
bodyStyle={{ padding: 0 }}
|
bodyStyle={{ padding: 0 }}
|
||||||
>
|
>
|
||||||
@@ -583,7 +571,7 @@ const SubscriptionPlansCard = ({
|
|||||||
const buttonEl = (
|
const buttonEl = (
|
||||||
<Button
|
<Button
|
||||||
theme='outline'
|
theme='outline'
|
||||||
type='tertiary'
|
type='primary'
|
||||||
block
|
block
|
||||||
disabled={reached}
|
disabled={reached}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -614,6 +602,16 @@ const SubscriptionPlansCard = ({
|
|||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{withCard ? (
|
||||||
|
<Card className='!rounded-2xl shadow-sm border-0'>{cardContent}</Card>
|
||||||
|
) : (
|
||||||
|
<div className='space-y-3'>{cardContent}</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 购买确认弹窗 */}
|
{/* 购买确认弹窗 */}
|
||||||
<SubscriptionPurchaseModal
|
<SubscriptionPurchaseModal
|
||||||
@@ -640,7 +638,7 @@ const SubscriptionPlansCard = ({
|
|||||||
onPayCreem={payCreem}
|
onPayCreem={payCreem}
|
||||||
onPayEpay={payEpay}
|
onPayEpay={payEpay}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import { StatusContext } from '../../context/Status';
|
|||||||
|
|
||||||
import RechargeCard from './RechargeCard';
|
import RechargeCard from './RechargeCard';
|
||||||
import InvitationCard from './InvitationCard';
|
import InvitationCard from './InvitationCard';
|
||||||
import SubscriptionPlansCard from './SubscriptionPlansCard';
|
|
||||||
import TransferModal from './modals/TransferModal';
|
import TransferModal from './modals/TransferModal';
|
||||||
import PaymentConfirmModal from './modals/PaymentConfirmModal';
|
import PaymentConfirmModal from './modals/PaymentConfirmModal';
|
||||||
import TopupHistoryModal from './modals/TopupHistoryModal';
|
import TopupHistoryModal from './modals/TopupHistoryModal';
|
||||||
@@ -733,35 +732,7 @@ const TopUp = () => {
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
{/* 主布局区域 */}
|
{/* 主布局区域 */}
|
||||||
<div className='grid grid-cols-1 lg:grid-cols-12 gap-6'>
|
<div className='grid grid-cols-1 lg:grid-cols-2 gap-6'>
|
||||||
{/* 左侧 - 订阅套餐(无套餐时隐藏整块卡片) */}
|
|
||||||
{(subscriptionLoading || subscriptionPlans.length > 0) && (
|
|
||||||
<div className='lg:col-span-7'>
|
|
||||||
<SubscriptionPlansCard
|
|
||||||
t={t}
|
|
||||||
loading={subscriptionLoading}
|
|
||||||
plans={subscriptionPlans}
|
|
||||||
payMethods={payMethods}
|
|
||||||
enableOnlineTopUp={enableOnlineTopUp}
|
|
||||||
enableStripeTopUp={enableStripeTopUp}
|
|
||||||
enableCreemTopUp={enableCreemTopUp}
|
|
||||||
billingPreference={billingPreference}
|
|
||||||
onChangeBillingPreference={updateBillingPreference}
|
|
||||||
activeSubscriptions={activeSubscriptions}
|
|
||||||
allSubscriptions={allSubscriptions}
|
|
||||||
reloadSubscriptionSelf={getSubscriptionSelf}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* 右侧 - 账户充值 + 邀请奖励 */}
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
subscriptionLoading || subscriptionPlans.length > 0
|
|
||||||
? 'lg:col-span-5 flex flex-col gap-6'
|
|
||||||
: 'lg:col-span-12 flex flex-col gap-6'
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<RechargeCard
|
<RechargeCard
|
||||||
t={t}
|
t={t}
|
||||||
enableOnlineTopUp={enableOnlineTopUp}
|
enableOnlineTopUp={enableOnlineTopUp}
|
||||||
@@ -797,6 +768,13 @@ const TopUp = () => {
|
|||||||
statusLoading={statusLoading}
|
statusLoading={statusLoading}
|
||||||
topupInfo={topupInfo}
|
topupInfo={topupInfo}
|
||||||
onOpenHistory={handleOpenHistory}
|
onOpenHistory={handleOpenHistory}
|
||||||
|
subscriptionLoading={subscriptionLoading}
|
||||||
|
subscriptionPlans={subscriptionPlans}
|
||||||
|
billingPreference={billingPreference}
|
||||||
|
onChangeBillingPreference={updateBillingPreference}
|
||||||
|
activeSubscriptions={activeSubscriptions}
|
||||||
|
allSubscriptions={allSubscriptions}
|
||||||
|
reloadSubscriptionSelf={getSubscriptionSelf}
|
||||||
/>
|
/>
|
||||||
<InvitationCard
|
<InvitationCard
|
||||||
t={t}
|
t={t}
|
||||||
@@ -808,7 +786,6 @@ const TopUp = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2721,7 +2721,7 @@
|
|||||||
"绑定订阅套餐": "Bind Subscription Plan",
|
"绑定订阅套餐": "Bind Subscription Plan",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "After binding, a user subscription is created immediately (no payment required); validity follows the plan configuration.",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "After binding, a user subscription is created immediately (no payment required); validity follows the plan configuration.",
|
||||||
"订阅套餐": "Subscription Plans",
|
"订阅套餐": "Subscription Plans",
|
||||||
"购买订阅获得模型额度/次数": "Purchase a subscription to get model quota/usage",
|
"额度充值": "Quota Top-up",
|
||||||
"优先订阅": "Subscription first",
|
"优先订阅": "Subscription first",
|
||||||
"优先钱包": "Wallet first",
|
"优先钱包": "Wallet first",
|
||||||
"仅用订阅": "Subscription only",
|
"仅用订阅": "Subscription only",
|
||||||
|
|||||||
@@ -2684,7 +2684,7 @@
|
|||||||
"绑定订阅套餐": "Lier un plan d'abonnement",
|
"绑定订阅套餐": "Lier un plan d'abonnement",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "Après liaison, un abonnement utilisateur est créé immédiatement (sans paiement) ; la validité suit la configuration du plan.",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "Après liaison, un abonnement utilisateur est créé immédiatement (sans paiement) ; la validité suit la configuration du plan.",
|
||||||
"订阅套餐": "Plans d'abonnement",
|
"订阅套餐": "Plans d'abonnement",
|
||||||
"购买订阅获得模型额度/次数": "Acheter un abonnement pour obtenir des quotas/usages de modèles",
|
"额度充值": "Recharge de quota",
|
||||||
"优先订阅": "Abonnement en priorité",
|
"优先订阅": "Abonnement en priorité",
|
||||||
"优先钱包": "Portefeuille en priorité",
|
"优先钱包": "Portefeuille en priorité",
|
||||||
"仅用订阅": "Abonnement uniquement",
|
"仅用订阅": "Abonnement uniquement",
|
||||||
|
|||||||
@@ -2667,7 +2667,7 @@
|
|||||||
"绑定订阅套餐": "サブスクリプションプランを紐付け",
|
"绑定订阅套餐": "サブスクリプションプランを紐付け",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "紐付け後、ユーザーサブスクリプションが即時に作成されます(支払い不要)。有効期限はプラン設定に従います。",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "紐付け後、ユーザーサブスクリプションが即時に作成されます(支払い不要)。有効期限はプラン設定に従います。",
|
||||||
"订阅套餐": "サブスクリプションプラン",
|
"订阅套餐": "サブスクリプションプラン",
|
||||||
"购买订阅获得模型额度/次数": "サブスクリプション購入でモデルのクォータ/回数を取得",
|
"额度充值": "クォータ補充",
|
||||||
"优先订阅": "サブスクリプション優先",
|
"优先订阅": "サブスクリプション優先",
|
||||||
"优先钱包": "ウォレット優先",
|
"优先钱包": "ウォレット優先",
|
||||||
"仅用订阅": "サブスクリプションのみ",
|
"仅用订阅": "サブスクリプションのみ",
|
||||||
|
|||||||
@@ -2697,7 +2697,7 @@
|
|||||||
"绑定订阅套餐": "Привязать план подписки",
|
"绑定订阅套餐": "Привязать план подписки",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "После привязки подписка будет создана сразу (без оплаты); срок действия рассчитывается по настройкам плана.",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "После привязки подписка будет создана сразу (без оплаты); срок действия рассчитывается по настройкам плана.",
|
||||||
"订阅套餐": "Планы подписки",
|
"订阅套餐": "Планы подписки",
|
||||||
"购买订阅获得模型额度/次数": "Купите подписку, чтобы получить лимит/количество использования моделей",
|
"额度充值": "Пополнение квоты",
|
||||||
"优先订阅": "Сначала подписка",
|
"优先订阅": "Сначала подписка",
|
||||||
"优先钱包": "Сначала кошелек",
|
"优先钱包": "Сначала кошелек",
|
||||||
"仅用订阅": "Только подписка",
|
"仅用订阅": "Только подписка",
|
||||||
|
|||||||
@@ -3246,7 +3246,7 @@
|
|||||||
"绑定订阅套餐": "Liên kết gói đăng ký",
|
"绑定订阅套餐": "Liên kết gói đăng ký",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "Sau khi liên kết, sẽ tạo đăng ký cho người dùng ngay (không cần thanh toán); thời hạn theo cấu hình gói.",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "Sau khi liên kết, sẽ tạo đăng ký cho người dùng ngay (không cần thanh toán); thời hạn theo cấu hình gói.",
|
||||||
"订阅套餐": "Gói đăng ký",
|
"订阅套餐": "Gói đăng ký",
|
||||||
"购买订阅获得模型额度/次数": "Mua đăng ký để nhận hạn mức/lượt dùng mô hình",
|
"额度充值": "Nạp hạn mức",
|
||||||
"优先订阅": "Ưu tiên đăng ký",
|
"优先订阅": "Ưu tiên đăng ký",
|
||||||
"优先钱包": "Ưu tiên ví",
|
"优先钱包": "Ưu tiên ví",
|
||||||
"仅用订阅": "Chỉ dùng đăng ký",
|
"仅用订阅": "Chỉ dùng đăng ký",
|
||||||
|
|||||||
@@ -2706,7 +2706,7 @@
|
|||||||
"绑定订阅套餐": "绑定订阅套餐",
|
"绑定订阅套餐": "绑定订阅套餐",
|
||||||
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。",
|
"绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。": "绑定后会立即生成用户订阅(无需支付),有效期按套餐配置计算。",
|
||||||
"订阅套餐": "订阅套餐",
|
"订阅套餐": "订阅套餐",
|
||||||
"购买订阅获得模型额度/次数": "购买订阅获得模型额度/次数",
|
"额度充值": "额度充值",
|
||||||
"优先订阅": "优先订阅",
|
"优先订阅": "优先订阅",
|
||||||
"优先钱包": "优先钱包",
|
"优先钱包": "优先钱包",
|
||||||
"仅用订阅": "仅用订阅",
|
"仅用订阅": "仅用订阅",
|
||||||
|
|||||||
Reference in New Issue
Block a user