feat: 完成代码编写
This commit is contained in:
@@ -24,13 +24,13 @@ export default function Page() {
|
||||
const totalAssets = (user?.balance || 0) + (user?.commission || 0) + (user?.gift_amount || 0);
|
||||
return (
|
||||
<>
|
||||
<Card className='mb-4 rounded-[40px] border border-[#D9D9D9] px-[30px] pb-[30px] pt-[20px] shadow-[0px_0px_52.6px_1px_rgba(15,44,83,0.05)]'>
|
||||
<Card className='rounded-[40px] border border-[#D9D9D9] px-[24px] pb-[30px] pt-[20px] shadow-[0px_0px_52.6px_1px_rgba(15,44,83,0.05)] sm:mb-4 sm:px-[30px]'>
|
||||
<CardContent className='p-0'>
|
||||
<h2 className='mb-4 flex items-center justify-between text-xl font-bold text-[#666]'>
|
||||
<h2 className='mb-4 flex items-center justify-between text-base font-bold text-[#666] sm:text-xl'>
|
||||
<span>{t('assetOverview')}</span>
|
||||
<Recharge
|
||||
className={
|
||||
'min-w-[150px] rounded-full border-[#A8D4ED] bg-[#A8D4ED] px-[35px] py-[9px] text-center text-xl font-bold hover:bg-[#225BA9] hover:text-white'
|
||||
'rounded-full border-[#A8D4ED] bg-[#A8D4ED] px-[35px] py-[9px] text-center text-base font-bold hover:bg-[#225BA9] hover:text-white sm:text-xl'
|
||||
}
|
||||
/>
|
||||
</h2>
|
||||
@@ -38,39 +38,43 @@ export default function Page() {
|
||||
<div className='flex items-center justify-between'>
|
||||
<div>
|
||||
<p className='text-sm font-light text-[#666]'>总资产</p>
|
||||
<p className='text-[32px] font-bold'>
|
||||
<p className='text-2xl font-bold sm:text-[32px]'>
|
||||
<Display type='currency' value={totalAssets} />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='grid grid-cols-1 gap-6 md:grid-cols-4'>
|
||||
<div className='rounded-[20px] bg-[#EAEAEA] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
|
||||
<p className='mb-3 text-sm font-medium text-[#666] opacity-80'>账户余额</p>
|
||||
<p className='text-2xl font-bold text-[#225BA9]'>
|
||||
<div className='grid grid-cols-2 gap-2 sm:grid-cols-4 sm:gap-6'>
|
||||
<div className='col-span-2 rounded-[20px] bg-[#EAEAEA] p-4 shadow-sm transition-all duration-300 hover:shadow-md sm:col-span-1'>
|
||||
<p className='text-sm font-medium text-[#666] opacity-80 sm:mb-3'>账户余额</p>
|
||||
<p className='text-xl font-bold text-[#225BA9] sm:text-2xl'>
|
||||
<Display type='currency' value={user?.balance} />
|
||||
</p>
|
||||
</div>
|
||||
<div className='rounded-[20px] bg-[#EAEAEA] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
|
||||
<p className='mb-3 text-sm font-medium text-[#666] opacity-80'>{t('giftAmount')}</p>
|
||||
<p className='text-2xl font-bold text-[#225BA9]'>
|
||||
<p className='t text-sm font-medium text-[#666] opacity-80 sm:mb-3'>
|
||||
{t('giftAmount')}
|
||||
</p>
|
||||
<p className='text-xl font-bold text-[#225BA9] sm:text-2xl'>
|
||||
<Display type='currency' value={user?.gift_amount} />
|
||||
</p>
|
||||
</div>
|
||||
<div className='rounded-[20px] bg-[#EAEAEA] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
|
||||
<p className='mb-3 text-sm font-medium text-[#666] opacity-80'>{t('commission')}</p>
|
||||
<p className='text-2xl font-bold text-[#225BA9]'>
|
||||
<p className='t text-sm font-medium text-[#666] opacity-80 sm:mb-3'>
|
||||
{t('commission')}
|
||||
</p>
|
||||
<p className='text-xl font-bold text-[#225BA9] sm:text-2xl'>
|
||||
<Display type='currency' value={user?.commission} />
|
||||
</p>
|
||||
</div>
|
||||
<div className='rounded-[20px] border-2 border-[#D9D9D9] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
|
||||
<p className='mb-3 flex justify-between text-sm font-medium text-[#666] opacity-80'>
|
||||
<div className='col-span-2 rounded-[20px] border-2 border-[#D9D9D9] p-4 shadow-sm transition-all duration-300 hover:shadow-md sm:col-span-1'>
|
||||
<p className='mb-1 flex justify-between text-sm font-medium text-[#666] opacity-80 sm:mb-3'>
|
||||
<span>返佣邀请码</span>
|
||||
<Link href='/affiliate' className={'text-[#225BA9]'}>
|
||||
返佣详情
|
||||
</Link>
|
||||
</p>
|
||||
<p className='flex justify-between text-2xl font-bold text-[#225BA9]'>
|
||||
<p className='flex justify-between text-base font-bold text-[#225BA9] sm:text-2xl'>
|
||||
<span> {user?.refer_code}</span>
|
||||
<CopyToClipboard
|
||||
text={`${location?.origin}/?invite=${user?.refer_code}`}
|
||||
@@ -100,9 +104,9 @@ export default function Page() {
|
||||
}}
|
||||
renderItem={(item) => {
|
||||
return (
|
||||
<Card className='rounded-[32px] px-[55px]'>
|
||||
<CardContent className='p-3 text-sm'>
|
||||
<ul className='grid grid-cols-2 gap-3 *:flex *:flex-col lg:grid-cols-4'>
|
||||
<Card className='rounded-[32px] px-[20px] sm:px-[55px]'>
|
||||
<CardContent className='px-0 py-3 text-[10px] sm:p-3 sm:text-sm'>
|
||||
<ul className='grid grid-cols-4 gap-3 *:flex *:flex-col'>
|
||||
<li className='font-semibold'>
|
||||
<span className='text-[#225BA9]'>{t('createdAt')}</span>
|
||||
<time>{formatDate(item.created_at)}</time>
|
||||
|
||||
Reference in New Issue
Block a user