yingsa/miniprogram/pages/index/index.wxss
ethanfly 02937ca33c feat(天梯): 新增选手定位功能并调整挑战赛权重
- 在小程序天梯排名页添加“定位我”按钮,点击可滚动到当前用户所在位置
- 新增获取用户排名接口 `/ladder/my-rank` 用于定位计算
- 调整挑战赛权重从 1.5 降至 1.0,与日常畅打保持一致
- 新增数据库脚本 `setChallengeMatchWeightTo1.js` 用于更新历史数据
- 在管理员界面创建天梯用户时,根据所选等级自动填充默认战力值
- 修复管理员更新比赛时挑战赛权重强制设置为 1.0 的问题
- 新增天梯汇总大屏页面及相关路由
- 添加大屏比赛列表接口 `/match/display-list` 用于展示进行中和近期比赛
- 优化用户详情页的胜负场和胜率显示逻辑
- 修复小程序用户注册时的性别选择逻辑
2026-02-02 03:22:36 +08:00

420 lines
7.3 KiB
Plaintext

/* ==========================================
天梯排名页面 - 浅色高级感设计
========================================== */
.page-container {
min-height: 100vh;
background: var(--bg-page);
position: relative;
}
/* 顶部装饰背景 */
.hero-section {
position: relative;
padding: 48rpx 24rpx 32rpx;
background: transparent;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.04);
}
.hero-pattern {
display: none;
}
.hero-pattern-2 {
display: none;
}
/* 门店信息头部 */
.store-header {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32rpx;
padding: 16rpx 20rpx;
background: var(--bg-white);
border-radius: 16rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.store-info {
display: flex;
align-items: center;
gap: 12rpx;
}
.store-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: var(--primary);
box-shadow: 0 0 8rpx rgba(255, 107, 53, 0.4);
animation: pulse 2s ease-in-out infinite;
}
.store-name {
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
letter-spacing: 0.5rpx;
}
.change-store-btn {
display: flex;
align-items: center;
gap: 6rpx;
padding: 10rpx 18rpx;
background: var(--bg-soft);
border-radius: 20rpx;
transition: all 0.3s ease;
}
.change-store-btn:active {
transform: scale(0.96);
}
.change-store-text {
font-size: 24rpx;
color: var(--text-secondary);
font-weight: 500;
}
.change-store-arrow {
font-size: 22rpx;
color: var(--text-muted);
font-weight: 300;
}
/* 页面标题 */
.page-header {
position: relative;
z-index: 1;
text-align: center;
margin-bottom: 0;
padding: 24rpx 0;
}
.page-title {
display: block;
font-size: 52rpx;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 8rpx;
letter-spacing: 1rpx;
}
.page-subtitle {
display: block;
font-size: 26rpx;
color: var(--text-muted);
font-weight: 400;
letter-spacing: 0.5rpx;
}
/* 主要内容区域 */
.main-content {
position: relative;
z-index: 1;
}
/* 筛选标签栏容器 - 用于吸附效果 */
.filter-bar-wrapper {
position: sticky;
top: 0;
z-index: 100;
background: var(--bg-page);
padding: 24rpx 24rpx;
/* margin-bottom: 24rpx; */
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
/* 筛选标签栏 */
.filter-bar {
display: flex;
align-items: center;
gap: 16rpx;
}
.filter-items {
flex: 1;
display: flex;
gap: 16rpx;
}
.filter-item {
flex: 1;
padding: 20rpx;
background: var(--bg-white);
border-radius: var(--radius-full);
text-align: center;
font-size: 26rpx;
color: var(--text-secondary);
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}
.filter-item.active {
background: var(--primary-gradient);
color: var(--text-white);
box-shadow: var(--shadow-primary);
font-weight: 600;
}
.filter-item:active {
transform: scale(0.96);
}
.locate-btn {
flex-shrink: 0;
padding: 20rpx 26rpx;
background: var(--bg-white);
border-radius: var(--radius-full);
text-align: center;
font-size: 26rpx;
color: var(--primary);
box-shadow: var(--shadow-sm);
border: 1rpx solid var(--border-primary);
font-weight: 600;
transition: all 0.3s ease;
}
.locate-btn:active {
transform: scale(0.96);
}
.locate-btn.disabled {
opacity: 0.6;
}
/* 排名列表 */
.ranking-list {
padding: 0 24rpx 40rpx;
}
.ranking-item {
display: flex;
align-items: center;
padding: 24rpx;
background: var(--bg-card);
border-radius: 20rpx;
margin-bottom: 16rpx;
box-shadow: var(--shadow-card);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 1rpx solid var(--border-soft);
}
.ranking-item:last-child {
margin-bottom: 0;
}
.ranking-item:active {
transform: scale(0.98);
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);
}
.ranking-item.top-rank {
background: linear-gradient(
135deg,
var(--primary-soft) 0%,
var(--bg-white) 100%
);
border: 2rpx solid var(--border-primary);
box-shadow: var(--shadow-primary);
}
.ranking-item.is-me {
border: 2rpx solid rgba(255, 107, 53, 0.55);
box-shadow: 0 10rpx 28rpx rgba(255, 107, 53, 0.18);
}
/* 排名徽章 */
.rank-badge {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 26rpx;
font-weight: 700;
margin-right: 20rpx;
flex-shrink: 0;
}
.rank-badge.top1 {
background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
color: #8b4513;
box-shadow: 0 6rpx 20rpx rgba(255, 215, 0, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.top2 {
background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 100%);
color: #4a4a4a;
box-shadow: 0 4rpx 16rpx rgba(192, 192, 192, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.top3 {
background: linear-gradient(135deg, #cd853f 0%, #b8860b 100%);
color: #fff;
box-shadow: 0 4rpx 16rpx rgba(205, 133, 63, 0.5);
font-size: 32rpx;
width: 64rpx;
height: 64rpx;
}
.rank-badge.normal {
background: linear-gradient(
135deg,
var(--bg-soft) 0%,
var(--bg-card-hover) 100%
);
color: var(--text-secondary);
font-weight: 600;
}
/* 选手头像 */
.player-avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
border: 3rpx solid var(--bg-white);
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
flex-shrink: 0;
background: var(--bg-soft);
}
/* 选手信息 */
.player-info {
flex: 1;
overflow: hidden;
}
.player-name {
display: block;
font-size: 30rpx;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.player-meta {
display: flex;
align-items: center;
gap: 16rpx;
flex-wrap: wrap;
}
.player-level {
display: inline-flex;
align-items: center;
padding: 4rpx 14rpx;
border-radius: 20rpx;
font-size: 22rpx;
font-weight: 600;
line-height: 1.2;
}
.player-level.lv1 {
background: #e8f5e9;
color: #2e7d32;
}
.player-level.lv2 {
background: #e3f2fd;
color: #1565c0;
}
.player-level.lv3 {
background: #fff3e0;
color: #e65100;
}
.player-level.lv4 {
background: #fce4ec;
color: #c2185b;
}
.player-level.lv5 {
background: #f3e5f5;
color: #7b1fa2;
}
.player-stats {
font-size: 24rpx;
color: var(--text-secondary);
font-weight: 500;
}
/* 战力值 */
.player-power {
text-align: right;
flex-shrink: 0;
}
.power-value {
display: block;
font-size: 36rpx;
font-weight: 700;
color: var(--primary);
line-height: 1.2;
margin-bottom: 4rpx;
}
.power-label {
font-size: 22rpx;
color: var(--text-muted);
font-weight: 500;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
padding: 80rpx 48rpx;
}
.empty-icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 24rpx;
opacity: 0.7;
}
.empty-title {
font-size: 28rpx;
color: var(--text-secondary);
margin-bottom: 8rpx;
}
.empty-desc {
font-size: 24rpx;
color: var(--text-muted);
}
/* 加载状态 */
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx;
color: var(--text-muted);
font-size: 26rpx;
}
/* 加载更多 */
.load-more {
text-align: center;
padding: 16rpx 32rpx 8rpx;
color: var(--text-muted);
font-size: 26rpx;
}