feat: 添加风云榜、七数商角标

This commit is contained in:
2026-06-26 15:00:57 +08:00
parent a2f39099d6
commit 1902549342
7 changed files with 39 additions and 22 deletions
@@ -78,6 +78,7 @@
const total = ref(0);
const pagesMap = ref({});
const loadingMap = ref({});
const MAX_PAGES = 30;
const normalizeSize = (val, def) => {
const n = Math.floor(Number(val));
@@ -97,9 +98,7 @@
});
const totalPages = computed(() => {
const t = Number(total.value) || 0;
const size = normalizeSize(props.pageSize, 5);
return t > 0 ? Math.max(1, Math.ceil(t / size)) : 1;
return MAX_PAGES;
});
const normalizePageNo = (pageNo) => {
@@ -164,7 +163,7 @@
if (!Number.isFinite(next)) return;
currentPageIndex.value = next;
const currentPageNo = totalPages.value > 1 ? next + 1 : 1;
ensurePageLoaded(currentPageNo, true);
ensurePageLoaded(currentPageNo);
if (totalPages.value > 1) {
ensurePageLoaded(currentPageNo + 1);
}
@@ -203,7 +202,6 @@
pagesMap.value = {};
loadingMap.value = {};
await ensurePageLoaded(1);
await ensurePageLoaded(2);
};
watch(
@@ -233,7 +231,8 @@
margin-top: 18rpx;
padding: 16rpx 12rpx 0;
border-radius: 24rpx;
background: linear-gradient(90deg, #4a7bff 0%, #9eb7ff 100%);
background: rgba(255, 255, 255, 0.75);
box-shadow: 0 16rpx 32rpx rgba(200, 213, 248, 0.8);
box-sizing: border-box;
}
@@ -253,7 +252,7 @@
width: 40rpx;
height: 40rpx;
border-radius: 20rpx;
background: rgba(37, 86, 236, 0.95);
background: linear-gradient(180deg, #93c5fd 0%, #1d4ed8 100%);
display: flex;
align-items: center;
justify-content: center;
@@ -298,6 +297,7 @@
background: rgba(255, 255, 255, 0.95);
padding: 16rpx 12rpx;
box-sizing: border-box;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
.rank-top {