style(user): 美化个人中心页面顶部绿色系风格
- 将顶部渐变背景由紫粉色改为绿色系,增强视觉统一性 - 用户信息卡片背景调整为毛玻璃效果,提升质感与层次感 - 用户名、ID及箭头等文字颜色改为白色及半透明白色,增强对比度 - 数据概览从三列扩展为四列,新增余额栏目,文字统一为白色 - VIP标识渐变色由粉红色改为金色,突显尊贵感 - 增加第三个装饰圆形,调整装饰元素大小和位置,更加协调 - 注释并暂时移除门店列表和其他页面中的“立即预约”按钮相关代码,避免用户误操作 - 修正首页门店信息跳转路径,指向正确页面
This commit is contained in:
@@ -30,3 +30,18 @@
|
|||||||
|
|
||||||
同时修正了限时秒杀、领券中心的跳转路径指向真实页面文件。
|
同时修正了限时秒杀、领券中心的跳转路径指向真实页面文件。
|
||||||
构建编译通过 ✓
|
构建编译通过 ✓
|
||||||
|
|
||||||
|
## 个人中心页面顶部美化(绿色系)
|
||||||
|
|
||||||
|
### 改动文件
|
||||||
|
- **`src/pages/user/index.tsx`** — 顶部渐变区域 + 用户信息卡片 + 数据概览
|
||||||
|
|
||||||
|
### 调整内容
|
||||||
|
1. **渐变背景** — 从紫粉渐变 (`#667eea → #764ba2 → #f093fb`) 改为绿色系 (`#0d9488 → #059669 → #10b981`)
|
||||||
|
2. **用户信息卡片** — 从白色半实心背景改为毛玻璃效果 `rgba(255,255,255,0.15)` + `backdropFilter:blur(10px)`
|
||||||
|
3. **文字颜色** — 用户名/ID 改白色,箭头改为半透明白色底
|
||||||
|
4. **数据概览** — 从3列(积分/优惠券/订单)扩展为 **4列(余额/积分/优惠券/订单)**,全部白色文字,与参考图一致
|
||||||
|
5. **VIP标识** — 渐变色从粉红改为金色 (`#fbbf24 → #f59e0b`)
|
||||||
|
6. **装饰圆形** — 增加第三个装饰圆,调整大小和位置
|
||||||
|
|
||||||
|
构建编译通过 ✓
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const IndexPage: React.FC = () => {
|
|||||||
{ icon: '⭐', label: '我的收藏', url: '/pages/user/favorite-list/index' },
|
{ icon: '⭐', label: '我的收藏', url: '/pages/user/favorite-list/index' },
|
||||||
{ icon: '👑', label: '会员中心', url: '/pages/user/member/index' },
|
{ icon: '👑', label: '会员中心', url: '/pages/user/member/index' },
|
||||||
{ icon: '💰', label: '积分商城', url: '/pages/points/index' },
|
{ icon: '💰', label: '积分商城', url: '/pages/points/index' },
|
||||||
{ icon: '🏪', label: '门店信息', url: '/pages/shop/shopStore/index' },
|
{ icon: '🏪', label: '门店信息', url: '/pages/store/list/index' },
|
||||||
{ icon: '❓', label: '帮助中心', url: '/pages/user/help-center/index' },
|
{ icon: '❓', label: '帮助中心', url: '/pages/user/help-center/index' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -112,12 +112,12 @@ const StoreListPage: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Text className='text-xs text-green-500'>📍 导航到店</Text>
|
<Text className='text-xs text-green-500'>📍 导航到店</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
{/*<View*/}
|
||||||
className='flex-1 py-2 bg-orange-50 rounded-lg text-center'
|
{/* className='flex-1 py-2 bg-orange-50 rounded-lg text-center'*/}
|
||||||
onClick={() => handleBooking(store.id!)}
|
{/* onClick={() => handleBooking(store.id!)}*/}
|
||||||
>
|
{/*>*/}
|
||||||
<Text className='text-xs text-orange-500'>📅 立即预约</Text>
|
{/* <Text className='text-xs text-orange-500'>📅 立即预约</Text>*/}
|
||||||
</View>
|
{/*</View>*/}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -318,15 +318,15 @@ const StoreListPage: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<Text className='text-xs text-gray-500'>🗺 查看地图</Text>
|
<Text className='text-xs text-gray-500'>🗺 查看地图</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
{/*<View*/}
|
||||||
className='flex-1 py-2 rounded-lg text-center'
|
{/* className='flex-1 py-2 rounded-lg text-center'*/}
|
||||||
style={{ background: selectMode ? '#0e932e' : '#fff7ed', border: selectMode ? 'none' : '1px solid #fed7aa' }}
|
{/* style={{ background: selectMode ? '#0e932e' : '#fff7ed', border: selectMode ? 'none' : '1px solid #fed7aa' }}*/}
|
||||||
onClick={() => handleBooking(store)}
|
{/* onClick={() => handleBooking(store)}*/}
|
||||||
>
|
{/*>*/}
|
||||||
<Text className={`text-xs ${selectMode ? 'text-white' : 'text-orange-500'}`}>
|
{/* <Text className={`text-xs ${selectMode ? 'text-white' : 'text-orange-500'}`}>*/}
|
||||||
{selectMode ? '✓ 选择' : '📅 立即预约'}
|
{/* {selectMode ? '✓ 选择' : '📅 立即预约'}*/}
|
||||||
</Text>
|
{/* </Text>*/}
|
||||||
</View>
|
{/*</View>*/}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -30,56 +30,68 @@ const UserPage: React.FC = () => {
|
|||||||
<ScrollView scrollY className='flex-1'>
|
<ScrollView scrollY className='flex-1'>
|
||||||
{/* 顶部渐变背景区域 */}
|
{/* 顶部渐变背景区域 */}
|
||||||
<View className='relative'>
|
<View className='relative'>
|
||||||
{/* 渐变背景 */}
|
{/* 渐变背景 — 绿色系 */}
|
||||||
<View
|
<View
|
||||||
className='absolute inset-0'
|
className='absolute inset-0'
|
||||||
style={{
|
style={{
|
||||||
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%)',
|
background: 'linear-gradient(135deg, #0d9488 0%, #059669 50%, #10b981 100%)',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* 装饰圆形 */}
|
{/* 装饰圆形 */}
|
||||||
<View
|
<View
|
||||||
className='absolute'
|
className='absolute'
|
||||||
style={{
|
style={{
|
||||||
width: '200px',
|
width: '240px',
|
||||||
height: '200px',
|
height: '240px',
|
||||||
borderRadius: '100px',
|
borderRadius: '120px',
|
||||||
background: 'rgba(255, 255, 255, 0.1)',
|
background: 'rgba(255, 255, 255, 0.08)',
|
||||||
top: '-80px',
|
top: '-100px',
|
||||||
right: '-60px',
|
right: '-80px',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<View
|
<View
|
||||||
className='absolute'
|
className='absolute'
|
||||||
style={{
|
style={{
|
||||||
width: '150px',
|
width: '180px',
|
||||||
height: '150px',
|
height: '180px',
|
||||||
borderRadius: '75px',
|
borderRadius: '90px',
|
||||||
background: 'rgba(255, 255, 255, 0.08)',
|
background: 'rgba(255, 255, 255, 0.06)',
|
||||||
top: '-40px',
|
top: '-60px',
|
||||||
left: '-40px',
|
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={{
|
<View className='relative mx-3 mt-3 p-4 rounded-2xl' style={{
|
||||||
background: 'rgba(255, 255, 255, 0.95)',
|
background: 'rgba(255, 255, 255, 0.15)',
|
||||||
boxShadow: '0 8px 32px rgba(0, 0, 0, 0.1)',
|
backdropFilter: 'blur(10px)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.2)',
|
||||||
}}>
|
}}>
|
||||||
<View className='flex items-center gap-4' onClick={handleLogin}>
|
<View className='flex items-center gap-4' onClick={handleLogin}>
|
||||||
{/* 头像区域 */}
|
{/* 头像区域 */}
|
||||||
<View className='relative'>
|
<View className='relative'>
|
||||||
{isLoggedIn && user?.avatar ? (
|
{isLoggedIn && user?.avatar ? (
|
||||||
<Image
|
<Image
|
||||||
className='w-16 h-16 rounded-full border-4 border-white'
|
className='w-16 h-16 rounded-full border-3 border-white/30'
|
||||||
style={{ boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)' }}
|
style={{ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.2)' }}
|
||||||
src={user.avatar}
|
src={user.avatar}
|
||||||
mode='aspectFill'
|
mode='aspectFill'
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<View
|
<View
|
||||||
className='w-16 h-16 rounded-full border-4 border-white flex items-center justify-center'
|
className='w-16 h-16 rounded-full border-3 border-white/30 flex items-center justify-center'
|
||||||
style={{ background: 'linear-gradient(135deg, #667eea, #764ba2)', boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)' }}
|
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>
|
<Text className='text-2xl text-white'>👤</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -88,7 +100,7 @@ const UserPage: React.FC = () => {
|
|||||||
{isLoggedIn && user?.memberLevelName && (
|
{isLoggedIn && user?.memberLevelName && (
|
||||||
<View
|
<View
|
||||||
className='absolute -bottom-1 -right-1 px-1 py-1 rounded text-xs text-white'
|
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
|
VIP
|
||||||
</View>
|
</View>
|
||||||
@@ -98,7 +110,7 @@ const UserPage: React.FC = () => {
|
|||||||
{/* 用户信息 */}
|
{/* 用户信息 */}
|
||||||
<View className='flex-1'>
|
<View className='flex-1'>
|
||||||
<View className='flex items-center gap-2'>
|
<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 || '用户') : '点击登录'}
|
{isLoggedIn ? (user?.nickname || user?.phone || '用户') : '点击登录'}
|
||||||
</Text>
|
</Text>
|
||||||
{isLoggedIn && user?.memberLevelName && (
|
{isLoggedIn && user?.memberLevelName && (
|
||||||
@@ -106,50 +118,59 @@ const UserPage: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
{isLoggedIn ? (
|
{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>
|
||||||
|
|
||||||
{/* 箭头 */}
|
{/* 箭头 */}
|
||||||
<View className='w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center'>
|
<View className='w-6 h-6 rounded-full bg-white/20 flex items-center justify-center'>
|
||||||
<Text className='text-gray-400 text-xs'>{'>'}</Text>
|
<Text className='text-white/80 text-xs'>{'>'}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* 数据概览 */}
|
{/* 数据概览 — 4列白色文字 */}
|
||||||
{isLoggedIn && (
|
{isLoggedIn && (
|
||||||
<View
|
<View
|
||||||
className='grid grid-cols-3 gap-2 mt-4 pt-4 rounded-xl'
|
className='grid grid-cols-4 gap-2 mt-4 pt-4'
|
||||||
style={{ background: 'rgba(102, 126, 234, 0.05)' }}
|
style={{ borderTop: '1px solid rgba(255, 255, 255, 0.2)' }}
|
||||||
>
|
>
|
||||||
<View
|
<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' })}
|
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}
|
{(user as any)?.points || 0}
|
||||||
</Text>
|
</Text>
|
||||||
<Text className='text-xs text-gray-500 mt-1'>积分</Text>
|
<Text className='text-xs text-white/70 mt-1 block'>积分</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
className='text-center py-2 rounded-lg'
|
className='text-center py-2'
|
||||||
onClick={() => Taro.navigateTo({ url: '/pages/user/coupon-list' })}
|
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
|
0
|
||||||
</Text>
|
</Text>
|
||||||
<Text className='text-xs text-gray-500 mt-1'>优惠券</Text>
|
<Text className='text-xs text-white/70 mt-1 block'>优惠券</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
className='text-center py-2 rounded-lg'
|
className='text-center py-2'
|
||||||
onClick={() => Taro.navigateTo({ url: '/pages/order/list' })}
|
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
|
0
|
||||||
</Text>
|
</Text>
|
||||||
<Text className='text-xs text-gray-500 mt-1'>订单</Text>
|
<Text className='text-xs text-white/70 mt-1 block'>订单</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user