| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- /* pages/profile/profile.wxss */
- page {
- height: 100%;
- width: 100%;
- background: linear-gradient(180deg, #f8f9ff 0%, #f5f5f5 100%);
- }
- .container {
- display: flex;
- flex-direction: column;
- width: 100%;
- /* 高度由JS动态设置,如果没有设置则使用100vh作为fallback */
- min-height: 100vh;
- height: 100vh;
- background: linear-gradient(180deg, #f8f9ff 0%, #f5f5f5 100%);
- box-sizing: border-box;
- /* 确保内容在安全区域内 */
- padding: 0;
- margin: 0;
- }
- .user-section {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- padding: 40rpx 30rpx 50rpx;
- padding-top: calc(40rpx + env(safe-area-inset-top));
- color: #fff;
- position: relative;
- overflow: hidden;
- flex-shrink: 0;
- width: 100%;
- box-sizing: border-box;
- }
- .user-section::before {
- content: '';
- position: absolute;
- top: -50%;
- right: -20%;
- width: 400rpx;
- height: 400rpx;
- background: rgba(255, 255, 255, 0.1);
- border-radius: 50%;
- pointer-events: none;
- }
- .user-section::after {
- content: '';
- position: absolute;
- bottom: -30%;
- left: -10%;
- width: 300rpx;
- height: 300rpx;
- background: rgba(255, 255, 255, 0.08);
- border-radius: 50%;
- pointer-events: none;
- }
- .user-header {
- display: flex;
- align-items: center;
- position: relative;
- z-index: 1;
- }
- .avatar {
- width: 140rpx;
- height: 140rpx;
- border-radius: 50%;
- margin-right: 32rpx;
- border: 6rpx solid rgba(255, 255, 255, 0.4);
- flex-shrink: 0;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.2);
- transition: transform 0.3s ease;
- }
- .avatar:active {
- transform: scale(0.95);
- }
- .user-info {
- flex: 1;
- min-width: 0;
- }
- .nickname-row {
- display: flex;
- align-items: center;
- margin-bottom: 16rpx;
- gap: 16rpx;
- flex-wrap: wrap;
- }
- .nickname {
- font-size: 40rpx;
- font-weight: 600;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
- }
- .username {
- font-size: 26rpx;
- opacity: 0.95;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-weight: 500;
- }
- .vip-badge {
- display: inline-block;
- padding: 6rpx 18rpx;
- background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
- color: #333;
- border-radius: 24rpx;
- font-size: 24rpx;
- font-weight: bold;
- flex-shrink: 0;
- box-shadow: 0 4rpx 12rpx rgba(255, 215, 0, 0.4);
- border: 2rpx solid rgba(255, 255, 255, 0.3);
- }
- .menu-section {
- background: #fff;
- margin: 0;
- border-radius: 0;
- overflow: hidden;
- box-shadow: none;
- flex: 1;
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- .menu-item {
- display: flex;
- align-items: center;
- padding: 36rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- transition: all 0.3s ease;
- position: relative;
- width: 100%;
- box-sizing: border-box;
- }
- .menu-item::before {
- content: '';
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- width: 6rpx;
- background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
- opacity: 0;
- transition: opacity 0.3s ease;
- }
- .menu-item:active {
- background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
- padding-left: 36rpx;
- }
- .menu-item:active::before {
- opacity: 1;
- }
- .menu-item:last-child {
- border-bottom: none;
- }
- .menu-icon {
- font-size: 44rpx;
- margin-right: 24rpx;
- width: 50rpx;
- text-align: center;
- transition: transform 0.3s ease;
- }
- .menu-item:active .menu-icon {
- transform: scale(1.1);
- }
- .menu-text {
- flex: 1;
- font-size: 30rpx;
- color: #1a1a1a;
- font-weight: 500;
- }
- .menu-arrow {
- font-size: 28rpx;
- color: #999;
- transition: transform 0.3s ease;
- }
- .menu-item:active .menu-arrow {
- transform: translateX(4rpx);
- color: #667eea;
- }
- .logout-section {
- padding: 30rpx 0 40rpx;
- margin-top: auto; /* 将退出登录按钮推到底部,铺满高度 */
- flex-shrink: 0;
- width: 100%;
- box-sizing: border-box;
- }
- .logout-btn {
- width: calc(100% - 60rpx);
- margin: 0 30rpx;
- height: 96rpx;
- line-height: 96rpx;
- background: #fff;
- color: #ff4444;
- border-radius: 16rpx;
- font-size: 32rpx;
- font-weight: 500;
- border: 2rpx solid #ffe0e0;
- transition: all 0.3s ease;
- box-shadow: 0 4rpx 16rpx rgba(255, 68, 68, 0.1);
- }
- .logout-btn::after {
- border: none;
- }
- .logout-btn:active {
- background: linear-gradient(135deg, #ffe0e0 0%, #fff5f5 100%);
- transform: scale(0.98);
- box-shadow: 0 2rpx 12rpx rgba(255, 68, 68, 0.15);
- }
|