feat(ui): 排行榜与首页打卡卡片多项优化
排行榜性能: - 客户端乐观缓存:进页面/切周期秒显旧数据,后台静默刷新,消除 2-3s 空白 - 云函数实例缓存 TTL 60s -> 5min,降低全表扫描频率 排行榜 UI: - 空状态重设计:奖杯光环插画(径向光晕 + 闪光漂浮) - 领奖台 slot 撑满对齐列表、金银铜底座配色、角标与昵称间距修复、底线对齐 首页打卡卡片: - 火焰光晕脉动 + 72rpx 大数字 + 分段进度格子 - 计划 >10 天时进度退化为里程碑连续条 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 200rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.podium-crown {
|
||||
@@ -128,7 +128,7 @@
|
||||
opacity: 0.7;
|
||||
border: 4rpx solid var(--card-bg);
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
margin-bottom: 12rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.avatar--lg {
|
||||
@@ -138,7 +138,7 @@
|
||||
border: 4rpx solid rgba(var(--primary-rgb), 0.4);
|
||||
box-shadow: 0 6rpx 20rpx rgba(var(--primary-rgb), 0.25);
|
||||
opacity: 0.85;
|
||||
margin-bottom: 12rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* A real photo fills the whole circle (no inner ring), mirroring the
|
||||
@@ -178,6 +178,10 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 1.3;
|
||||
/* 用 name 的 margin-top 直接控制与上方头像/角标的间距:它是 flex 子元素,
|
||||
margin 必定生效不折叠,不依赖 avatar margin-bottom 的 collapse 行为
|
||||
(WebView/Skyline 下不一致,曾导致角标压住昵称)。 */
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.podium-name--first {
|
||||
@@ -196,7 +200,7 @@
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
color: var(--text);
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@@ -222,9 +226,21 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.podium-base--first { height: 96rpx; background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.04)); }
|
||||
.podium-base--second { height: 64rpx; }
|
||||
.podium-base--third { height: 48rpx; }
|
||||
.podium-base--first {
|
||||
height: 96rpx;
|
||||
background: linear-gradient(180deg, rgba(255, 197, 61, 0.55), rgba(250, 140, 22, 0.20));
|
||||
box-shadow: 0 6rpx 18rpx rgba(250, 140, 22, 0.30), inset 0 2rpx 4rpx rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
.podium-base--second {
|
||||
height: 64rpx;
|
||||
background: linear-gradient(180deg, rgba(201, 205, 212, 0.50), rgba(140, 140, 140, 0.16));
|
||||
box-shadow: 0 6rpx 18rpx rgba(140, 140, 140, 0.22), inset 0 2rpx 4rpx rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
.podium-base--third {
|
||||
height: 48rpx;
|
||||
background: linear-gradient(180deg, rgba(232, 160, 106, 0.50), rgba(212, 107, 8, 0.16));
|
||||
box-shadow: 0 6rpx 18rpx rgba(212, 107, 8, 0.22), inset 0 2rpx 4rpx rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
/* Rank list */
|
||||
.rank-list {
|
||||
@@ -369,56 +385,79 @@
|
||||
|
||||
.empty-illus {
|
||||
position: relative;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-bottom: 40rpx;
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
margin-bottom: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.empty-illus-body {
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 160rpx;
|
||||
height: 30rpx;
|
||||
background: linear-gradient(90deg, var(--primary), var(--primary-light));
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.empty-illus-arm {
|
||||
position: absolute;
|
||||
bottom: 36rpx;
|
||||
width: 20rpx;
|
||||
height: 60rpx;
|
||||
background: var(--primary);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.empty-illus-arm--l {
|
||||
left: 30rpx;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
|
||||
.empty-illus-arm--r {
|
||||
right: 30rpx;
|
||||
transform: rotate(-30deg);
|
||||
}
|
||||
|
||||
.empty-illus-bubble {
|
||||
/* 光晕:主题色径向渐变圆,托住奖杯 */
|
||||
.empty-halo {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--primary-bg);
|
||||
color: var(--primary);
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 16rpx;
|
||||
line-height: 1;
|
||||
bottom: 0;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle at center,
|
||||
rgba(var(--primary-rgb), 0.20) 0%,
|
||||
rgba(var(--primary-rgb), 0.10) 45%,
|
||||
rgba(var(--primary-rgb), 0) 72%);
|
||||
}
|
||||
|
||||
/* 奖杯:居中,轻微浮动 + 投影 */
|
||||
.empty-trophy {
|
||||
position: relative;
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
z-index: 2;
|
||||
animation: emptyFloat 3s ease-in-out infinite;
|
||||
filter: drop-shadow(0 6rpx 16rpx rgba(var(--primary-rgb), 0.25));
|
||||
}
|
||||
|
||||
/* 闪光点:散布光晕周围,错峰闪烁 + 缩放 */
|
||||
.empty-spark {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.empty-spark--1 {
|
||||
top: 18rpx;
|
||||
left: 40rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
animation: emptySparkle 2.4s ease-in-out infinite;
|
||||
}
|
||||
.empty-spark--2 {
|
||||
top: 48rpx;
|
||||
right: 32rpx;
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
animation: emptySparkle 2.4s ease-in-out 0.6s infinite;
|
||||
}
|
||||
.empty-spark--3 {
|
||||
bottom: 40rpx;
|
||||
right: 60rpx;
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
animation: emptySparkle 2.4s ease-in-out 1.2s infinite;
|
||||
}
|
||||
|
||||
@keyframes emptyFloat {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(-10rpx); }
|
||||
}
|
||||
|
||||
@keyframes emptySparkle {
|
||||
0%, 100% { opacity: 0.2; transform: scale(0.8); }
|
||||
50% { opacity: 0.95; transform: scale(1.15); }
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user