feat(CP排行榜页面): 星座榜首接口对接

This commit is contained in:
hzj 2026-02-13 10:52:42 +08:00
parent 6ee2f2626e
commit cb5d210f91

View File

@ -57,7 +57,7 @@
v-for="(item, index) in seasonTop1List"
style="z-index: 1; min-width: 0; flex-shrink: 0; transition: all 0.8s ease"
:style="{ width: index === centerIndex ? '60vw' : '40vw' }"
:imgUrl="imageUrl('topCoupleFrame')"
:imgUrl="imageUrl('AquariusCoupleFrame')"
:contentStyle="``"
@click="moveToCenter(index)"
>
@ -79,7 +79,7 @@
>
<!-- 情侣1头像 -->
<img
:src="''"
:src="item?.userAvatar || ''"
alt=""
style="
display: block;
@ -93,7 +93,7 @@
/>
<!-- 情侣2头像 -->
<img
:src="''"
:src="item?.cpUserAvatar || ''"
alt=""
style="
display: block;
@ -132,8 +132,12 @@
padding: 1vw 5vw;
"
>
<div style="font-size: 1.2em; color: #fe649b; font-weight: 700">Season1</div>
<div style="font-size: 0.9em; color: #fe649b; font-weight: 700">2026.1.20-2.18</div>
<div style="font-size: 1.2em; color: #fe649b; font-weight: 700">
Season{{ centerIndex + 1 }}
</div>
<div style="font-size: 0.9em; color: #fe649b; font-weight: 700">
{{ twelveSigns[centerIndex]?.time }}
</div>
</div>
</div>
</itemCenter>
@ -1419,6 +1423,21 @@ const centerIndex = ref(0) // 默认中间项的索引为1
const touchStartX = ref(0)
const touchEndX = ref(0)
const twelveSigns = ref([
{ name: 'Aquarius', time: '2026.1.20-2.18', bgUrl: imageUrl('AquariusCoupleFrame') },
{ name: 'Pisces', time: '2026.2.19-3.20', bgUrl: imageUrl('PiscesCoupleFrame') },
{ name: 'Aries', time: '2026.3.21-4.19', bgUrl: imageUrl('') },
{ name: 'Taurus', time: '2026.4.20-5.20', bgUrl: imageUrl('') },
{ name: 'Gemini', time: '2026.5.21-6.21', bgUrl: imageUrl('') },
{ name: 'Cancer', time: '2026.6.22-7.22', bgUrl: imageUrl('') },
{ name: 'Leo', time: '2026.7.23-8.22', bgUrl: imageUrl('') },
{ name: 'Virgo', time: '2026.8.23-9.22', bgUrl: imageUrl('') },
{ name: 'Libra', time: '2026.9.23-10.22', bgUrl: imageUrl('') },
{ name: 'Scorpio', time: '2026.10.23-11.21', bgUrl: imageUrl('') },
{ name: 'Sagittarius', time: '2026.11.22-12.21', bgUrl: imageUrl('') },
{ name: 'Capricorn', time: '2026.12.22-1.19', bgUrl: imageUrl('') },
])
//
const moveToCenter = (targetIndex) => {
if (centerIndex.value == targetIndex) return //
@ -1671,8 +1690,11 @@ const getLoveLetterWall = async () => {
const getCpSeasonTop1List = async () => {
const resCpSeasonTop1List = await apiGetCpSeasonTop1List()
if (resCpSeasonTop1List.status && resCpSeasonTop1List.body) {
// seasonTop1List.value = resCpSeasonTop1List.body
seasonTop1List.value = [{}]
if (Array.isArray(resCpSeasonTop1List.body) && resCpSeasonTop1List.body.length > 0) {
seasonTop1List.value = resCpSeasonTop1List.body
} else {
seasonTop1List.value = [{}]
}
}
}
@ -1775,7 +1797,9 @@ const preloadCriticalImages = async () => {
//
imageUrl(getImgName('historyTopBg')),
imageUrl('topCoupleFrame'),
// imageUrl('topCoupleFrame'),
imageUrl('AquariusCoupleFrame'),
imageUrl('PiscesCoupleFrame'),
//
imageUrl(getImgName('rankingBtActive')),