feat: 首页、分类页加载数据逻辑重构

This commit is contained in:
R524809
2026-04-30 16:44:45 +08:00
parent c112c70bab
commit 7126d3a941
63 changed files with 805 additions and 433 deletions
+94 -4
View File
@@ -83,6 +83,15 @@
border-top-left-radius: 32rpx;
border-top-right-radius: 32rpx;
overflow: hidden;
border-bottom: 1rpx solid rgba(50, 46, 37, 0.08);
background: #f5edd8;
}
.home-hero-card__cover {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.home-hero-card__icon {
@@ -216,6 +225,8 @@
display: flex;
align-items: flex-start;
justify-content: center;
border-bottom: 1rpx solid rgba(50, 46, 37, 0.08);
background: #f5edd8;
}
.home-track-card__cover {
@@ -242,7 +253,6 @@
padding: 20rpx @page-padding-inner-x 22rpx;
background: #ffffff;
white-space: normal;
border-top: 1rpx solid #c5c5c5;
}
.home-track-card__title {
@@ -264,7 +274,7 @@
box-sizing: border-box;
width: 100%;
margin-top: 8rpx;
font-size: 22rpx;
font-size: 20rpx;
color: @text-gray;
line-height: 1.45;
display: -webkit-box;
@@ -350,12 +360,22 @@
.home-hot-card__thumb {
width: 144rpx;
height: 144rpx;
border-radius: 24rpx;
height: 180rpx;
border-radius: 18rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
overflow: hidden;
border: 1rpx solid rgba(50, 46, 37, 0.08);
background: #f5edd8;
}
.home-hot-card__thumb-img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.home-hot-card__thumb-emoji {
@@ -367,6 +387,9 @@
flex-direction: column;
min-width: 0;
flex: 1;
justify-content: space-between;
align-self: stretch;
padding: 6rpx 0;
}
.home-hot-card__title {
@@ -438,4 +461,71 @@
background: @brand;
color: @text-selected-btn;
font-weight: 600;
}
// ── Skeleton ──
@keyframes home-skeleton-pulse {
0% {
opacity: 0.6;
}
50% {
opacity: 0.3;
}
100% {
opacity: 0.6;
}
}
.home-hero-card--skeleton {
pointer-events: none;
.home-hero-card__top {
animation: home-skeleton-pulse 1.5s ease-in-out infinite;
}
.home-hero-card__title,
.home-hero-card__sub {
background: #e8e2d5;
border-radius: 8rpx;
color: transparent;
animation: home-skeleton-pulse 1.5s ease-in-out infinite;
}
.home-hero-card__title {
width: 50%;
height: 36rpx;
}
.home-hero-card__sub {
width: 70%;
height: 26rpx;
}
}
.home-hot-card--skeleton {
pointer-events: none;
.home-hot-card__thumb {
animation: home-skeleton-pulse 1.5s ease-in-out infinite;
}
.home-hot-card__title,
.home-hot-card__desc {
background: #e8e2d5;
border-radius: 8rpx;
color: transparent;
animation: home-skeleton-pulse 1.5s ease-in-out infinite;
}
.home-hot-card__title {
width: 40%;
height: 32rpx;
}
.home-hot-card__desc {
width: 65%;
height: 24rpx;
}
}