style(user): 美化个人中心页面顶部绿色系风格

- 将顶部渐变背景由紫粉色改为绿色系,增强视觉统一性
- 用户信息卡片背景调整为毛玻璃效果,提升质感与层次感
- 用户名、ID及箭头等文字颜色改为白色及半透明白色,增强对比度
- 数据概览从三列扩展为四列,新增余额栏目,文字统一为白色
- VIP标识渐变色由粉红色改为金色,突显尊贵感
- 增加第三个装饰圆形,调整装饰元素大小和位置,更加协调
- 注释并暂时移除门店列表和其他页面中的“立即预约”按钮相关代码,避免用户误操作
- 修正首页门店信息跳转路径,指向正确页面
This commit is contained in:
2026-06-23 17:34:21 +08:00
parent 66491b1853
commit 6c22856b69
5 changed files with 90 additions and 54 deletions

View File

@@ -30,56 +30,68 @@ const UserPage: React.FC = () => {
<ScrollView scrollY className='flex-1'>
{/* 顶部渐变背景区域 */}
<View className='relative'>
{/* 渐变背景 */}
{/* 渐变背景 — 绿色系 */}
<View
className='absolute inset-0'
style={{
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%)',
background: 'linear-gradient(135deg, #0d9488 0%, #059669 50%, #10b981 100%)',
}}
/>
{/* 装饰圆形 */}
<View
className='absolute'
style={{
width: '200px',
height: '200px',
borderRadius: '100px',
background: 'rgba(255, 255, 255, 0.1)',
top: '-80px',
right: '-60px',
width: '240px',
height: '240px',
borderRadius: '120px',
background: 'rgba(255, 255, 255, 0.08)',
top: '-100px',
right: '-80px',
}}
/>
<View
className='absolute'
style={{
width: '150px',
height: '150px',
borderRadius: '75px',
background: 'rgba(255, 255, 255, 0.08)',
top: '-40px',
left: '-40px',
width: '180px',
height: '180px',
borderRadius: '90px',
background: 'rgba(255, 255, 255, 0.06)',
top: '-60px',
left: '-60px',
}}
/>
<View
className='absolute'
style={{
width: '120px',
height: '120px',
borderRadius: '60px',
background: 'rgba(255, 255, 255, 0.05)',
bottom: '20px',
right: '-30px',
}}
/>
{/* 用户信息卡片 */}
<View className='relative mx-3 mt-3 p-4 rounded-2xl' style={{
background: 'rgba(255, 255, 255, 0.95)',
boxShadow: '0 8px 32px rgba(0, 0, 0, 0.1)',
background: 'rgba(255, 255, 255, 0.15)',
backdropFilter: 'blur(10px)',
border: '1px solid rgba(255, 255, 255, 0.2)',
}}>
<View className='flex items-center gap-4' onClick={handleLogin}>
{/* 头像区域 */}
<View className='relative'>
{isLoggedIn && user?.avatar ? (
<Image
className='w-16 h-16 rounded-full border-4 border-white'
style={{ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)' }}
className='w-16 h-16 rounded-full border-3 border-white/30'
style={{ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.2)' }}
src={user.avatar}
mode='aspectFill'
/>
) : (
<View
className='w-16 h-16 rounded-full border-4 border-white flex items-center justify-center'
style={{ background: 'linear-gradient(135deg, #667eea, #764ba2)', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)' }}
className='w-16 h-16 rounded-full border-3 border-white/30 flex items-center justify-center'
style={{ background: 'rgba(255, 255, 255, 0.25)', boxShadow: '0 4px 16px rgba(0, 0, 0, 0.2)' }}
>
<Text className='text-2xl text-white'>👤</Text>
</View>
@@ -88,7 +100,7 @@ const UserPage: React.FC = () => {
{isLoggedIn && user?.memberLevelName && (
<View
className='absolute -bottom-1 -right-1 px-1 py-1 rounded text-xs text-white'
style={{ background: 'linear-gradient(135deg, #f093fb, #f5576c)' }}
style={{ background: 'linear-gradient(135deg, #fbbf24, #f59e0b)' }}
>
VIP
</View>
@@ -98,7 +110,7 @@ const UserPage: React.FC = () => {
{/* 用户信息 */}
<View className='flex-1'>
<View className='flex items-center gap-2'>
<Text className='text-lg font-bold text-gray-800'>
<Text className='text-lg font-bold text-white'>
{isLoggedIn ? (user?.nickname || user?.phone || '用户') : '点击登录'}
</Text>
{isLoggedIn && user?.memberLevelName && (
@@ -106,50 +118,59 @@ const UserPage: React.FC = () => {
)}
</View>
{isLoggedIn ? (
<Text className='text-xs text-gray-400 mt-1'>ID: {(user as any)?.id || '暂无'}</Text>
<Text className='text-xs text-white/60 mt-1'>ID: {(user as any)?.id || '暂无'}</Text>
) : (
<Text className='text-xs text-gray-400 mt-1'></Text>
<Text className='text-xs text-white/60 mt-1'></Text>
)}
</View>
{/* 箭头 */}
<View className='w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center'>
<Text className='text-gray-400 text-xs'>{'>'}</Text>
<View className='w-6 h-6 rounded-full bg-white/20 flex items-center justify-center'>
<Text className='text-white/80 text-xs'>{'>'}</Text>
</View>
</View>
{/* 数据概览 */}
{/* 数据概览 — 4列白色文字 */}
{isLoggedIn && (
<View
className='grid grid-cols-3 gap-2 mt-4 pt-4 rounded-xl'
style={{ background: 'rgba(102, 126, 234, 0.05)' }}
className='grid grid-cols-4 gap-2 mt-4 pt-4'
style={{ borderTop: '1px solid rgba(255, 255, 255, 0.2)' }}
>
<View
className='text-center py-2 rounded-lg'
className='text-center py-2'
onClick={() => Taro.navigateTo({ url: '/pages/user/wallet' })}
>
<Text className='text-xl font-bold text-white'>
¥{((user as any)?.balance || '0.00')}
</Text>
<Text className='text-xs text-white/70 mt-1 block'></Text>
</View>
<View
className='text-center py-2'
onClick={() => Taro.switchTab({ url: '/pages/points/index' })}
>
<Text className='text-xl font-bold text-transparent' style={{ background: 'linear-gradient(135deg, #667eea, #764ba2)', WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent' }}>
<Text className='text-xl font-bold text-white'>
{(user as any)?.points || 0}
</Text>
<Text className='text-xs text-gray-500 mt-1'></Text>
<Text className='text-xs text-white/70 mt-1 block'></Text>
</View>
<View
className='text-center py-2 rounded-lg'
className='text-center py-2'
onClick={() => Taro.navigateTo({ url: '/pages/user/coupon-list' })}
>
<Text className='text-xl font-bold text-transparent' style={{ background: 'linear-gradient(135deg, #f093fb, #f5576c)', WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent' }}>
<Text className='text-xl font-bold text-white'>
0
</Text>
<Text className='text-xs text-gray-500 mt-1'></Text>
<Text className='text-xs text-white/70 mt-1 block'></Text>
</View>
<View
className='text-center py-2 rounded-lg'
className='text-center py-2'
onClick={() => Taro.navigateTo({ url: '/pages/order/list' })}
>
<Text className='text-xl font-bold text-transparent' style={{ background: 'linear-gradient(135deg, #4facfe, #00f2fe)', WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent' }}>
<Text className='text-xl font-bold text-white'>
0
</Text>
<Text className='text-xs text-gray-500 mt-1'></Text>
<Text className='text-xs text-white/70 mt-1 block'></Text>
</View>
</View>
)}